From d63032d3077e1d70bb308902f187fdfe2be2fca0 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Tue, 25 Mar 2025 06:53:23 -0700 Subject: [PATCH 1/6] et-bbs-server - Added initial et-bbs-server wrapper script a minimum configuration. Not yet tested. --- overlay/opt/emcomm-tools/bin/et-bbs-server | 90 +++++++++++++++++ .../conf/template.d/bbs/bpq32.simple.conf | 96 +++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100755 overlay/opt/emcomm-tools/bin/et-bbs-server create mode 100644 overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf diff --git a/overlay/opt/emcomm-tools/bin/et-bbs-server b/overlay/opt/emcomm-tools/bin/et-bbs-server new file mode 100755 index 0000000..e995ef0 --- /dev/null +++ b/overlay/opt/emcomm-tools/bin/et-bbs-server @@ -0,0 +1,90 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 25 March 2025 +# Purpose : Wrapper script for starting the BBS with PnP support +# +# Preconditions: +# 1. Supported radio and audio interface are connected and properly detected +# +# Postconditions: +# 1. Dire Wolf is started in 1200 baud packet mode +# 2. LinBPQ is started +source /opt/emcomm-tools/bin/et-common + +BBS_CONF_DIR=${HOME}/.local/share/emcomm-tools/bbs-server +BBS_CONF_FILE=${BBS_CONF_DIR}/bpq32.conf +BBS_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf + +usage() { + echo "usage: $(basename $0) " + echo " " + echo " start - Start BBS" + echo " update-config - Update configuration" +} + +if [[ $# -ne 1 ]]; then + usage + exit 1 +fi + +start() { + update-config + + if [[ $? -eq 0 ]]; then + + PS_OUT=$(ps -ef | grep [d]irewolf) + if [[ $? -ne 0 ]]; then + echo -e "${RED}Can't start BBS. Dire Wolf not running.${NC}" + exit 1 + fi + + CWD_DIR=$(pwd) + + cd ${BBS_CONF_DIR} + CMD="linbpq" + et-log "Starting LinBPQ in ${BBS_CONF_DIR} with: ${CMD}" + + ${CMD} + + cd ${CWD_DIR} + + else + et-log "Error updating configuration. Can't start BBS" + exit 1 + fi +} + +update-config () { + + [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" + + CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign) + GRID=$(cat ${ET_USER_CONFIG} | jq -r .grid) + WINLINK_PASSWD=$(cat ${ET_USER_CONFIG} | jq -r .winlinkPasswd) + + if [[ "${CALLSIGN}" = "N0CALL" ]]; then + echo -e "${RED}Can't start BBS. No callsign set. Run: ${WHITE}et-user${NC}." + exit 1 + fi + + echo "Updating BBS configuration: ${BBS_CONF_FILE}..." + cp -v ${BBS_CONF_FILE_TEMPLATE} ${BBS_CONF_FILE} + sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${BBS_CONF_FILE} + sed -i "s|{{ET_WINLINK_PASSWD}}|${WINLINK_PASSWD}|g" ${BBS_CONF_FILE} + sed -i "s|{{ET_GRID}}|${GRID}|g" ${BBS_CONF_FILE} +} + +case $1 in + start) + start + ;; + update-config) + update-config + ;; + *) + echo "Invalid command." + usage + exit 1 + ;; +esac diff --git a/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf new file mode 100644 index 0000000..11034f7 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf @@ -0,0 +1,96 @@ +SIMPLE +LOCATOR={{{{ET_GRID}} +NODECALL={{ET_CALLSIGN}}-7 +NODEALIAS=ETCNDE + +CTEXT: + _____ _____ ____ ____ ____ ____ +| ____|_ _/ ___| __ )| __ ) ___| +| _| | || | | _ \| _ \___ \ +| |___ | || |___| |_) | |_) |__) | +|_____| |_| \____|____/|____/____/ + +Command Description +? Show help +BBS Connect to BBS +CHAT Chat with other users +INFO Contact information +*** + +FULL_CTEXT=1 + +BTEXT: +{{ET_CALLSIGN}} ETC BPQ node +*** + +BTINTERVAL=15 + +IDMSG: +{{ET_CALLSIGN}}-7 Network node (ETC BPQ) +*** + +INFOMSG: +Welcome to the ETC BPQ node in {{ET_GRID}}. +*** + +MAPCOMMENT={{ET_CALLSIGN}} ETC BPQ Node + +IDINTERVAL=15 +NODESINTERVAL=25 + +PORT + PORTNUM=1 + ID=1200 baud packet + TYPE=ASYNC + PROTOCOL=KISS ; Use KISS for the 1200 baud packet port + IPADDR=127.0.0.1 ; Connect to direwolf on this host + TCPPORT=8001 ; Connect to direwolf on the KISS TCP port + CHANNEL=A ; single channel TNC + NOKEEPALIVES=0 + PERSIST=160 + SLOTTIME=180 + TXDELAY=270 ; The TX delay in milliseconds + TXTAIL=23 ; The TX tail delay in millisconds + QUALITY=203 ; Quality factor applied to node broadcasts + MINQUAL=201 ; Entries in the nodes table with qualities + ; greater or equal to MINQUAL will be sent on + ; this port. A value of 0 sends everything. + MAXFRAME=6 ; Max outstanding frames (1 thru 7) + FRACK=5000 ; Level 2 timout in milliseconds + RESPTIME=1000 ; Level 2 delayed ack timer in milliseconds + RETRIES=100 ; Level 2 maximum retry value + PACLEN=236 ; Default max packet length for this port + UNPROTO=FBB ; BTEXT broadcast addrs format: + ; DEST[,digi1[,digi2]] + L3ONLY=0 ; 1=No user downlink connects on this port + DIGIFLAG=1 ; Digipeat: 0=OFF, 1=ALL, 255=UI Only + DIGIPORT=0 ; Port on which to send digi'd frames + USERS=0 ; Maximum number of L2 sessions, 0 = no limit +ENDPORT + +PORT + PORTNUM=2 + ID=Telnet + DRIVER=Telnet + QUALITY=0 + CONFIG + CMS=1 + CMSCALL={{ET_CALLSIGN}} + CMSPASS= + RELAYAPPL=BBS + SECURETELNET=1 + LOGGING=1 + DisconnectOnClose=0 + TCPPORT=8010 + HTTPPORT=8012 + LOGINPROMPT=user: + PASSWORDPROMPT=password: + MAXSESSIONS=15 + CTEXT=Welcome to {{ET_CALLSIGN}}'s Telnet Server\nEnter ? for list of commands\n\n + USER=admin,{{ET_WINLINK_PASSWD}},{{ET_CALLSIGN}},"",sysop +ENDPORT + +APPLICATION 1,BBS,,{{ET_CALLSIGN}}-11,ETCBBS,255 +APPLICATION 2,CHAT,,{{ET_CALLSIGN}}-12,ETCCHT,255 +LINMAIL +LINCHAT From d2c9499ec6d63652f9eaed1eb905515a88424167 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Tue, 25 Mar 2025 07:09:48 -0700 Subject: [PATCH 2/6] et-bbs-server - Fixed typo in template; renamed BPQ config file; added BBS Server to et-mode --- overlay/opt/emcomm-tools/bin/et-bbs-server | 4 ++-- overlay/opt/emcomm-tools/bin/et-mode | 9 ++++++++- overlay/opt/emcomm-tools/bin/et-system-info | 6 +++++- .../bbs/{bpq32.simple.conf => bpq32.simple.cfg} | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) rename overlay/opt/emcomm-tools/conf/template.d/bbs/{bpq32.simple.conf => bpq32.simple.cfg} (99%) diff --git a/overlay/opt/emcomm-tools/bin/et-bbs-server b/overlay/opt/emcomm-tools/bin/et-bbs-server index e995ef0..05abd25 100755 --- a/overlay/opt/emcomm-tools/bin/et-bbs-server +++ b/overlay/opt/emcomm-tools/bin/et-bbs-server @@ -13,8 +13,8 @@ source /opt/emcomm-tools/bin/et-common BBS_CONF_DIR=${HOME}/.local/share/emcomm-tools/bbs-server -BBS_CONF_FILE=${BBS_CONF_DIR}/bpq32.conf -BBS_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf +BBS_CONF_FILE=${BBS_CONF_DIR}/bpq32.cfg +BBS_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg usage() { echo "usage: $(basename $0) " diff --git a/overlay/opt/emcomm-tools/bin/et-mode b/overlay/opt/emcomm-tools/bin/et-mode index aaf735b..762ed3d 100755 --- a/overlay/opt/emcomm-tools/bin/et-mode +++ b/overlay/opt/emcomm-tools/bin/et-mode @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 6 November 2024 -# Updated : 18 March 2025 +# Updated : 25 March 2025 # Purpose : Configures the system for a specific mode of operation # Use a simple text file to save the state of the last mode selected @@ -16,6 +16,7 @@ MODE_ID_APRS_DIGIPEATER="aprs-digipeater" MODE_ID_APRS_CLIENT="aprs-client" MODE_ID_BBS_CLIENT="bbs-client" MODE_ID_BBS_CLIENT2="bbs-client2" +MODE_ID_BBS_SERVER="bbs-server" MODE_ID_CHAT_CLIENT="chat-chattervox" MODE_ID_PACKET_DIGIPEATER="packet-digipeater" MODE_ID_WINLINK_ARDOP="winlink-ardop" @@ -133,6 +134,7 @@ options+=("${MODE_ID_NONE}" "No mode selected") options+=("${MODE_ID_APRS_CLIENT}" "APRS Client (YAAC)") options+=("${MODE_ID_BBS_CLIENT}" "BBS Client (Paracon)") options+=("${MODE_ID_BBS_CLIENT2}" "BBS Client (QtTermTCP)") +options+=("${MODE_ID_BBS_SERVER}" "BBS Server (LinBPQ)") options+=("${MODE_ID_CHAT_CLIENT}" "Chat (chattervox)") options+=("${MODE_ID_APRS_DIGIPEATER}" "APRS Digipeater") options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater") @@ -220,6 +222,11 @@ if [ $exit_status -eq 0 ]; then et-log "Starting QtTermTCP." et-qttermtcp start ;; + ${MODE_ID_BBS_SERVER}) + start_and_wait_for_service et-service-direwolf-simple + et-log "Starting BBS server." + et-bbs-server start + ;; ${MODE_ID_CHAT_CLIENT}) start_and_wait_for_service et-service-direwolf-simple et-log "Starting chattervox" diff --git a/overlay/opt/emcomm-tools/bin/et-system-info b/overlay/opt/emcomm-tools/bin/et-system-info index 529de30..416c79d 100755 --- a/overlay/opt/emcomm-tools/bin/et-system-info +++ b/overlay/opt/emcomm-tools/bin/et-system-info @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 6 October 2024 -# Updated : 7 February 2025 +# Updated : 25 March 2025 # Purpose : Utility script for dumping system information function usage() { @@ -178,6 +178,7 @@ case $1 in MODE_ID_APRS_DIGIPEATER="aprs-digipeater" MODE_ID_BBS_CLIENT="bbs-client" MODE_ID_BBS_CLIENT2="bbs-client2" + MODE_ID_BBS_SERVER="bbs-server" MODE_ID_CHAT_CLIENT="chat-chattervox" MODE_ID_PACKET_DIGIPEATER="packet-digipeater" MODE_ID_APRS_CLIENT="aprs-client" @@ -208,6 +209,9 @@ case $1 in ${MODE_ID_BBS_CLIENT2}) echo "BBS Client" ;; + ${MODE_ID_BBS_SERVER}) + echo "BBS Server" + ;; ${MODE_ID_CHAT_CLIENT}) echo "Chat (chattervox)" ;; diff --git a/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg similarity index 99% rename from overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf rename to overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg index 11034f7..ffe8435 100644 --- a/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.conf +++ b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg @@ -1,5 +1,5 @@ SIMPLE -LOCATOR={{{{ET_GRID}} +LOCATOR={{ET_GRID}} NODECALL={{ET_CALLSIGN}}-7 NODEALIAS=ETCNDE From f839cdeb1dee819b6739eb785adf20e384d86a4d Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Tue, 25 Mar 2025 16:01:30 -0700 Subject: [PATCH 3/6] Added info to LinBPQ config --- .../emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg index ffe8435..6eef1f7 100644 --- a/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg +++ b/overlay/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg @@ -31,6 +31,15 @@ IDMSG: INFOMSG: Welcome to the ETC BPQ node in {{ET_GRID}}. + +To leave me a message. + +1. Access the BBS by typing: bbs +2. Send a private message to me by typing: sp {{ET_CALLSIGN}} +3. Enter a title for the message when prompted, then press [ENTER]. +4. Type your message one line at a time. Press [ENTER] after each line. +5. When done, type the following on its own line: /ex +6. Press [ENTER] *** MAPCOMMENT={{ET_CALLSIGN}} ETC BPQ Node From 6b3744fa2efc1ce1379f54ebb9793df3a87783ff Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Wed, 26 Mar 2025 06:35:00 -0700 Subject: [PATCH 4/6] et-bbs-server - Added web interface for Linbpq to installer --- scripts/install-bbs-server.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/scripts/install-bbs-server.sh b/scripts/install-bbs-server.sh index d1d0a25..45d2238 100755 --- a/scripts/install-bbs-server.sh +++ b/scripts/install-bbs-server.sh @@ -1,7 +1,7 @@ #!/bin/bash # Author : Gaston Gonzalez # Date : 8 November 2024 -# Updated : 28 November 2024 +# Updated : 26 March 2025 # Purpose : Install Linbpq # # Notes: @@ -19,6 +19,36 @@ apt install ucspi-tcp -y et-log "Installing Linbpq..." +# Install the web interface for LinBPQ +HTML_ZIP_FILE=HTMLPages.zip +HTML_ZIP_URL="http://www.cantab.net/users/john.wiseman/Downloads/Beta/${HTML_ZIP_FILE}" + +curl -s -f -L -o ${HTML_ZIP_FILE} ${HTML_ZIP_URL} +if [[ $? -eq 0 ]]; then + et-log "Downloading web interface for LinBPQ from ${HTML_ZIP_URL}" + + CWD_DIR=$(pwd) + + et-log "Installing web interface under ${BBS_HOME}" + BBS_HOME="/etc/skel/.local/share/emcomm-tools/bbs-server" + BBS_HOME_FILES="${BBS_HOME}/Files" + + [[ ! -e ${BBS_HOME_FILES} ]] && mkdir -p ${BBS_HOME_FILES} + + mv ${HTML_ZIP_FILE} ${BBS_HOME} && cd ${BBS_HOME} && unzip ${HTML_ZIP_FILE} + + cd ${CWD_DIR} + + if [[ -e "${BBS_HOME}/index.htmlx" ]]; then + et-log "Web interface installation successful" + else + et-log "Web interface installation failed" + fi +else + et-log "Unable install web interface for LinBPQ" +fi + +# Install Linbpq et-log "Installing 32-bit dependencies for Linbpq..." dpkg --add-architecture i386 && apt update && apt install \ libpcap0.8-dev:i386 \ @@ -45,3 +75,4 @@ ln -s ${INSTALL_DIR} ${LINK_PATH} stow -v -d /opt linbpq -t /usr/local cd ${CWD_DIR} + From 02d5fb71d28643e0f8343b7bd64c0448399effb0 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Wed, 26 Mar 2025 06:52:02 -0700 Subject: [PATCH 5/6] et-bbs-server - Re-ordered variables in installer script --- scripts/install-bbs-server.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install-bbs-server.sh b/scripts/install-bbs-server.sh index 45d2238..d39c68e 100755 --- a/scripts/install-bbs-server.sh +++ b/scripts/install-bbs-server.sh @@ -22,19 +22,19 @@ et-log "Installing Linbpq..." # Install the web interface for LinBPQ HTML_ZIP_FILE=HTMLPages.zip HTML_ZIP_URL="http://www.cantab.net/users/john.wiseman/Downloads/Beta/${HTML_ZIP_FILE}" +BBS_HOME="/etc/skel/.local/share/emcomm-tools/bbs-server" +BBS_HOME_FILES="${BBS_HOME}/Files" +et-log "Downloading web interface for LinBPQ from ${HTML_ZIP_URL}" curl -s -f -L -o ${HTML_ZIP_FILE} ${HTML_ZIP_URL} + if [[ $? -eq 0 ]]; then - et-log "Downloading web interface for LinBPQ from ${HTML_ZIP_URL}" CWD_DIR=$(pwd) et-log "Installing web interface under ${BBS_HOME}" - BBS_HOME="/etc/skel/.local/share/emcomm-tools/bbs-server" - BBS_HOME_FILES="${BBS_HOME}/Files" [[ ! -e ${BBS_HOME_FILES} ]] && mkdir -p ${BBS_HOME_FILES} - mv ${HTML_ZIP_FILE} ${BBS_HOME} && cd ${BBS_HOME} && unzip ${HTML_ZIP_FILE} cd ${CWD_DIR} From 72ec31b01d83758cd9fd0f01e4b7be9076be2e31 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Wed, 26 Mar 2025 07:11:02 -0700 Subject: [PATCH 6/6] et-bbs-server - Added initial notes on how to log into the BBS as the sysop --- overlay/etc/skel/notes/bbs-admin.md | 17 +++++++++++++++++ .../{OFFLINE_SITES.md => offline-sites.md} | 0 2 files changed, 17 insertions(+) create mode 100644 overlay/etc/skel/notes/bbs-admin.md rename overlay/etc/skel/notes/{OFFLINE_SITES.md => offline-sites.md} (100%) diff --git a/overlay/etc/skel/notes/bbs-admin.md b/overlay/etc/skel/notes/bbs-admin.md new file mode 100644 index 0000000..eaf9ff1 --- /dev/null +++ b/overlay/etc/skel/notes/bbs-admin.md @@ -0,0 +1,17 @@ +# BBS Admin + +## Logging in as the System Operator (SysOp) + +To access the BBS as an administrator (also called the sysop), perform +the following: + +1. Launch the Min web browser. + +2. Visit http://localhost:8012. + +3. Click on "SYSOP Signin". + +4. For the user use: `admin` + +5. For the password use: your Winlink password that you set with + `et-user`. diff --git a/overlay/etc/skel/notes/OFFLINE_SITES.md b/overlay/etc/skel/notes/offline-sites.md similarity index 100% rename from overlay/etc/skel/notes/OFFLINE_SITES.md rename to overlay/etc/skel/notes/offline-sites.md