Skip to content

Commit

Permalink
add ability to configure TX comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Nov 17, 2023
1 parent 2061fb1 commit 40cb845
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ For these parameters, the default values are generally good as a starting point,
| `VERBOSE` | If set to `yes`/`on`/`1`/`true`, produce more verbose output | Unset |
| `DW_DEBUG` | Sets debug verbosity for DireWolf. For accepted values, see `docker exec -it direwolf --help` | Unset |
| `DW_EXTRA_CMDLINEARGS` | Any extra command line arguments you want to pass to DireWolf | Unset |
| `DW_TB_COMMENT` | Any comment text you want to add to your Tracker Beacon transmissions | Unset |

\* If the automatic setting doesn't work, you can show which audio devices, cards and subdevices are available on your system with the following command:

Expand Down
13 changes: 9 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: '3.8'
services:
aprs:
#image: ghcr.io/sdr-enthusiasts/docker-aprs-tracker
build: https://github.com/sdr-enthusiasts/docker-aprs-tracker.git
image: ghcr.io/sdr-enthusiasts/docker-aprs-tracker
container_name: aprs
hostname: aprs
restart: always
Expand All @@ -11,13 +10,19 @@ services:
privileged: true
environment:
- VERBOSE=false
- MYCALL=KX1T-1
- MYCALL=NOCALL # set your callsign before using the container!
- DW_EXTRA_CONFIGS=TXDELAY=30
- DW_EXTRA_CMDLINEARGS=-r 48000
- DW_TB_COMMENT="Myname [email protected]"
- AUDIOLEVEL_TX=64
# - DW_DEBUG=tog
# - DW_DONTSTART=true
tmpfs:
- /run:exec,size=32M
- /tmp:size=32M
- /var/log:size=32M
ports:
- 2947:2947
- 2947:2947 # exposes the GPSD port in case you want to use it for other purposes on the device
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
Expand Down
9 changes: 9 additions & 0 deletions rootfs/etc/s6-overlay/scripts/30-set-direwolf-params
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,15 @@ if [[ -n "$VIA" ]]; then
"${s6wrap[@]}" echo "[INFO] Setting VIA: $(grep -o "^\s*#*\s*TBEACON.*$" "$DWCONFIGFILE")"
fi

if [[ -n "$DW_TB_COMMENT" ]]; then
if grep -qio "^\s*#*\s*TBEACON.*COMMENT=.*$" "$DWCONFIGFILE"; then
sed -i "s/^\s*#*\s*\(TBEACON.*COMMENT=\).\+\(\b.*\)$/\1${DW_TB_COMMENT}\2/g" "$DWCONFIGFILE"
else
sed -i "s/^\s*#*\s*\(TBEACON.*\)$/\1 COMMENT=${DW_TB_COMMENT}/g" "$DWCONFIGFILE"
fi
"${s6wrap[@]}" echo "[INFO] Setting COMMENT: $(grep -o "^\s*#*\s*TBEACON.*$" "$DWCONFIGFILE")"
fi

if [[ -n "$SMARTBEACONING" ]]; then
setdwconfig SMARTBEACONING "$SMARTBEACONING"
"${s6wrap[@]}" echo "[INFO] Setting SMARTBEACONING $SMARTBEACONING"
Expand Down

0 comments on commit 40cb845

Please sign in to comment.