Compare commits
283 Commits
rigcontrol
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77fb14958e | ||
|
|
fa56d3c725 | ||
|
|
1b532f4400 | ||
|
|
15071d2940 | ||
|
|
5527d34814 | ||
|
|
b24b94c317 | ||
|
|
13e3a9a875 | ||
|
|
72ec31b01d | ||
|
|
02d5fb71d2 | ||
|
|
6b3744fa2e | ||
|
|
f839cdeb1d | ||
|
|
d2c9499ec6 | ||
|
|
d63032d307 | ||
|
|
ae93d3ae13 | ||
|
|
16099dfe67 | ||
|
|
6e86e02b5d | ||
|
|
24a9a1e7e2 | ||
|
|
0b2d8fc594 | ||
|
|
240aaa8771 | ||
|
|
b8cbd56bb3 | ||
|
|
311c72fb3d | ||
|
|
d77588b4d4 | ||
|
|
43b359e4d0 | ||
|
|
5160acaa4b | ||
|
|
daa76ec8a8 | ||
|
|
c7f5ec2f6c | ||
|
|
5c260ff83f | ||
|
|
3839d86a99 | ||
|
|
cab568d838 | ||
|
|
68761c8565 | ||
|
|
a777cc8fdf | ||
|
|
f4f661d007 | ||
|
|
84a6258289 | ||
|
|
1816118221 | ||
|
|
5c1fccf51f | ||
|
|
4a3b0f07fd | ||
|
|
04d11e1306 | ||
|
|
fae9030a20 | ||
|
|
4844004903 | ||
|
|
26af7e9d39 | ||
|
|
8ce4e53107 | ||
|
|
4ffa8b8231 | ||
|
|
9f21077793 | ||
|
|
a127fe7c10 | ||
|
|
da7d5cdd4e | ||
|
|
80eda35850 | ||
|
|
1abcf77687 | ||
|
|
a982ef2793 | ||
|
|
13db846715 | ||
|
|
1ec5838cc0 | ||
|
|
25057b1922 | ||
|
|
d6510b5c42 | ||
|
|
56a0c2ab5f | ||
|
|
97428d47be | ||
|
|
a4b3e1f7f5 | ||
|
|
1f5a566c59 | ||
|
|
ca700b5bed | ||
|
|
f89e91fb30 | ||
|
|
7fa85229d7 | ||
|
|
a0e163bb01 | ||
|
|
57b26735da | ||
|
|
72e5d974d3 | ||
|
|
fc6aa41e9f | ||
|
|
350173ab39 | ||
|
|
4f46a72b87 | ||
|
|
eaf7123ea5 | ||
|
|
a2359bd33a | ||
|
|
105142cf90 | ||
|
|
b9539999d8 | ||
|
|
9804b19db1 | ||
|
|
d0a3152501 | ||
|
|
a3310d290c | ||
|
|
ba697a4de5 | ||
|
|
e675f40249 | ||
|
|
6990d44f58 | ||
|
|
f53eb1d0f5 | ||
|
|
6e8afa7f10 | ||
|
|
c517016a2f | ||
|
|
5381b09f0f | ||
|
|
b85f6e9812 | ||
|
|
f4d68ab258 | ||
|
|
6612b8401c | ||
|
|
87f37061e3 | ||
|
|
4d07ee8f52 | ||
|
|
358730476a | ||
|
|
4d5a58b5ac | ||
|
|
6b7922f55e | ||
|
|
cc688ce583 | ||
|
|
4717d2b0be | ||
|
|
6d74fdae7e | ||
|
|
1be1c1102f | ||
|
|
4ec4c03033 | ||
|
|
5dbdcfb169 | ||
|
|
b27dd7a211 | ||
|
|
0c7e003386 | ||
|
|
f119fa032a | ||
|
|
5906f1e39f | ||
|
|
056a335ebd | ||
|
|
5e718453fa | ||
|
|
d3a2668840 | ||
|
|
5bd12186a9 | ||
|
|
e22f72070a | ||
|
|
6ff1b7d3b9 | ||
|
|
3aeb77dad0 | ||
|
|
097fb2afce | ||
|
|
4b73fd3df3 | ||
|
|
981fafada3 | ||
|
|
1332b2290d | ||
|
|
4d5e433a3e | ||
|
|
3176ed1ab6 | ||
|
|
37f5f7980a | ||
|
|
7a97cb2093 | ||
|
|
30bc0729ad | ||
|
|
802616de50 | ||
|
|
b91d96ce85 | ||
|
|
2ae3c7a017 | ||
|
|
1c593841dd | ||
|
|
ef6dc91dcb | ||
|
|
17b5da11c2 | ||
|
|
2fce9d042e | ||
|
|
419abfa615 | ||
|
|
e5d2380030 | ||
|
|
7f445a9216 | ||
|
|
edef14e56b | ||
|
|
10b5aee59b | ||
|
|
2527d82b0e | ||
|
|
5251d420e5 | ||
|
|
f4e8814295 | ||
|
|
390a3ce2aa | ||
|
|
0c4e4f7bdf | ||
|
|
32d8cab0c8 | ||
|
|
5ab9b6160f | ||
|
|
f16d0609e6 | ||
|
|
7b149c1878 | ||
|
|
bfa55902fd | ||
|
|
60f4dfe962 | ||
|
|
232f715ee5 | ||
|
|
a34c6174d1 | ||
|
|
702445f3c9 | ||
|
|
cc89c7f7b1 | ||
|
|
88008e5aad | ||
|
|
19e8dbf1a6 | ||
|
|
60df4d52fa | ||
|
|
5b06e2ddbd | ||
|
|
1de21ba2cd | ||
|
|
21a2494f95 | ||
|
|
6aa0580a5a | ||
|
|
bb2366b5bf | ||
|
|
77606e4038 | ||
|
|
34aea9b593 | ||
|
|
8af6b45f5d | ||
|
|
80045bf5ab | ||
|
|
4d012319c4 | ||
|
|
1ee06b5bcf | ||
|
|
49f75d4017 | ||
|
|
8e851da803 | ||
|
|
66fa7d3744 | ||
|
|
d2844271cf | ||
|
|
952c3bb4e5 | ||
|
|
76ce47d769 | ||
|
|
da71bab6d4 | ||
|
|
b91bd24282 | ||
|
|
d5d7feaf31 | ||
|
|
b65fa098b3 | ||
|
|
da1392523e | ||
|
|
9fa52340ad | ||
|
|
29602f5040 | ||
|
|
1fa6e18e88 | ||
|
|
e61e4a5a46 | ||
|
|
dd0638e809 | ||
|
|
dd5ac5de4e | ||
|
|
c304040b55 | ||
|
|
2f9881db67 | ||
|
|
d25dfcfaed | ||
|
|
8492bcedda | ||
|
|
4ada7f1aaf | ||
|
|
1b5b08a4c2 | ||
|
|
908a0c8d70 | ||
|
|
4a8fbfc0da | ||
|
|
49b2298e4b | ||
|
|
d991824f82 | ||
|
|
08259f0b87 | ||
|
|
ce5b49b855 | ||
|
|
6099c147a5 | ||
|
|
12bd7879a0 | ||
|
|
0dfdb34d4b | ||
|
|
c9a0480c0d | ||
|
|
5b151ed4f8 | ||
|
|
05114a4fcd | ||
|
|
d09187e9e7 | ||
|
|
8029cdd579 | ||
|
|
7d4ba70564 | ||
|
|
a3e5d35810 | ||
|
|
9b811e6e07 | ||
|
|
82d779e8ee | ||
|
|
dc2e5feafd | ||
|
|
0feede9d3c | ||
|
|
80fea3e089 | ||
|
|
8c26c86f5f | ||
|
|
df59069078 | ||
|
|
dcfd3d9e98 | ||
|
|
bd08a2c7f4 | ||
|
|
43b11ff318 | ||
|
|
86976f1ba6 | ||
|
|
1a836e318c | ||
|
|
04ff63ba88 | ||
|
|
fe407fc925 | ||
|
|
9efc8243bf | ||
|
|
89c89ff6ce | ||
|
|
8d51388597 | ||
|
|
3b356a9686 | ||
|
|
b9ce23337e | ||
|
|
9b732ea208 | ||
|
|
725d53a0cd | ||
|
|
c3515f96f6 | ||
|
|
42d1934997 | ||
|
|
a895534394 | ||
|
|
5210ebca8a | ||
|
|
d652b8ae6f | ||
|
|
45a2239642 | ||
|
|
237be45051 | ||
|
|
ef2992ac21 | ||
|
|
aee42cb457 | ||
|
|
ae84c03367 | ||
|
|
1145a13bc0 | ||
|
|
d3bf9c3050 | ||
|
|
85f8559613 | ||
|
|
7b876ad316 | ||
|
|
402a4a040d | ||
|
|
fb4d6228f5 | ||
|
|
1a22f483ac | ||
|
|
d590dc6332 | ||
|
|
ae7f157fa0 | ||
|
|
318e180f5f | ||
|
|
188be66d36 | ||
|
|
abff612378 | ||
|
|
c9af2f0593 | ||
|
|
85d1823740 | ||
|
|
a71e62722a | ||
|
|
a26ab51809 | ||
|
|
2b9e11a9b8 | ||
|
|
c9743be323 | ||
|
|
be41c4aaa7 | ||
|
|
d0d4f5f199 | ||
|
|
6837045d8b | ||
|
|
dca623392d | ||
|
|
1b136b92dd | ||
|
|
504780bcf8 | ||
|
|
c9dc150e40 | ||
|
|
411881a1cb | ||
|
|
29a1bf3ae1 | ||
|
|
2988c68daf | ||
|
|
d831500c41 | ||
|
|
15aae94fe8 | ||
|
|
2999053b80 | ||
|
|
53c3eea9ad | ||
|
|
c8c8bde4ad | ||
|
|
536ea8352c | ||
|
|
49b0d17c0f | ||
|
|
9ed9b023db | ||
|
|
524ffdd531 | ||
|
|
4b0eb3f056 | ||
|
|
0faa56fd33 | ||
|
|
de3cd96368 | ||
|
|
a5f3b73dba | ||
|
|
b4cbdaaf2f | ||
|
|
339a75ae57 | ||
|
|
6b3f6cf912 | ||
|
|
769db9027c | ||
|
|
15ea0fffdf | ||
|
|
2b1c75d748 | ||
|
|
2c0e9355fa | ||
|
|
3de8dd780a | ||
|
|
4c2f3a77a9 | ||
|
|
b66102a6eb | ||
|
|
0be290a7a4 | ||
|
|
8f896cf851 | ||
|
|
a66777b7c6 | ||
|
|
7c01c2f2bf | ||
|
|
ef0cd4e3a3 | ||
|
|
4a64c15fbd | ||
|
|
3d15c52a7a | ||
|
|
cf73c977c7 |
2
LICENSE
2
LICENSE
@@ -29,7 +29,7 @@ you agree to the following terms and conditions:
|
||||
rights not expressly granted are reserved by The Tech Prepper LLC.
|
||||
|
||||
For any inquiries regarding commercial use, modification, or other
|
||||
permissions, please contact [Your Contact Information].
|
||||
permissions, please contact The Tech Prepper LLC.
|
||||
|
||||
The Tech Prepper LLC
|
||||
info@thetechprepper.com
|
||||
|
||||
110
RELEASES.md
110
RELEASES.md
@@ -1,5 +1,115 @@
|
||||
# EmComm Tools OS Community Release
|
||||
|
||||
# 2025.04.01.R4 (4.0.0)
|
||||
|
||||
* Tier 1 radio PnP support
|
||||
* Yaesu FT-991A
|
||||
* Tier 2 radio PnP support
|
||||
* Icom IC-7300
|
||||
* Elecraft KX2 (DigiRig Mobile)
|
||||
* et-mode
|
||||
* BBS Client 1: Paracon (AGW radio terminal)
|
||||
* BBS Client 2: QtTermTCP (multi mode radio terminal)
|
||||
* BBS Server: 1200 baud packet node/BBS using LinBPQ
|
||||
* Chattervox: Packet-based chat client
|
||||
* Added 300, 1200, and 9600 baud packet packet to direwolf
|
||||
* Added VARA HF and VARA FM mode selection if installed
|
||||
* GPS PnP support
|
||||
* Dell 7220 (u-blox 8 receiver)
|
||||
* Winlink
|
||||
* Enabled P2P listening for AX.25 and ARDOP
|
||||
* Updated RMS list as of 03/27/25
|
||||
* Bluetooth TNC support
|
||||
* et-uv-pro: Support for BTECH UV Pro
|
||||
* et-vr-n76: support for Vero VGC NR-76
|
||||
* et-th-d74: support for Kenwood TH-D74
|
||||
* Added support for: axcall, QtTermTCP, Winlink, and YAAC
|
||||
* WINE
|
||||
* Added basic installation of WINE
|
||||
* Added scripts (`~/add-on/wine/*.sh`) to install VARA HF/FM
|
||||
* Misc
|
||||
* Added kiwix for offline Wikipedia and/or .zim browsing
|
||||
* et-user-backup: Performs ETC configuration backup
|
||||
* et-user-restore: Restores ETC configuration
|
||||
* Added misc tooling: pup, socat
|
||||
* Bug fixes
|
||||
* Updated OSM map downloader to work with updates to Geofabrik site
|
||||
* Fixed formatting of et-radio text output
|
||||
* Resolved inconsistent Conky startup behavior
|
||||
|
||||
# 2024.11.27.R3 (3.0.0)
|
||||
|
||||
* Plug-and-Play (PnP) support for CAT control, sound card, and GPS
|
||||
* Tier 1 radio PnP support
|
||||
* Yaesu FT-818ND (DigiRig Mobile)
|
||||
* Yaesu FT-857D (DigiRig Mobile)
|
||||
* Yaesu FT-897D (DigiRig Mobile)
|
||||
* Icom IC-705
|
||||
* Icom IC-7100
|
||||
* Tier 2 radio PnP support
|
||||
* DigiRig Lite (any radio with supported cable)
|
||||
* DigiRig Mobile with no CAT (any radio with supported cable)
|
||||
* Icom IC-7200
|
||||
* QRPLabs QMX
|
||||
* Xiegu G90 (DigiRig Mobile)
|
||||
* Yaesu FT-891 (DigiRig DR-891)
|
||||
* GPS PnP support
|
||||
* Icom IC-705
|
||||
* VK-162 G-Mouse USB GPS - https://amzn.to/3XQqmYj
|
||||
* VK-172 G-Mouse USB GPS - https://amzn.to/3Ya7Viu
|
||||
* VFAN UG-353 - https://amzn.to/3XL2lSo
|
||||
* Automatic time synchronization via GPS
|
||||
* Zero-configuration JS8Call launcher
|
||||
* Replace callsign, grid and sound card on every startup
|
||||
* Added @TTPNET call group
|
||||
* Prevent startup if no callsign defined via et-user
|
||||
* Prevent startup if no radio connected
|
||||
* If no GPS, reminder user to check time synchronization
|
||||
* Set default mode to normal
|
||||
* Show only message column in band activity window
|
||||
* Sort band activity by last heard station
|
||||
* Show only callsign, last heard, SNR, and offset in call activity window
|
||||
* Expire heard stations after 30 minutes in call activity window
|
||||
* Set ETC version in station info field
|
||||
* Hide waterfall controls
|
||||
* Zero-configuration mode switcher
|
||||
* APRS Client (YAAC)
|
||||
* APRS Digipeater (Dire Wolf)
|
||||
* Packet Digipeater (Dire Wolf)
|
||||
* Winlink VHF/UHF (AX.25 packet)
|
||||
* Winlink HF (ARDOP)
|
||||
* Added Conky for displaying system telemetry information
|
||||
* Date/time (local and UTC)
|
||||
* GPS time synchronization state
|
||||
* System resource utilization
|
||||
* Connected radio and connection state for CAT, GPS, and audio interface
|
||||
* Operator callsign and grid
|
||||
* Current mode of operation
|
||||
* Radio Applications
|
||||
* ARDOP - amateur radio modem suitable for HF
|
||||
* Dire Wolf - Software-based packet TNC
|
||||
* Pat - Winlink client
|
||||
* YAAC - APRS client
|
||||
* Misc Applications
|
||||
* Audio tools - Audacity, ffmpeg, sox
|
||||
* Development tools - Java 20, meld, vim
|
||||
* Min - Web browser
|
||||
* Navit - Offline navigation
|
||||
* Paracon - Packet radio terminal emulator
|
||||
* Added state-level (US only) OSM downloader to installer
|
||||
* Utility scripts
|
||||
* et-device-info - Capture USB device information for PnP development
|
||||
* et-radio - Set active radio
|
||||
* et-mode - Communications mode switcher
|
||||
* et-system-info - Display system information
|
||||
* et-time - Display time synch information for GPS
|
||||
* et-user - Configure global operating settings
|
||||
* Desktop notification messaging to user
|
||||
* Use old-releases for apt repositories
|
||||
* Basic post-installation test/validation suite
|
||||
* Set terminal to high visibility color palette
|
||||
* Upgraded DireWolf from 1.6 to 1.7
|
||||
|
||||
# 2024.05.19.R2
|
||||
|
||||
* Enabled Panasonic brightness fix
|
||||
|
||||
@@ -79,7 +79,7 @@ USERS_GID=1981
|
||||
# new users to other groups.
|
||||
# This is the list of groups that new non-system users will be added to
|
||||
# Default:
|
||||
EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users"
|
||||
EXTRA_GROUPS="bluetooth dialout cdrom floppy audio video plugdev tty users"
|
||||
|
||||
# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS
|
||||
# option above will be default behavior for adding new, non-system users
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 23 April 2024
|
||||
# Updated : 9 October 2024
|
||||
# Updated : 18 March 2025
|
||||
# Description : bash profile
|
||||
|
||||
# All user accounts should be in the 'et-data' group to allow data sharing with
|
||||
@@ -8,6 +8,9 @@
|
||||
# read and write shared data files.
|
||||
umask 002
|
||||
|
||||
# Disable the terminal bell for opsec
|
||||
xset b off
|
||||
|
||||
alias pbcopy='xsel --clipboard --input'
|
||||
alias pbpaste='xsel --clipboard --output'
|
||||
|
||||
@@ -18,6 +21,16 @@ GREEN='\x1B[1;32m'
|
||||
YELLOW='\x1B[1;33m'
|
||||
NC='\x1B[0m'
|
||||
|
||||
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ "
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
cat /etc/motd
|
||||
echo -e "${NC}"
|
||||
|
||||
export ET_USER_CONFIG=${HOME}/.config/emcomm-tools/user.json
|
||||
export ET_LOG_DIR=${HOME}/.local/share/emcomm-tools
|
||||
|
||||
# Export environment variables to support WINE installs for VARA
|
||||
export WINEARCH="win64"
|
||||
export WINEPREFIX="$HOME/.wine32"
|
||||
export WINEDEBUG=-all
|
||||
|
||||
@@ -119,3 +119,6 @@ if ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set xterm colors for the default terminal profile
|
||||
/opt/emcomm-tools/bin/et-term
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
[Common]
|
||||
ShowColumns=@Variant(\0\0\0\b\0\0\0\x6\0\0\0\x16\0\x63\0\x61\0l\0l\0l\0o\0g\0N\0\x61\0m\0\x65\0\0\0\x1\0\0\0\0\x1c\0\x63\0\x61\0l\0l\0l\0o\0g\0\x43\0o\0m\0m\0\x65\0n\0t\0\0\0\x1\0\0\0\0\xe\0\x63\0\x61\0l\0l\0l\0o\0g\0\0\0\x1\0\0\0\0\x1a\0\x62\0\x61\0n\0\x64\0t\0i\0m\0\x65\0s\0t\0\x61\0m\0p\0\0\0\x1\0\0\0\0\xe\0\x62\0\x61\0n\0\x64\0s\0n\0r\0\0\0\x1\0\0\0\0\x14\0\x62\0\x61\0n\0\x64\0o\0\x66\0\x66\0s\0\x65\0t\0\0\0\x1\0)
|
||||
SortBy=@Variant(\0\0\0\b\0\0\0\x2\0\0\0\x18\0\x63\0\x61\0l\0l\0\x41\0\x63\0t\0i\0v\0i\0t\0y\0\0\0\n\0\0\0\x18\0\x61\0\x63\0k\0T\0i\0m\0\x65\0s\0t\0\x61\0m\0p\0\0\0\x18\0\x62\0\x61\0n\0\x64\0\x41\0\x63\0t\0i\0v\0i\0t\0y\0\0\0\n\0\0\0\x14\0-\0t\0i\0m\0\x65\0s\0t\0\x61\0m\0p)
|
||||
SubMode=0
|
||||
|
||||
[Configuration]
|
||||
AcceptTCPRequests=true
|
||||
AutoGrid=true
|
||||
AutoreplyConfirmation=false
|
||||
AutoreplyOnAtStartup=true
|
||||
CallsignAging=30
|
||||
CATNetworkPort=localhost:4532
|
||||
CheckForUpdates=false
|
||||
HeartbeatAckSNR=true
|
||||
@@ -11,10 +17,13 @@ Miles=true
|
||||
MyCall=N0CALL
|
||||
MyGrid=DM33
|
||||
MyGroups=@@TTP,@@TTPNET
|
||||
MyInfo=ETC R3
|
||||
Polling=1
|
||||
PSKReporter=false
|
||||
PTTMethod=@Variant(\0\0\0\x7f\0\0\0\x1eTransceiverFactory::PTTMethod\0\0\0\0\xfPTT_method_CAT\0)
|
||||
PTTport=localhost:4532
|
||||
SoundInName="sysdefault:CARD=ET_AUDIO"
|
||||
SoundOutName="sysdefault:CARD=ET_AUDIO"
|
||||
SubMode=0
|
||||
SubModeHB=true
|
||||
SubModeHBAck=true
|
||||
@@ -25,3 +34,6 @@ TCPMaxConnections=3
|
||||
TCPServer=127.0.0.1
|
||||
TCPServerPort=2442
|
||||
TxIdleWatchdog=0
|
||||
|
||||
[WideGraph]
|
||||
HideControls=true
|
||||
|
||||
23
overlay/etc/skel/.config/QtTermTCP.ini
Normal file
23
overlay/etc/skel/.config/QtTermTCP.ini
Normal file
@@ -0,0 +1,23 @@
|
||||
[General]
|
||||
AGWEnable=1
|
||||
AGWHost=127.0.0.1
|
||||
AGWMonEnable=0
|
||||
AGWPaclen=80
|
||||
AGWPort=8000
|
||||
AGWTermCall=N0CALL
|
||||
AGWToCalls=TTPBBS
|
||||
KISSEnable=1
|
||||
KISSMode=0
|
||||
KISSSerialPort=rfcomm0
|
||||
MYCALL=N0CALL
|
||||
PTT=HAMLIB
|
||||
PTTBAUD=0
|
||||
PTTMode=17
|
||||
PTTOnString=127.0.0.1
|
||||
TermMode=0
|
||||
VARAEnable=1
|
||||
VARAFM=1
|
||||
VARAHF=0
|
||||
VARATermCall=N0CALL
|
||||
YAPPPath=
|
||||
singlemodeFormat=1
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=conky
|
||||
Exec=/opt/emcomm-tools/bin/et-conky
|
||||
Hidden=false
|
||||
NoDisplay=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
|
||||
1
overlay/etc/skel/.config/emcomm-tools/et-mode
Normal file
1
overlay/etc/skel/.config/emcomm-tools/et-mode
Normal file
@@ -0,0 +1 @@
|
||||
none
|
||||
5
overlay/etc/skel/.config/emcomm-tools/user.json
Normal file
5
overlay/etc/skel/.config/emcomm-tools/user.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"callsign": "N0CALL",
|
||||
"grid": "DM33",
|
||||
"winlinkPasswd": "NOPASS"
|
||||
}
|
||||
4
overlay/etc/skel/.config/paracon/paracon.cfg
Normal file
4
overlay/etc/skel/.config/paracon/paracon.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
[Setup]
|
||||
host = localhost
|
||||
callsign = N0CALL
|
||||
|
||||
83
overlay/etc/skel/.config/pat/config.json
Normal file
83
overlay/etc/skel/.config/pat/config.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"mycall": "{{ET_CALLSIGN}}",
|
||||
"secure_login_password": "{{ET_WINLINK_PASSWD}}",
|
||||
"auxiliary_addresses": [],
|
||||
"locator": "{{ET_GRID}}",
|
||||
"service_codes": [
|
||||
"PUBLIC"
|
||||
],
|
||||
"http_addr": "localhost:8080",
|
||||
"motd": [
|
||||
"Open source Winlink client - getpat.io"
|
||||
],
|
||||
"connect_aliases": {
|
||||
"telnet": "telnet://{mycall}:CMSTelnet@cms.winlink.org:8772/wl2k"
|
||||
},
|
||||
"listen": [ "{{ET_WINLINK_LISTEN}}" ],
|
||||
"hamlib_rigs": {
|
||||
"et-rig": {
|
||||
"address": "localhost:4532",
|
||||
"network": "tcp"
|
||||
}
|
||||
},
|
||||
"ax25": {
|
||||
"engine": "agwpe",
|
||||
"beacon": {
|
||||
"every": 3600,
|
||||
"message": "Winlink P2P",
|
||||
"destination": "IDENT"
|
||||
},
|
||||
"agwpe": {"addr": "localhost:8000", "radio_port": 0}
|
||||
},
|
||||
"serial-tnc": {
|
||||
"path": "/dev/ttyUSB0",
|
||||
"serial_baud": 9600,
|
||||
"hbaud": 1200,
|
||||
"type": "Kenwood"
|
||||
},
|
||||
"ardop": {
|
||||
"addr": "localhost:8515",
|
||||
"arq_bandwidth": {
|
||||
"Forced": false,
|
||||
"Max": 500
|
||||
},
|
||||
"rig": "et-rig",
|
||||
"ptt_ctrl": true,
|
||||
"beacon_interval": 0,
|
||||
"cwid_enabled": true
|
||||
},
|
||||
"pactor": {
|
||||
"path": "/dev/ttyUSB0",
|
||||
"baudrate": 57600,
|
||||
"rig": "",
|
||||
"custom_init_script": ""
|
||||
},
|
||||
"telnet": {
|
||||
"listen_addr": ":8774",
|
||||
"password": ""
|
||||
},
|
||||
"varahf": {
|
||||
"host": "localhost",
|
||||
"cmdPort": 8300,
|
||||
"dataPort": 8301,
|
||||
"bandwidth": 2300,
|
||||
"rig": "",
|
||||
"ptt_ctrl": false
|
||||
},
|
||||
"varafm": {
|
||||
"host": "localhost",
|
||||
"cmdPort": 8300,
|
||||
"dataPort": 8301,
|
||||
"bandwidth": 0,
|
||||
"rig": "",
|
||||
"ptt_ctrl": false
|
||||
},
|
||||
"gpsd": {
|
||||
"enable_http": false,
|
||||
"allow_forms": false,
|
||||
"use_server_time": false,
|
||||
"addr": "localhost:2947"
|
||||
},
|
||||
"schedule": {},
|
||||
"version_reporting_disabled": false
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Purpose : User systemd unit file for EmComm Tools ARDOP service
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-ardop
|
||||
# Start service : systemctl --user start et-service-ardop
|
||||
# Stop service : systemctl --user stop et-service-ardop
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools ARDOP service
|
||||
# Disable conditional check for audio device. Allow et-ardop to enforce.
|
||||
#ConditionPathExists=/dev/et-audio
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-ardop
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 13 January 2025
|
||||
# Purpose : User systemd unit file for EmComm Tools Dire Wolf 300 baud
|
||||
# : packet service.
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-direwolf-300
|
||||
# Start service : systemctl --user start et-service-direwolf-300
|
||||
# Stop service : systemctl --user stop et-service-direwolf-300
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Dire Wolf 300 baud packet service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-direwolf start 300
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 13 January 2025
|
||||
# Purpose : User systemd unit file for EmComm Tools Dire Wolf 9600 baud
|
||||
# : packet service.
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-direwolf-9600
|
||||
# Start service : systemctl --user start et-service-direwolf-9600
|
||||
# Stop service : systemctl --user stop et-service-direwolf-9600
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Dire Wolf 9600 baud packet service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-direwolf start 9600
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,23 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Updated : 8 November
|
||||
# Purpose : User systemd unit file for EmComm Tools Dire Wolf APRS digipeater packet
|
||||
# : service.
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-direwolf-aprs-digipeater
|
||||
# Start service : systemctl --user start et-service-direwolf-aprs-digipeater
|
||||
# Stop service : systemctl --user stop et-service-direwolf-aprs-digipeater
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Dire Wolf APRS digipeater service
|
||||
# Disable conditional check for audio device. Allow et-ardop to enforce.
|
||||
#ConditionPathExists=/dev/et-audio
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-direwolf start aprs-digipeater
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,22 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 8 November 2024
|
||||
# Purpose : User systemd unit file for EmComm Tools Dire Wolf packet digipeater packet
|
||||
# : service.
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-direwolf-packet-digipeater
|
||||
# Start service : systemctl --user start et-service-direwolf-packet-digipeater
|
||||
# Stop service : systemctl --user stop et-service-direwolf-packet-digipeater
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Dire Wolf packet digipeater service
|
||||
# Disable conditional check for audio device. Allow et-ardop to enforce.
|
||||
#ConditionPathExists=/dev/et-audio
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-direwolf start packet-digipeater
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,22 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Purpose : User systemd unit file for EmComm Tools Dire Wolf simple packet
|
||||
# : service.
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-direwolf-simple
|
||||
# Start service : systemctl --user start et-service-direwolf-simple
|
||||
# Stop service : systemctl --user stop et-service-direwolf-simple
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Dire Wolf simple packet service
|
||||
# Disable conditional check for audio device. Allow et-ardop to enforce.
|
||||
#ConditionPathExists=/dev/et-audio
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-direwolf start simple
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,19 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Purpose : User systemd unit file for EmComm Tools Winlink over ARDOP
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-winlink-ardop
|
||||
# Start service : systemctl --user start et-service-winlink-ardop
|
||||
# Stop service : systemctl --user stop et-service-winlink-ardop
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Winlink ARDOP service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-winlink start-ardop
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,19 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 3 February 2025
|
||||
# Purpose : User systemd unit file for EmComm Tools Winlink over packet
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-winlink-native-packet
|
||||
# Start service : systemctl --user start et-service-winlink-native-packet
|
||||
# Stop service : systemctl --user stop et-service-winlink-native-packet
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Winlink native AX.25 packet service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-winlink start-native-packet
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,19 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Purpose : User systemd unit file for EmComm Tools Winlink over packet
|
||||
#
|
||||
# Usage:
|
||||
# Check status : systemctl --user status et-service-winlink-packet
|
||||
# Start service : systemctl --user start et-service-winlink-packet
|
||||
# Stop service : systemctl --user stop et-service-winlink-packet
|
||||
# Reload this config : systemctl --user daemon-reload
|
||||
|
||||
[Unit]
|
||||
Description=EmComm Tools Winlink packet service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/bin/et-winlink start-packet
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -17,17 +17,33 @@ conky.config = {
|
||||
};
|
||||
|
||||
conky.text = [[
|
||||
${font DejaVu Sans Mono:size=12}${alignc}${time %A, %B %d %Y}
|
||||
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}DATE/TIME
|
||||
${font DejaVu Sans Mono:size=11}${color yellow}${alignc}${time %A, %B %d %Y}
|
||||
Local: ${alignr}${time %H:%M:%S}
|
||||
UTC: ${alignr}${tztime UTC %H:%M:%S}
|
||||
Uptime: ${uptime}
|
||||
GPS Time: ${alignr}${execpi 30 et-system-info et-time}
|
||||
|
||||
IP: ${execpi 60 /opt/emcomm-tools/bin/et-system-info ip}
|
||||
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}SYSTEM
|
||||
${font DejaVu Sans Mono:size=11}${color yellow}Uptime : ${uptime}
|
||||
CPU Util : ${cpu}%
|
||||
Disk Free: ${fs_free /}
|
||||
|
||||
Radio: ${execpi 10 et-system-info active-radio}
|
||||
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}NETWORK
|
||||
${font DejaVu Sans Mono:size=11}${color yellow}IP: ${execpi 60 /opt/emcomm-tools/bin/et-system-info ip}
|
||||
|
||||
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}INTERFACES
|
||||
${font DejaVu Sans Mono:size=11}${color yellow}Radio: ${execpi 10 et-system-info active-radio}
|
||||
CAT : ${execpi 10 et-system-info et-cat}
|
||||
GPS : ${execpi 10 et-system-info et-gps}
|
||||
Audio: ${execpi 10 et-system-info et-audio}
|
||||
|
||||
${font DejaVu Sans Mono:size=10}${alignc}${execp /opt/emcomm-tools/bin/et-system-info release}
|
||||
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}OPERATOR
|
||||
${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign}
|
||||
Grid : ${execpi 10 et-system-info grid}
|
||||
|
||||
${font DejaVu Sans:bold:size=10}${color white}${alignc}MODE
|
||||
${font DejaVu Sans:bold:size=11}${color red}${alignc}${execpi 10 et-system-info et-mode}
|
||||
|
||||
${font DejaVu Sans:bold:size=9}${color grey}${alignc}${execp /opt/emcomm-tools/bin/et-system-info release}
|
||||
]];
|
||||
|
||||
|
||||
1
overlay/etc/skel/.inputrc
Normal file
1
overlay/etc/skel/.inputrc
Normal file
@@ -0,0 +1 @@
|
||||
set bell-style none
|
||||
3
overlay/etc/skel/.java/.userPrefs/org/ka2ddo/prefs.xml
Normal file
3
overlay/etc/skel/.java/.userPrefs/org/ka2ddo/prefs.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||
<map MAP_XML_VERSION="1.0"/>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||
<map MAP_XML_VERSION="1.0">
|
||||
<entry key="ambiguity" value="1.6666666E-4"/>
|
||||
<entry key="beaconName" value="MYCALL"/>
|
||||
<entry key="ctcss" value="TOFF"/>
|
||||
<entry key="decayRatio" value="2"/>
|
||||
<entry key="digipeaters" value="WIDE1-1;WIDE1-1,WIDE2-1"/>
|
||||
<entry key="directionality" value="0"/>
|
||||
<entry key="enabled" value="true"/>
|
||||
<entry key="fixedAltitudeM" value="NaN"/>
|
||||
<entry key="freeText" value="ETC R3 APMAIL WINLINK"/>
|
||||
<entry key="gain" value="0"/>
|
||||
<entry key="height" value="0"/>
|
||||
<entry key="initialRateSecs" value="60"/>
|
||||
<entry key="latitude" value="33.0"/>
|
||||
<entry key="longitude" value="-112.0"/>
|
||||
<entry key="monitorFreq" value="0.0"/>
|
||||
<entry key="offset" value="0"/>
|
||||
<entry key="positionType" value="NO_TIME_W_MESSAGING"/>
|
||||
<entry key="power" value="0"/>
|
||||
<entry key="reportAltitude" value="false"/>
|
||||
<entry key="reportSpeed" value="false"/>
|
||||
<entry key="showDFS" value="false"/>
|
||||
<entry key="showPHG" value="false"/>
|
||||
<entry key="slowRateSecs" value="1800"/>
|
||||
<entry key="status" value="7"/>
|
||||
<entry key="symTableId" value="/"/>
|
||||
<entry key="symbolCode" value="["/>
|
||||
<entry key="type" value="POSITION"/>
|
||||
<entry key="useGpsForPosition" value="true"/>
|
||||
<entry key="useWeather" value="false"/>
|
||||
</map>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||
<map MAP_XML_VERSION="1.0"/>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||
<map MAP_XML_VERSION="1.0">
|
||||
<entry key="TEMP1" value="true,false,false"/>
|
||||
<entry key="WIDE1" value="true,false,true"/>
|
||||
<entry key="WIDE2" value="true,false,true"/>
|
||||
</map>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||
<map MAP_XML_VERSION="1.0">
|
||||
<entry key="Port1" value="KISS-over-TCP,localhost,8001,{{ET_CALLSIGN}},,true,TEMP1;;true;false;1;0/-120/10;0;MYCALL"/>
|
||||
<entry key="Port2" value="GPSD,localhost,2947,,,false;;true;false;1;0/-120/10;0;"/>
|
||||
<entry key="Port3" value="Serial_TNC,/dev/rfcomm0,1200,{{ET_CALLSIGN}},,true,TEMP1;;true;false;1;0/-120/10;0;"/>
|
||||
</map>
|
||||
@@ -0,0 +1,3 @@
|
||||
[Setup]
|
||||
host = localhost
|
||||
callsign = N0CALL
|
||||
1
overlay/etc/skel/.local/share/pat/rmslist.json
Normal file
1
overlay/etc/skel/.local/share/pat/rmslist.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,6 @@
|
||||
# Adding a Map to Navit
|
||||
# Adding Maps to Navit (Option 1)
|
||||
|
||||
Note: Use this approach if you only need offline maps for Navit.
|
||||
|
||||
1. Visit [Navit - Planet Extractor](http://maps3.navit-project.org/)
|
||||
|
||||
@@ -17,26 +19,49 @@ Note: The current Navit configuration specifies the map directory using
|
||||
with a `*.bin` extension will automatically be supported.
|
||||
|
||||
|
||||
## Loading Larger Maps (OSM)
|
||||
## Building Maps from Source OSM Data (Option 2)
|
||||
|
||||
If you have the storage and want larger maps, it is suggested that you
|
||||
use the OpenStreetMap (OSM) extracts from http://download.geofabrik.de/.
|
||||
Note: Use this approach if need offline maps for Navit and YAAC. It will
|
||||
can also be used if you plan to run your own OSM tile server in the
|
||||
future.
|
||||
|
||||
Here's the approach used for loading a map for the Southwest region in
|
||||
the US.
|
||||
This approach requires that you download the desired `.pbf` OSM files and
|
||||
generate the binary maps for each application. The process can take a
|
||||
considerable amount of time and storage depending on the size of the map.
|
||||
|
||||
It is recommended that you limit the source OSM download to your state or
|
||||
region. As an example, the state of Arizona will be used.
|
||||
|
||||
1. Visit [North America](http://download.geofabrik.de/north-america.html).
|
||||
|
||||
2. Download the "US West" [.osm.bz2](http://download.geofabrik.de/north-america/us-west-latest.osm.bz2)
|
||||
file.
|
||||
2. Click _United States of America_ under _Sub Regions_.
|
||||
|
||||
3. Upload `us-west-latest.osm.bz2` to your `~/.navit/maps` directory.
|
||||
3. Download the desired state `.osm.pbf` file (i.e. arizona-latest.osm.pbf)
|
||||
|
||||
4. Convert the map to a format that Navit can understand. This will take several hours.
|
||||
### Generate Navit Map
|
||||
|
||||
1. Generate a `.bin` using `maptool`. This will generate `arizona-lastest.osm.bin`.
|
||||
This can take 5-10 minutes depending on your machine.
|
||||
|
||||
```
|
||||
$ cd ~/.navit/maps
|
||||
$ time bzcat us-west-latest.osm.bz2 | maptool -6 us-west-latest-osm.bin
|
||||
maptool --protobuf -i arizona-latest.osm.pbf arizona-lastest.osm.bin
|
||||
```
|
||||
|
||||
2. Move the generated `.bin` file to your user's navit map directory.
|
||||
|
||||
```
|
||||
mv arizona-latest.osm.pbf ~/.navit/maps/
|
||||
```
|
||||
|
||||
3. Keep the source `.osm.pbf` as you will need it for the YAAC map import.
|
||||
|
||||
|
||||
### Generate YAAC Map
|
||||
|
||||
1. Start YAAC with `et-yaac`.
|
||||
|
||||
2. Navigate to _File_ > _OpenStreetMap_ > _Import RAW OSM Map File_.
|
||||
|
||||
3. Select the `.osm.pbf` that you downloaded earlier.
|
||||
|
||||
4. This will take 5-10 minutes for state-level map files.
|
||||
|
||||
@@ -69,26 +69,24 @@
|
||||
The action that appears on map click is configurable with the attribute "on_map_click".
|
||||
To get the previous behaviour of showing the map point menu use on_map_click='menu("#Map Point")'
|
||||
-->
|
||||
<gui type="internal" enabled="yes" fullscreen="1" font_size="500" icon_xs="48" icon_s="48" icon_l="192"><![CDATA[
|
||||
<gui type="internal" enabled="yes" fullscreen="1" font_size="460" icon_xs="48" icon_s="48" icon_l="128"><![CDATA[
|
||||
<html>
|
||||
<a name='Main Menu'><text>Main menu</text>
|
||||
<a href='#Actions'><img src='gui_actions'>Actions</img></a>
|
||||
<a href='#Actions'><img src='navit'>Navigation</img></a>
|
||||
<img cond='flags&2' src='gui_map' onclick='back_to_map()'><text>Show
|
||||
Map</text></img>
|
||||
<a href='#Settings'><img src='gui_settings'><text>Settings</text></img></a>
|
||||
<a href='#Tools'><img src='gui_tools'><text>Tools</text></img></a>
|
||||
<a href='#Route'><img src='gui_settings'><text>Route</text></img></a>
|
||||
<img src='gui_about' onclick='about()'><text>About</text></img>
|
||||
<a href='#Settings'><img src='gui_rules'><text>Settings</text></img></a>
|
||||
<a href='#Route'><img src='gui_maps'><text>Route</text></img></a>
|
||||
<img src='gui_quit' onclick='quit()'><text>Quit</text></img>
|
||||
</a>
|
||||
<a name='Actions'><text>Actions</text>
|
||||
<img src='gui_bookmark' onclick='bookmarks()'><text>Bookmarks</text></img>
|
||||
<img src='gui_formerdests' onclick='formerdests()'><text>Former
|
||||
Destinations</text></img>
|
||||
<img cond='click_coord_geo' src='gui_map' onclick='position(click_coord_geo,_("Map Point"),8|16|32|64|256)'><script>write(click_coord_geo)</script></img>
|
||||
<img cond='position_coord_geo' src='gui_vehicle' onclick='position(position_coord_geo,_("Vehicle Position"),8|32|64|128|256)'><script>write(position_coord_geo)</script></img>
|
||||
<img src='gui_town' onclick='town()'><text>Town</text></img>
|
||||
<img src='gui_map' onclick='enter_coord()'><text>Coordinates</text></img>
|
||||
<img cond='click_coord_geo' src='gui_map' onclick='position(click_coord_geo,_("Current Map Position"),8|16|32|64|256)'><script>write(click_coord_geo)</script></img>
|
||||
<img cond='position_coord_geo' src='gui_vehicle' onclick='position(position_coord_geo,_("Current Vehicle Position"),8|32|64|128|256)'><script>write("Vehicle Position")</script></img>
|
||||
<img src='gui_zoom_route' onclick='town()'><text>Address Search</text></img>
|
||||
<img src='follow' onclick='enter_coord()'><text>Enter Lat/Lon</text></img>
|
||||
<img cond='navit.route.route_status&1' src='gui_stop' onclick='abort_navigation();refresh()'><text>Stop
|
||||
Navigation</text></img>
|
||||
</a>
|
||||
@@ -112,12 +110,11 @@ Navigation</text></img>
|
||||
<a href='#Settings Layers'><img src='gui_layers'><text>Layers</text></img></a>
|
||||
</a>
|
||||
<a name='Tools'><text>Tools</text>
|
||||
<img src='gui_actions' onclick='locale()'><text>Show Locale</text></img>
|
||||
<img src='gui_tools' onclick='network_info()'><text>Network info</text></img>
|
||||
</a>
|
||||
<a name='Route'><text>Route</text>
|
||||
<img cond='navit.route.route_status&1' src='gui_zoom_route' onclick='navit.zoom_to_route();redraw_map();back_to_map()'><text>Zoom to route</text></img>
|
||||
<img src='gui_actions' onclick='route_description()'><text>Description</text></img>
|
||||
<img src='gui_log' onclick='route_description()'><text>Directions</text></img>
|
||||
<img src='gui_heightprofile' onclick='route_height_profile()'><text>Height Profile</text></img>
|
||||
<img cond='navit.waypoints_flag && (navit.route.route_status&1)' src='cursor_still' onclick='waypoints()'><text>Waypoints</text></img>
|
||||
<img cond='navit.waypoints_flag && (navit.route.route_status&1)' src='gui_stop' onclick='navit.route_remove_last_waypoint()'><text>Drop last
|
||||
@@ -190,8 +187,66 @@ Waypoint</text></img>
|
||||
<!-- osd items allow to position display and control items directly on top of the map.
|
||||
You can find a list of all the available OSDs items here:
|
||||
http://wiki.navit-project.org/index.php/OSD -->
|
||||
<osd enabled="yes" type="compass"/>
|
||||
<osd enabled="yes" type="navigation_next_turn"/>
|
||||
|
||||
<!-- Top left -->
|
||||
<osd enabled="yes" type="compass" x="-64" y="-108" w="64" h="64"/>
|
||||
|
||||
<!--
|
||||
| The OSD configuration that follows is taken from the post below. It has been modified to suite the
|
||||
| Pansonic FZ-M1 at its native 1280x800 resolution with 125% scaling"
|
||||
|
|
||||
| Post: https://ozzmaker.com/navigating-navit-raspberry-pi/
|
||||
| Configuration: https://ozzmaker.com/downloads/navit-OSD-800-480.txt
|
||||
-->
|
||||
|
||||
<!-- Distance to Next Maneouvre -->
|
||||
<osd enabled="yes" type="text" label="${navigation.item[1].length[named]}" x="0" y="0" font_size="350" w="75" h="30" align="0" background_color="#000000c8" osd_configuration="2" />
|
||||
|
||||
<!-- Next Maneouvre Icon -->
|
||||
<osd enabled="yes" type="navigation_next_turn" x="0" y="30" background_color="#000000c8" w="75" osd_configuration="2" />
|
||||
|
||||
<!-- Next Road -->
|
||||
<osd enabled="yes" type="text" label=" ${navigation.item[1].street_name} ${navigation.item[1].street_name_systematic}" x="75" y="0" font_size="450" w="824" h="40" align="4" background_color="#000000c8" osd_configuration="2" />
|
||||
|
||||
<!-- TOP RIGHT -->
|
||||
<!-- Route Distance -->
|
||||
<osd enabled="yes" type="text" label="Dist ${navigation.item.destination_length[named]}" w="125" h="20" x="-125" y="0" font_size="300" align="8" background_color="#000000c8" osd_configuration="2" />
|
||||
<!-- Arrival Time -->
|
||||
<osd enabled="yes" type="text" label="ETA ${navigation.item.destination_time[arrival]}" x="-125" y="20" font_size="300" w="125" h="20" align="8" background_color="#000000c8" osd_configuration="2" />
|
||||
|
||||
<!-- BOTTOM -->
|
||||
<!-- Current Altitude -->
|
||||
<osd enabled="yes" type="text" label="${vehicle.position_height}" x="0" y="-20" font_size="300" w="60" h="20" align="4" background_color="#000000c8"/>
|
||||
<!-- Current Direction -->
|
||||
<osd enabled="yes" type="text" label="ALT" x="0" y="-40" font_size="200" w="60" h="20" align="4" background_color="#000000c8"/>
|
||||
<!-- Current Street -->
|
||||
<osd enabled="yes" type="text" label="${tracking.item.street_name} ${tracking.item.street_name_systematic}" x="60" y="-40" font_size="500" w="764" h="40" align="4" background_color="#000000c8"/>
|
||||
<!-- Speed Warner -->
|
||||
<osd enabled="yes" type="speed_warner" w="100" h="40" x="-300" y="-40" font_size="500" speed_exceed_limit_offset="15" speed_exceed_limit_percent="10" announce_on="1" background_color="#00000000" label="text_only" align="8"/>
|
||||
<!-- Current Speed -->
|
||||
<osd enabled="yes" type="text" label="${vehicle.position_speed}" x="-200" y="-40" font_size="500" w="150" h="40" align="0" background_color="#000000c8"/>
|
||||
<!-- GPS Status -->
|
||||
<osd enabled="yes" type="gps_status" x="-50" y="-40" w="50" h="40" background_color="#000000c8"/>
|
||||
|
||||
<!-- RIGHT CONTROLS -->
|
||||
<osd type="button" x="-65" y="55" command="zoom_in()" src="zoom_in.png" w="64" h="64" />
|
||||
<osd enabled="yes" type="scale" x="-90" y="290" font_size="150" w="100" h="30" align="0"/>
|
||||
<osd type="button" x="-65" y="150" command="zoom_out()" src="zoom_out.xpm" w="64" h="64" />
|
||||
|
||||
|
||||
<!-- Enable/Disable routing information depending upon the route status -->
|
||||
<osd name="my_osd_cmdif_2" h="1" w="1" update_period="2" enabled="yes" type="cmd_interface" x="-100" y="-100" command='osd_configuration=
|
||||
route.route_status==1 ? 1 :
|
||||
(route.route_status==0 ? 1 :
|
||||
(route.route_status==3 ? 1 :
|
||||
(route.route_status==5 ? 1 :
|
||||
(route.route_status==13 ? 1 :
|
||||
(route.route_status==17 ? 2 :
|
||||
(route.route_status==33 ? 2 : 1
|
||||
)))))))
|
||||
' />
|
||||
|
||||
<!-- End of import from ozzmaker article -->
|
||||
|
||||
<!-- Commands include gui_internal_menu, gui_internal_fullscreen, zoom_in and zoom_out.
|
||||
Usage of negative values change the button origins. x="0" y="0" specifies the top left, x="-0" y="-0" the bottom right corner.
|
||||
@@ -199,17 +254,13 @@ Waypoint</text></img>
|
||||
<osd enabled="no" type="button" x="0" y="0" command="gui.fullscreen=!gui.fullscreen" src="toggle_fullscreen.png"/>
|
||||
<osd enabled="no" type="button" x="-96" y="0" command="gui.menu(1)" src="menu.png"/>
|
||||
|
||||
<!-- Zoom out: top-right -->
|
||||
<osd enabled="yes" type="button" x="-96" y="0" w="64" h="64" command="zoom_out()" src="zoom_out.png"/>
|
||||
|
||||
<!-- Zoom in: bottom-right -->
|
||||
<osd enabled="yes" type="button" x="-96" y="-96" w="64" h="64" command="zoom_in()" src="zoom_in.png"/>
|
||||
|
||||
<!-- Traffic -->
|
||||
<traffic type="null"/>
|
||||
|
||||
<!-- Vehicle with GPS enabled for gpsd on unix -->
|
||||
<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="gpsd://localhost" gpsd_query="w+xj">
|
||||
<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="gpsd://localhost" gpsd_query="w+xj" follow="2">
|
||||
<!-- Vehicle with GPS enabled for direct communication on windows. Remove the line above if you use this. -->
|
||||
<!-- <vehicle name="Local GPS" profilename="car" follow="1" enabled="yes" active="1"
|
||||
source="serial:COM4 baudrate=4800 parity=N data=8 stop=1" > -->
|
||||
|
||||
2
overlay/etc/skel/add-ons/wine/.gitignore
vendored
Normal file
2
overlay/etc/skel/add-ons/wine/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.exe
|
||||
*.zip
|
||||
27
overlay/etc/skel/add-ons/wine/01-install-wine-deps.sh
Executable file
27
overlay/etc/skel/add-ons/wine/01-install-wine-deps.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 1 February 2025
|
||||
# Purpose : Install wine dependencies to support VARA install
|
||||
set -e
|
||||
|
||||
source ./common-checks.sh
|
||||
|
||||
if [[ ! -e ${WINEPREFIX} ]]; then
|
||||
winetricks \
|
||||
--unattended \
|
||||
--force \
|
||||
winxp \
|
||||
sound=alsa \
|
||||
dotnet35sp1 \
|
||||
vb6run
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
show-err-dialog "Failed to instaill WINE dependencies."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${WINEPREFIX} already exists. Skipping WINE dependency installation.\n"
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Run ${WHITE}./02-install-vara-hf.sh${YELLOW} to install VARA HF.${NC}"
|
||||
34
overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh
Executable file
34
overlay/etc/skel/add-ons/wine/02-install-vara-hf.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 28 February 2025
|
||||
# Purpose : Install VARA HF
|
||||
|
||||
source ./common-checks.sh
|
||||
|
||||
VARA_HOME="${HOME}/.wine32/drive_c/VARA"
|
||||
VARA_PATTERN="VARA%20HF"
|
||||
|
||||
./vara-downloader.sh "${VARA_PATTERN}"
|
||||
[[ $? -ne 0 ]] && et-log "Error downloading VARA HF" && exit 1
|
||||
|
||||
DOWNLOAD_FILE=$(ls *.zip | grep "${VARA_PATTERN}")
|
||||
[[ ! -e "${DOWNLOAD_FILE}" ]] && et-log "VARA download file not found" && exit 1
|
||||
|
||||
unzip -o ${DOWNLOAD_FILE}
|
||||
|
||||
wine 'VARA setup (Run as Administrator).exe'
|
||||
|
||||
if [ ! -e "${VARA_HOME}/nt4pdhdll.exe" ]; then
|
||||
et-log "Install missing DLL..."
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
cd ${VARA_HOME}
|
||||
curl -s -f -L -O \
|
||||
http://download.microsoft.com/download/winntsrv40/update/5.0.2195.2668/nt4/en-us/nt4pdhdll.exe && unzip nt4pdhdll.exe
|
||||
cd ${CWD}
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Run ${WHITE}./03-install-vara-fm.sh${YELLOW} to install VARA FM.${NC}"
|
||||
33
overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh
Executable file
33
overlay/etc/skel/add-ons/wine/03-install-vara-fm.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 18 March 2025
|
||||
# Purpose : Install VARA FM
|
||||
source ./common-checks.sh
|
||||
|
||||
VARA_HOME="$HOME/.wine32/drive_c/VARA FM"
|
||||
VARA_PATTERN="VARA%20FM"
|
||||
|
||||
./vara-downloader.sh "${VARA_PATTERN}"
|
||||
[[ $? -ne 0 ]] && et-log "Error downloading VARA FM" && exit 1
|
||||
|
||||
DOWNLOAD_FILE=$(ls *.zip | grep "${VARA_PATTERN}")
|
||||
[[ ! -e "${DOWNLOAD_FILE}" ]] && et-log "VARA download file not found" && exit 1
|
||||
|
||||
unzip -o ${DOWNLOAD_FILE}
|
||||
|
||||
wine 'VARA FM setup (Run as Administrator).exe'
|
||||
|
||||
if [ ! -e "${VARA_HOME}/nt4pdhdll.exe" ]; then
|
||||
et-log "Install missing DLL..."
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
cd "${VARA_HOME}"
|
||||
curl -s -f -L -O \
|
||||
http://download.microsoft.com/download/winntsrv40/update/5.0.2195.2668/nt4/en-us/nt4pdhdll.exe && unzip nt4pdhdll.exe
|
||||
cd ${CWD}
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Run ${WHITE}./04-run-regedit.sh${YELLOW} to run registry editor.${NC}"
|
||||
17
overlay/etc/skel/add-ons/wine/04-run-regedit.sh
Executable file
17
overlay/etc/skel/add-ons/wine/04-run-regedit.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 4 February 2025
|
||||
# Purpose : Run regedit
|
||||
set -e
|
||||
|
||||
source ./common-checks.sh
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Expand HKEY_LOCAL_MACHINE > Software > Wine > Ports"
|
||||
echo -e "2. In the main pain, right-click and select 'New' > 'String Value'"
|
||||
echo -e "3. Set the name to ${WHITE}COM10${YELLOW} and the value to ${WHITE}/dev/et-cat${YELLOW}"
|
||||
echo -e "4. Close the Registry Editor application"
|
||||
echo -e "${NC}"
|
||||
|
||||
wine regedit
|
||||
32
overlay/etc/skel/add-ons/wine/05-backup-wine-install.sh
Executable file
32
overlay/etc/skel/add-ons/wine/05-backup-wine-install.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 February 2025
|
||||
# Purpose : Backup the ~/.wine32 directory for use in ETC image inclusion.
|
||||
|
||||
TODAY=$(date +"%Y%m%d")
|
||||
BACKUP_FILE="${HOME}/etc-wine-backup-${HOSTNAME}-${TODAY}.tar.gz"
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
if [ -e "${BACKUP_FILE}" ]; then
|
||||
echo -e -n "${RED}A backup file for today exists. Can ${WHITE}${BACKUP_FILE} ${RED}be overwritten? (y/n) ${NC}"
|
||||
read response
|
||||
[[ $response != [yY] ]] && echo "Skipping backup and exiting." && exit 1
|
||||
fi
|
||||
|
||||
# All paths are relative to $HOME.
|
||||
BACKUP_DIRS=(
|
||||
".wine32"
|
||||
)
|
||||
|
||||
tar -czf ${BACKUP_FILE} \
|
||||
--transform 's|^.*\.local|.local|' \
|
||||
-C "${HOME}" "${BACKUP_DIRS[@]}"
|
||||
|
||||
[ $? -ne 0 ] && et-log "Error creating backup" && exit 1
|
||||
|
||||
# Test that we can read if after we create it.
|
||||
TAR_OUT=$(tar -tzf ${BACKUP_FILE})
|
||||
[ $? -ne 0 ] && et-log "Can't read backup file: ${BACKUP_FILE}. Error creating backup." && exit 1
|
||||
|
||||
echo -e "${GREEN}Backup created: ${WHITE}${BACKUP_FILE}\n"
|
||||
55
overlay/etc/skel/add-ons/wine/README.md
Normal file
55
overlay/etc/skel/add-ons/wine/README.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Installing Windows Applications
|
||||
|
||||
The following instructions only need to be run once. They should be run
|
||||
in this directory as your normal user (do not use 'sudo').
|
||||
|
||||
1. Install the WINE dependencies.
|
||||
|
||||
./01-install-wine-deps.sh
|
||||
|
||||
2. Install VARA HF. Accept the default settings and uncheck Launch My Program
|
||||
when prompted during the installation.
|
||||
|
||||
./02-install-vara-hf.sh
|
||||
|
||||
3. Install VARA FM. Accept the default settings and uncheck Launch My Program
|
||||
when prompted during the installation.
|
||||
|
||||
./03-install-vara-fm.sh
|
||||
|
||||
4. Run the registry editor. Follow the instructions in the terminal. In
|
||||
this step we will need to map COM port 10 (COM10) to the EmComm Tools
|
||||
CAT control device (/dev/et-cat).
|
||||
|
||||
./04-run-regedit.sh
|
||||
|
||||
5. If you want to include your WINE installation in a future EmComm Tools
|
||||
Community image build, run the following to make a backup of your WINE
|
||||
installation now.
|
||||
|
||||
./05-backup-wine-install.sh
|
||||
|
||||
It is important that you do not run any of the VARA programs until after
|
||||
the backup is run in step 5.
|
||||
|
||||
## Including VARA in an ETC ISO image
|
||||
|
||||
If you want to include VARA in a future EmComm Tools Community image build,
|
||||
perform the following in Cubic after the main install script is finished.
|
||||
|
||||
1. Change into the `/etc/skel` directory.
|
||||
|
||||
2. Copy the WINE backup file created in step 5 using the file copy option
|
||||
in Cubic (i.e. `etc-wine-backup-HOST-YYYYMMDD.tar.gz`).
|
||||
|
||||
3. Unpack the backup file. This will create `/etc/skel/.wine32`.
|
||||
|
||||
```
|
||||
tar -xzf etc-wine-backup-*
|
||||
```
|
||||
|
||||
4. Delete the backup file on the Cubic session to save on space.
|
||||
|
||||
```
|
||||
rm etc-wine-backup-*
|
||||
```
|
||||
35
overlay/etc/skel/add-ons/wine/common-checks.sh
Executable file
35
overlay/etc/skel/add-ons/wine/common-checks.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 February 2025
|
||||
# Updated : 18 March 2025
|
||||
# Purpose : Performs various checks to ensure that changes can be made
|
||||
# to a user's local WINE installation.
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
WINE_OUT=$(which winetricks)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "${RED}Wine is not installed. As root, first run: ${WHITE}/root/emcomm-tools-os-community/scripts/install-wine.sh${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${EUID}" -eq 0 ]]; then
|
||||
echo -e "${RED}This script must not be run as root. Run it as your normal user.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${WINEARCH}" ]]; then
|
||||
echo -e "The WINEARCH environment variable is not set. Setting it for you."
|
||||
export WINEARCH="win64"
|
||||
fi
|
||||
|
||||
if [[ -z "${WINEPREFIX}" ]]; then
|
||||
echo -e "The WINEPREFIX environment variable is not set. Setting it for you."
|
||||
export WINEPREFIX="${HOME}/.wine32"
|
||||
fi
|
||||
|
||||
if [[ -z "${DISPLAY}" && -z "${WAYLAND_DISPLAY}" ]]; then
|
||||
echo -e "${RED}No graphical environment detected. Run this command from a desktop session.${NC}"
|
||||
echo -e "${RED}This can't be run from within Cubic.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
49
overlay/etc/skel/add-ons/wine/vara-downloader.sh
Executable file
49
overlay/etc/skel/add-ons/wine/vara-downloader.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 28 February 2025
|
||||
# Purpose : Download utility for VARA applications
|
||||
|
||||
BASE_HTML_FILE="vara-index.html"
|
||||
|
||||
cleanup() {
|
||||
[[ -f "$BASE_HTML_FILE" ]] && rm "${BASE_HTML_FILE}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <pattern>"
|
||||
echo " pattern - VARA filename substring pattern to match on"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILENAME_PATTERN="$1"
|
||||
BASE_URL="https://downloads.winlink.org"
|
||||
INDEX_URL="${BASE_URL}/VARA%20Products/"
|
||||
|
||||
# 1. Fetch main VARA download page as HTML
|
||||
curl -s -f -L -o ${BASE_HTML_FILE} ${INDEX_URL}
|
||||
[[ $? -ne 0 ]] && et-log "Error fetching VARA index page: ${BASE_URL}" && exit 1
|
||||
|
||||
# 2. Extract all links from index page
|
||||
VARA_FILE_PATH=$(cat ${BASE_HTML_FILE} | pup 'a attr{href}' | grep "${FILENAME_PATTERN}")
|
||||
[[ $? -ne 0 ]] && et-log "Error finding VARA file matching specified pattern" && exit 1
|
||||
|
||||
|
||||
#3. Check for multiple matches
|
||||
if [[ "${VARA_FILE_PATH}" =~ [[:space:]] ]]; then
|
||||
echo -e "\n${VARA_FILE_PATH}\n"
|
||||
et-log "Multiple files matched. Try again with a more specific pattern."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FULL_URL="${BASE_URL}${VARA_FILE_PATH}"
|
||||
et-log "Found ${VARA_FILE_PATH}"
|
||||
et-log "Downloading: ${FULL_URL}"
|
||||
|
||||
curl -s -f -L -O "${FULL_URL}"
|
||||
exit $?
|
||||
17
overlay/etc/skel/notes/bbs-admin.md
Normal file
17
overlay/etc/skel/notes/bbs-admin.md
Normal file
@@ -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`.
|
||||
24
overlay/etc/skel/notes/offline-sites.md
Normal file
24
overlay/etc/skel/notes/offline-sites.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Offline Site Recommendations
|
||||
|
||||
This is a list of online resources that I personally store locally
|
||||
for offline browsing. This list will grow over time.
|
||||
|
||||
Run `et-mirror.sh <start_url>` to mirror the site. For example:
|
||||
|
||||
```
|
||||
et-mirror.sh https://choisser.com/packet/`
|
||||
```
|
||||
|
||||
The above command will mirror the start URL https://choisser.com/packet/
|
||||
along with any pages within the site that it links to.
|
||||
|
||||
The mirrored site will be available in your home directory under the
|
||||
`offline-www` directory. You can open the files using the Min web browser.
|
||||
|
||||
|
||||
## Packet Radio
|
||||
|
||||
* https://choisser.com/packet/
|
||||
* https://www.cantab.net/users/john.wiseman/Documents/
|
||||
* https://soundcardpacket.org/
|
||||
* https://tldp.org/HOWTO/AX25-HOWTO/index.html
|
||||
30
overlay/etc/skel/wikipedia/README.md
Normal file
30
overlay/etc/skel/wikipedia/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Offline Knowledge Bases
|
||||
|
||||
There are several offline repositories that are made freely available
|
||||
using a `.zim` file. Depending on the resource, they can be quite large.
|
||||
EmComm Tools Community includes an offline reader called "Kiwix" for
|
||||
searching and reading these resources offline.
|
||||
|
||||
1. Visit: http://download.kiwix.org/zim/wikipedia/
|
||||
|
||||
2. To save space when building your image, consider some of the smaller
|
||||
Wikipedia topic areas, such as:
|
||||
|
||||
* `wikipedia_en_computer_nopic_YYYY-MM.zim`
|
||||
* `wikipedia_en_history_nopic_YYYY-MM.zim`
|
||||
* `wikipedia_en_mathematics_nopic_YYYY-MM.zim`
|
||||
* `wikipedia_en_medicine_nopic_2024-04.zim`
|
||||
* `wikipedia_en_simple_all_nopic_YYYY-MM.zim`
|
||||
|
||||
The full Wikipedia export without images is 56 GB. This file is better
|
||||
stored separately and excluded from the ETC ISO build image.
|
||||
|
||||
3. Copy these `.zim` file to `/etc/skel/wikipedia` during the image build.
|
||||
|
||||
4. Other high-value offline exports to look into are available at:
|
||||
|
||||
* https://download.kiwix.org/zim/ifixit/
|
||||
|
||||
5. Run `kiwix` after a fresh installation. Your .zim files will
|
||||
be available in your home directory in the `wikipedia` folder.
|
||||
|
||||
8
overlay/etc/sudoers.d/et-rfcomm
Normal file
8
overlay/etc/sudoers.d/et-rfcomm
Normal file
@@ -0,0 +1,8 @@
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /usr/bin/rfcomm *
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /usr/sbin/kissattach /dev/rfcomm0 *
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /usr/sbin/kissparms *
|
||||
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /usr/bin/killall kissattach
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /usr/bin/killall rfcomm
|
||||
|
||||
%bluetooth ALL=(ALL) NOPASSWD: /opt/emcomm-tools/bin/et-kill-bt
|
||||
19
overlay/etc/udev/rules.d/75-et-generic-remove.rules
Normal file
19
overlay/etc/udev/rules.d/75-et-generic-remove.rules
Normal file
@@ -0,0 +1,19 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 14 October 2024
|
||||
# Updated : 24 October 2024
|
||||
# Purpose : udev rules for generic remove events
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. CAT control device (or DigiRig Lite) is unplugged
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. rigctld is stopped
|
||||
|
||||
SUBSYSTEM=="tty", ENV{ET_SUBDEVICE}=="CAT", \
|
||||
ACTION=="remove", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-rigctld.sh stop"
|
||||
|
||||
|
||||
SUBSYSTEM=="sound",ENV{ET_SUBDEVICE}=="AUDIO", \
|
||||
ACTION=="remove", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-rigctld.sh stop"
|
||||
37
overlay/etc/udev/rules.d/78-et-ft991a.rules
Normal file
37
overlay/etc/udev/rules.d/78-et-ft991a.rules
Normal file
@@ -0,0 +1,37 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 8 December 2024
|
||||
# Purpose : udev rules for the Yaesu FT-991A via native USB
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Yaesu FT-991A is selected via et-radio
|
||||
# 2. Yaesu FT-991A is powered on and connected via USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. /dev/et-audio created
|
||||
# 3. rigctld is started
|
||||
#
|
||||
# CAUTION: The FT-991A is an experimental device that may impact the stability of the platform and may
|
||||
# not work 100% of the time. This device support is best effort only.
|
||||
|
||||
# Special rule to ensure that the first serial interface (/dev/ttyUSB4) is tagged as ET_DEVICE=FT-891 so
|
||||
# that it can be used in the next CAT control rule. The second serial device will not work (/dev/ttyUSB5)
|
||||
# if it is incorrectly detected as the /dev/et-cat device.
|
||||
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ft991a", \
|
||||
ATTRS{bInterfaceNumber}=="00", \
|
||||
ENV{ET_DEVICE}="FT-991A"
|
||||
|
||||
# CAT control device will only match if PROGRAM above matches (exit status=0)
|
||||
SUBSYSTEM=="tty", ENV{ET_DEVICE}=="FT-991A", \
|
||||
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70",\
|
||||
ACTION=="add", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# Audio device will only match if PROGRAM above matches (exit status=0)
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="29b3", \
|
||||
PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ft991a", \
|
||||
ACTION=="add", \
|
||||
ENV{ET_DEVICE}="FT-991A", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
37
overlay/etc/udev/rules.d/79-et-digirig-dr891.rules
Normal file
37
overlay/etc/udev/rules.d/79-et-digirig-dr891.rules
Normal file
@@ -0,0 +1,37 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 11 November 2024
|
||||
# Purpose : udev rules for the Yaesu FT-891 via the DigiRig DR-891
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Yaesu FT-891 is selected via et-radio
|
||||
# 2. Yaesu FT-891 is connected via DR-891 USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. /dev/et-audio created
|
||||
# 3. rigctld is started
|
||||
#
|
||||
# CAUTION: The FT-891 is an experimental device that may impact the stability of the platform and may
|
||||
# not work 100% of the time. This device support is best effort only.
|
||||
|
||||
# Special rule to ensure that the first serial interface (/dev/ttyUSB4) is tagged as ET_DEVICE=FT-891 so
|
||||
# that it can be used in the next CAT control rule. The second serial device will not work (/dev/ttyUSB5)
|
||||
# if it is incorrectly detected as the /dev/et-cat device.
|
||||
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ft891", \
|
||||
ATTRS{bInterfaceNumber}=="00", \
|
||||
ENV{ET_DEVICE}="FT-891"
|
||||
|
||||
# CAT control device will only match if PROGRAM above matches (exit status=0)
|
||||
SUBSYSTEM=="tty", ENV{ET_DEVICE}=="FT-891", \
|
||||
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70",\
|
||||
ACTION=="add", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# Audio device will only match if PROGRAM above matches (exit status=0)
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0012", \
|
||||
PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ft891", \
|
||||
ACTION=="add", \
|
||||
ENV{ET_DEVICE}="FT-891", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
@@ -1,6 +1,6 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 28 September 2024
|
||||
# Updated : 10 October 2024
|
||||
# Updated : 4 November 2024
|
||||
# Purpose : udev rules for the Icom IC-705
|
||||
#
|
||||
# Preconditions:
|
||||
@@ -9,6 +9,7 @@
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. /dev/et-gps created
|
||||
# 3. /dev/et-audio created
|
||||
# 3. rigctld is started
|
||||
# 4. gpsd is started
|
||||
#
|
||||
@@ -32,11 +33,11 @@ ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \
|
||||
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
|
||||
|
||||
# TODO: Make this rule more specific
|
||||
#
|
||||
# If we do not stop rigctld, the rigctl progress will continue to run and maintain
|
||||
# a stale reference to /dev/et-cat. This condition will prevent subsequent attach
|
||||
# and detatch events of the radio from working.
|
||||
SUBSYSTEM=="tty", ACTION=="remove", RUN+="/opt/emcomm-tools/sbin/wrapper-rigctld.sh stop"
|
||||
|
||||
# TODO: Add rules for sound card
|
||||
# This rule generically matches the following Icom radios:
|
||||
# 1. IC-705
|
||||
# 2. IC-7100
|
||||
# 3. IC-7200
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2901", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="Icom generic", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 29 September 2024
|
||||
# Updated : 4 November 2024
|
||||
# Purpose : udev rules for the Icom IC-7200
|
||||
#
|
||||
# Preconditions:
|
||||
@@ -7,7 +8,8 @@
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
#
|
||||
# 2. /dev/et-audio created
|
||||
# 3. rigctld started
|
||||
|
||||
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7200*", \
|
||||
ENV{ET_DEVICE}="IC-7200"
|
||||
@@ -17,6 +19,14 @@ KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7200*", \
|
||||
ENV{ET_DEVICE}=="IC-7200", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4" ATTRS{idProduct}=="ea60", \
|
||||
ACTION=="add", \
|
||||
ENV{SYSTEMD_WANTS}="", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat"
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# TODO: Add rules for sound card
|
||||
# This rule generically matches the following Icom radios:
|
||||
# 1. IC-705
|
||||
# 2. IC-7100
|
||||
# 3. IC-7200
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2901", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="Icom generic", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Author : William McKeehan (https://github.com/mckeehan)
|
||||
# Date : 30 September 2024
|
||||
# Updated : 5 October 2024
|
||||
# Updated : 4 November 2024
|
||||
# Purpose : udev rules for the Icom IC-7100
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. TODO: Document GPS settings for IC-7100 (Mike KC8OWL)
|
||||
# 2. GPS antenna connected to IC-7100
|
||||
# 3. IC-7200 connected via USB cable
|
||||
# 3. IC-7100 connected via USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. /dev/et-gps created
|
||||
# 3. rigctld is started
|
||||
# 4. /dev/et-audio created
|
||||
|
||||
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7100*", \
|
||||
ENV{ET_DEVICE}="IC-7100"
|
||||
@@ -21,7 +23,8 @@ KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7100*", \
|
||||
ENV{ET_DEVICE}=="IC-7100", SUBSYSTEMS=="usb", ATTRS{serial}=="IC-7100*A", \
|
||||
ACTION=="add", \
|
||||
ENV{SYSTEMD_WANTS}="", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat"
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# Create consistent device name/path for the GPS serial device
|
||||
ENV{ET_DEVICE}=="IC-7100", SUBSYSTEMS=="usb", ATTRS{serial}=="IC-7100*B", \
|
||||
@@ -29,6 +32,11 @@ ENV{ET_DEVICE}=="IC-7100", SUBSYSTEMS=="usb", ATTRS{serial}=="IC-7100*B", \
|
||||
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
|
||||
|
||||
# TODO: Add rules to trigger rigctld
|
||||
# TODO: Add rules for ACTION="remove"
|
||||
# TODO: Add rules for sound card
|
||||
# This rule generically matches the following Icom radios:
|
||||
# 1. IC-705
|
||||
# 2. IC-7100
|
||||
# 3. IC-7200
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2901", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="Icom generic", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
34
overlay/etc/udev/rules.d/83-et-ic7300.rules
Normal file
34
overlay/etc/udev/rules.d/83-et-ic7300.rules
Normal file
@@ -0,0 +1,34 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 13 December 2024
|
||||
# Purpose : udev rules for the Icom IC-7300
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. IC-7300 turned on
|
||||
# 2. IC-7300 connected via USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 3. /dev/et-audio created
|
||||
# 3. rigctld is started
|
||||
|
||||
# Create consistent device name/path for the CAT serial device
|
||||
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7300*", \
|
||||
ENV{ET_DEVICE}="IC-7300"
|
||||
|
||||
# Create consistent device name/path for the CAT serial device
|
||||
# Prevent the gpsd system unit from incorrectly flagging this as a GPS device
|
||||
ENV{ET_DEVICE}=="IC-7300", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4" ATTRS{idProduct}=="ea60", \
|
||||
ACTION=="add", \
|
||||
ENV{SYSTEMD_WANTS}="", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# This rule generically matches the following Icom radios:
|
||||
# 1. IC-705
|
||||
# 2. IC-7100
|
||||
# 3. IC-7200
|
||||
# 4. IC-7300
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2901", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="Icom generic", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
@@ -1,5 +1,6 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 12 October 2024
|
||||
# Updated : 10 November 2024
|
||||
# Purpose : udev rules for the QRP Labs QMX
|
||||
#
|
||||
# Preconditions:
|
||||
@@ -7,7 +8,8 @@
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. rigctld started
|
||||
# 2. /dev/et-audio created
|
||||
# 3. rigctld started
|
||||
|
||||
# Detect ET_DEVICE early and use for rules that follow
|
||||
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{product}=="QMX*", \
|
||||
@@ -19,4 +21,7 @@ ENV{ET_DEVICE}=="QMX", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a34c", \
|
||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# TODO: Add sound card support
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a34c", ATTRS{manufacturer}=="QRP Labs", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="QMX", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
@@ -1,25 +1,35 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 30 September 2024
|
||||
# Updated : 11 October 2024
|
||||
# Updated : 21 November 2024
|
||||
# Purpose : udev rules for the DigiRig Mobile v1.9
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. DigiRig Mobile connected via USB cable
|
||||
# 1. DigiRig Mobile connected via USB cable
|
||||
# 2. This rule is processed after the IC-7200
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. rigctld is started
|
||||
#
|
||||
# 3. /dev/et-audio created
|
||||
|
||||
# The IC-7200 uses the same chipsset. In order to avoid incorrect detection, we will check
|
||||
# for the presence of ET_DEVICE as the IC-7200 will set it as an earlier rule. With this
|
||||
# approach, the DigiRig Mobile rules must be processed later in the chain.
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ENV{SYSTEMD_WANTS}="", \
|
||||
ENV{ET_DEVICE}="DIGIRIG_MOBILE", ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
|
||||
# TODO: Add rules for earlier 1.9 release
|
||||
# TODO: Add rules for sound card
|
||||
# The audio chipset changed for DigiRig v1.9. This rule handles the original revision.
|
||||
# Audio device will only match if PROGRAM above matches (exit status=0)
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0012", \
|
||||
PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh digirig-mobile", \
|
||||
ACTION=="add", \
|
||||
ENV{ET_DEVICE}="DIGIRIG_MOBILE", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="013c", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="DIGIRIG_MOBILE", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
|
||||
|
||||
21
overlay/etc/udev/rules.d/91-et-digirig-lite.rules
Normal file
21
overlay/etc/udev/rules.d/91-et-digirig-lite.rules
Normal file
@@ -0,0 +1,21 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 17 October 2024
|
||||
# Updated : 24 October 2024
|
||||
# Purpose : udev rules for the DigiRig Lite
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. The radio is set to 'generic-vox' using et-radio.
|
||||
# 2. DigiRig Lite connected via USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-audio created
|
||||
# 2. rigctld is started
|
||||
|
||||
# The DigiRig Lite has no CAT control, but rigctld is started to minimize the configuration needed
|
||||
# by the various amateur radio applications. EmComm Tools treats rigctl NET as its abstraction layer.
|
||||
# A dummy rig control configuration is specifed in the 'generic-vox' radio configuration.
|
||||
SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0012", ENV{ET_DEVICE}=="", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_DEVICE}="DIGIRIG_LITE", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio" \
|
||||
RUN+="/usr/bin/systemctl start rigctld"
|
||||
@@ -1,12 +1,13 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 30 September 2024
|
||||
# Updated : 5 October 2024
|
||||
# Updated : 2 December 2024
|
||||
# Purpose : udev rules for U-blox GPS
|
||||
#
|
||||
# Supported Devices
|
||||
# 1. VK-162 G-Mouse USB GPS - https://amzn.to/3XQqmYj
|
||||
# 2. VK-172 G-Mouse USB GPS - https://amzn.to/3Ya7Viu
|
||||
# 3. VFAN UG-353 - https://amzn.to/3XL2lSo
|
||||
# 4. Dell 7220
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. GPS connected via USB cable
|
||||
@@ -21,3 +22,10 @@ SUBSYSTEM=="tty", ATTRS{product}=="u-blox*" ATTRS{idVendor}=="1546", ATTRS{idPro
|
||||
GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
|
||||
|
||||
# Dell 7220
|
||||
SUBSYSTEM=="tty", ATTRS{product}=="u-blox*" ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a8", \
|
||||
ACTION=="add", \
|
||||
ENV{ET_DEVICE}="UBLOX", ENV{ET_SUBDEVICE}="GPS", \
|
||||
GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
||||
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
[Unit]
|
||||
Description=rigctld service
|
||||
ConditionPathExists=/dev/et-cat
|
||||
Description=Rig Control Service
|
||||
#ConditionPathExists=/dev/et-cat
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/emcomm-tools/sbin/wrapper-rigctld.sh start
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
59
overlay/opt/emcomm-tools/bin/et-ardop
Executable file
59
overlay/opt/emcomm-tools/bin/et-ardop
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Purpose : Wrapper script for starting ARDOP
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Audio settings updated
|
||||
# 2. ARDOP modem started
|
||||
#
|
||||
# Assumptions:
|
||||
# 1. The application using the ARDOP modem is responsible for keying the PTT.
|
||||
|
||||
ARDOP_PORT=8515
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 10000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
|
||||
[ -z ${ET_LOG_DIR} ] && ET_LOG_DIR="${HOME}/.local/share/emcomm-tools"
|
||||
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
AUDIO_CARD=$(echo $APLAY_OUT | cut -d":" -f1 | awk '{print $2}')
|
||||
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||
ARDOP_AUDIO_DEVICE="plughw:${AUDIO_CARD},${AUDIO_DEVICE}"
|
||||
|
||||
# 3. Update audio device
|
||||
et-log "Using '${ARDOP_AUDIO_DEVICE}' as audio device for ARDOP."
|
||||
|
||||
# 4. Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
|
||||
else
|
||||
et-log "Can't start ARDOP modem. No ET_AUDIO device detected."
|
||||
notify_user "Select radio and plug it in"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in. No supported audio device plugged in."
|
||||
notify_user "Select radio and plug it in"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMD="ardopcf ${ARDOP_PORT} ${ARDOP_AUDIO_DEVICE} ${ARDOP_AUDIO_DEVICE} --logdir ${ET_LOG_DIR}"
|
||||
et-log "Starting ARDOP with: '${CMD}'"
|
||||
${CMD}
|
||||
115
overlay/opt/emcomm-tools/bin/et-audio
Executable file
115
overlay/opt/emcomm-tools/bin/et-audio
Executable file
@@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 31 October 2024
|
||||
# Updated : 11 November 2024
|
||||
# Purpose : Configures ET audio device with sane defaults
|
||||
#
|
||||
# Preconditions
|
||||
# 1. Supported audio interface is connected and properly detected
|
||||
#
|
||||
# Postconditions
|
||||
# 1. ASLA settings set on ET audio device
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " update-config - Update amixer config"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
start() {
|
||||
update-config
|
||||
}
|
||||
|
||||
update-config () {
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
# Use device descriptor assigned by udev rules
|
||||
ET_DEVICE=$(udevadm info /dev/et-audio | grep ET_DEVICE)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "ET_DEVICE not set by udev rule. Can't set ALSA settings"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ET_DEVICE_NAME=$(udevadm info /dev/et-audio | grep ET_DEVICE | cut -d"=" -f2)
|
||||
AUDIO_CARD=$(echo $APLAY_OUT | cut -d":" -f1 | awk '{print $2}')
|
||||
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||
FULL_AUDIO_DEVICE="$AUDIO_CARD,$AUDIO_DEVICE"
|
||||
|
||||
et-log "Updating audio device: '${ET_DEVICE_NAME}' (${FULL_AUDIO_DEVICE})' for ALSA PnP configuration."
|
||||
|
||||
case ${ET_DEVICE_NAME} in
|
||||
"DIGIRIG_MOBILE")
|
||||
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
|
||||
# Unmute Mic
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute
|
||||
# Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Capture Switch 31% unmute
|
||||
# Disable Auto Gain Control
|
||||
amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute
|
||||
|
||||
et-log "Applied amixer settings for ${ET_DEVICE_NAME}"
|
||||
;;
|
||||
"DIGIRIG_LITE")
|
||||
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
|
||||
# Unmute Mic
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute
|
||||
# Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Capture Switch 31% unmute
|
||||
# Disable Auto Gain Control
|
||||
amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute
|
||||
|
||||
et-log "Applied amixer settings for ${ET_DEVICE_NAME}"
|
||||
;;
|
||||
"FT-891")
|
||||
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
|
||||
# Unmute Mic
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute
|
||||
# Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls.
|
||||
amixer -q -c ${AUDIO_CARD} sset Mic Capture Switch 31% unmute
|
||||
# Disable Auto Gain Control
|
||||
amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute
|
||||
|
||||
et-log "Applied amixer settings for ${ET_DEVICE_NAME}"
|
||||
;;
|
||||
*)
|
||||
et-log "No ALSA configuration specified for this ET_DEVICE."
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
et-log "No ET_AUDIO device detected. Can't change ALSA settings."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in. Can't change ALSA settings."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
90
overlay/opt/emcomm-tools/bin/et-bbs-server
Executable file
90
overlay/opt/emcomm-tools/bin/et-bbs-server
Executable file
@@ -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.cfg
|
||||
BBS_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/bbs/bpq32.simple.cfg
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
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
|
||||
153
overlay/opt/emcomm-tools/bin/et-chattervox
Executable file
153
overlay/opt/emcomm-tools/bin/et-chattervox
Executable file
@@ -0,0 +1,153 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 5 December 2024
|
||||
# Updated : 6 December 2024
|
||||
# Purpose : Wrapper script for starting chattervox with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Dire Wolf is started
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. On first start, configuration is created and signing key is generated.
|
||||
# 2. chattervox is started in chat mode
|
||||
|
||||
CHATTERVOX_CONF_DIR=${HOME}/.chattervox
|
||||
CHATTERVOX_CONF_FILE=${CHATTERVOX_CONF_DIR}/config.json
|
||||
CHATTERVOX_KEYSTORE_FILE=${CHATTERVOX_CONF_DIR}/keystore.json
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
echo " start - Start chat"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
generate_config() {
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
cat <<EOF > "${CHATTERVOX_CONF_FILE}"
|
||||
{
|
||||
"version": 3,
|
||||
"callsign": "${CALLSIGN}",
|
||||
"ssid": 0,
|
||||
"keystoreFile": "${HOME}/.chattervox/keystore.json",
|
||||
"kissPort": "kiss://localhost:8001",
|
||||
"kissBaud": 9600,
|
||||
"feedbackDebounce": 20000
|
||||
}
|
||||
EOF
|
||||
|
||||
# Generate keystore file if it does not exist
|
||||
if [ ! -e ${CHATTERVOX_KEYSTORE_FILE} ]; then
|
||||
chattervox genkey
|
||||
fi
|
||||
|
||||
# Grab existing or newly generated signing key if available
|
||||
SIGNING_KEY=$(cat ${CHATTERVOX_KEYSTORE_FILE} | jq -e -r .${CALLSIGN}[0].public)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Generating signing key for ${CALLSIGN}..."
|
||||
chattervox genkey
|
||||
SIGNING_KEY=$(cat ${CHATTERVOX_KEYSTORE_FILE} | jq -e -r .${CALLSIGN}[0].public)
|
||||
else
|
||||
et-log "Signing key already exits for ${CALLSIGN}."
|
||||
fi
|
||||
|
||||
|
||||
cat <<EOF > "${CHATTERVOX_CONF_FILE}"
|
||||
{
|
||||
"version": 3,
|
||||
"callsign": "${CALLSIGN}",
|
||||
"ssid": 0,
|
||||
"keystoreFile": "${HOME}/.chattervox/keystore.json",
|
||||
"kissPort": "kiss://localhost:8001",
|
||||
"kissBaud": 9600,
|
||||
"feedbackDebounce": 20000,
|
||||
"signingKey": "${SIGNING_KEY}"
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
start() {
|
||||
update-config
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
RIGCTLD_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start chattervox. Dire Wolf not running."
|
||||
notify_user "Can't start chattervox. Dire Wolf not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
CMD="chattervox chat"
|
||||
et-log "Starting chattervox with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
|
||||
else
|
||||
et-log "Error updating configuration. Can't start chattervox"
|
||||
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)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start chattervox. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ ! -e ${CHATTERVOX_CONF_DIR} ] && mkdir ${CHATTERVOX_CONF_DIR}
|
||||
|
||||
if [ ! -e ${CHATTERVOX_CONF_FILE} ]; then
|
||||
et-log "chattervox configuration does not exist creating: ${CHATTERVOX_CONF_FILE}..."
|
||||
generate_config
|
||||
|
||||
else
|
||||
et-log "Chattervox configuration already exists, checking for change in et-user..."
|
||||
|
||||
CUR_CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
CONFIGURED_CALLSIGN=$(cat ${CHATTERVOX_CONF_FILE} | jq -r .callsign)
|
||||
|
||||
if [ "${CUR_CALLSIGN}" != "${CONFIGURED_CALLSIGN}" ]; then
|
||||
et-log "User callsign has changed from ${CUR_CALLSIGN} to ${CONFIGURED_CALLSIGN}"
|
||||
generate_config
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
17
overlay/opt/emcomm-tools/bin/et-common
Executable file
17
overlay/opt/emcomm-tools/bin/et-common
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 February 2025
|
||||
# Purpose : Common environment variables and functions
|
||||
|
||||
export ESC="\x1B"
|
||||
export RED="${ESC}[1;31m"
|
||||
export BLUE="${ESC}[1;34m"
|
||||
export GREEN="${ESC}[1;32m"
|
||||
export WHITE="${ESC}[97m"
|
||||
export YELLOW="${ESC}[1;33m"
|
||||
export NC="${ESC}[0m"
|
||||
|
||||
show-err-dialog() {
|
||||
local message="$1"
|
||||
dialog --title "Notification" --msgbox "$message" 8 60
|
||||
}
|
||||
8
overlay/opt/emcomm-tools/bin/et-conky
Executable file
8
overlay/opt/emcomm-tools/bin/et-conky
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 21 November 2024
|
||||
# Updated : 27 December 2025
|
||||
# Purpose : Wrapper script for starting conky
|
||||
|
||||
/usr/bin/conky -q --daemonize --pause=8
|
||||
170
overlay/opt/emcomm-tools/bin/et-direwolf
Executable file
170
overlay/opt/emcomm-tools/bin/et-direwolf
Executable file
@@ -0,0 +1,170 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 November 2024
|
||||
# Updated : 14 January 2025
|
||||
# Purpose : Wrapper script for starting Dire Wolf with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Audio settings updated
|
||||
# 2. Dire Wolf started
|
||||
|
||||
DIREWOLF_CONF_FILE=${ET_HOME}/conf/template.d/packet/direwolf.conf
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command> <type>"
|
||||
echo " <command>"
|
||||
echo " start - Start Dire Wolf in selected mode"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
echo ""
|
||||
echo " <type>"
|
||||
echo " aprs-digipeater - Run in RF-only APRS digipeater mode"
|
||||
echo " packet-digipeater - Run in RF-only packet digipeater mode"
|
||||
echo " simple - Run in simple (1200 baud) packet mode"
|
||||
echo " 300 - Run in 300 baud packet mode (HF)"
|
||||
echo " 9600 - Run in 9600 baud packet mode (VHF/UHF)"
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_9600_baud () {
|
||||
|
||||
# For 9600 baud operation, we use the /dev/et-cat device directly
|
||||
# in direwolf, instead of going through rigctl.
|
||||
if [ ! -e /dev/et-cat ]; then
|
||||
et-log "PTT devices not found for 9600 baud operation."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
MODE=$2
|
||||
case "${MODE}" in
|
||||
aprs-digipeater)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
packet-digipeater)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
simple)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
300)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
9600)
|
||||
check_9600_baud
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
*)
|
||||
et-log "Can't started Dire Wolf. Mode '${MODE}' not supported"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 10000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
[ -z ${ET_LOG_DIR} ] && ET_LOG_DIR="${HOME}/.local/share/emcomm-tools"
|
||||
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
|
||||
|
||||
start() {
|
||||
update_config
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
systemctl is-active --quiet rigctld
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start Dire Wolf. rigctld not running. Ensure radio is selected."
|
||||
notify_user "Can't start Dire Wolf. rigctld not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMD="direwolf -c ${DIREWOLF_CONF_FILE} -l ${ET_LOG_DIR} -t 0 -p"
|
||||
et-log "Starting Dire Wolf with: '${CMD}'"
|
||||
echo
|
||||
${CMD}
|
||||
else
|
||||
et-log "Error updating configuration. Can't start Dire Wolf"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
update_config () {
|
||||
|
||||
et-log "Attempting to start Dire Wolf in mode: '${MODE}'"
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start Dire Worlf. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
AUDIO_CARD=$(echo $APLAY_OUT | cut -d":" -f1 | awk '{print $2}')
|
||||
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||
DIREWOLF_AUDIO_DEVICE="plughw:${AUDIO_CARD},${AUDIO_DEVICE}"
|
||||
|
||||
et-log "Creating '${DIREWOLF_CONF_FILE}' from template '${DIREWOLF_TEMPLATE_CONF_FILE}'"
|
||||
cp ${DIREWOLF_TEMPLATE_CONF_FILE} ${DIREWOLF_CONF_FILE}
|
||||
|
||||
# 3. Update callsign
|
||||
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${DIREWOLF_CONF_FILE}
|
||||
|
||||
# 4. Update audio device
|
||||
et-log "Using '${DIREWOLF_AUDIO_DEVICE}' as audio device for Dire Wolf configuration."
|
||||
sed -i "s|{{ET_AUDIO_DEVICE}}|${DIREWOLF_AUDIO_DEVICE}|g" ${DIREWOLF_CONF_FILE}
|
||||
|
||||
echo "Generated the configuration below..."
|
||||
echo
|
||||
cat ${DIREWOLF_CONF_FILE}
|
||||
echo
|
||||
|
||||
# Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
|
||||
else
|
||||
et-log "No ET_AUDIO device detected."
|
||||
notify_user "Can't start Dire Wolf. No ET_AUDIO device detected."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in."
|
||||
notify_user "Can't start Dire Wolf. No supported audio device plugged in."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update_config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
132
overlay/opt/emcomm-tools/bin/et-js8call
Executable file
132
overlay/opt/emcomm-tools/bin/et-js8call
Executable file
@@ -0,0 +1,132 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 24 October 2024
|
||||
# Updated : 20 November 2024
|
||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||
#
|
||||
# Preconditions
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
#
|
||||
# Postconditions
|
||||
# 1. Stop all running EmComm Tools modes
|
||||
# 2. JS8Call audio settings updated
|
||||
# 3. JS8Call started
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " start - Update config and start JS8Call"
|
||||
echo " update-config - Update config"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start() {
|
||||
/opt/emcomm-tools/bin/et-kill-all && update-config && /usr/bin/js8call &
|
||||
|
||||
if [ ! -e /dev/et-gps ]; then
|
||||
notify-send -u critical -i \
|
||||
/usr/share/icons/Yaru/48x48/status/dialog-information.png \
|
||||
"No GPS. Ensure your time is accurate when JS8 starts."
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update-config () {
|
||||
|
||||
JS8CALL_CONF_FILE="${HOME}/.config/JS8Call.ini"
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
# Update configuration with current callsign and grid
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
GRID=$(cat ${ET_USER_CONFIG} | jq -r .grid)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start JS8Call. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "s|^MyCall.*|MyCall=${CALLSIGN}|" ${JS8CALL_CONF_FILE}
|
||||
sed -i "s|^MyGrid.*|MyGrid=${GRID}|" ${JS8CALL_CONF_FILE}
|
||||
|
||||
ET_RELEASE=$(et-system-info release)
|
||||
sed -i "s|^MyInfo.*|MyInfo=${ET_RELEASE}|" ${JS8CALL_CONF_FILE}
|
||||
|
||||
et-log "Updated JS8Call configuration with user callsign '${CALLSIGN}' and grid: '${GRID}'"
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||
|
||||
# JS8Call has an issue decoding the received audio following a
|
||||
# transmission when the device below is used.
|
||||
#
|
||||
#JS8_AUDIO_DEVICE="plughw:CARD=ET_AUDIO,DEV=${AUDIO_DEVICE}"
|
||||
#
|
||||
# Instead, the following device solves this issue:
|
||||
JS8_AUDIO_DEVICE="sysdefault:CARD=ET_AUDIO"
|
||||
|
||||
et-log "Using '${JS8_AUDIO_DEVICE}' for JS8Call configuration."
|
||||
|
||||
# 3. Check for existing JS8Call sound configuration
|
||||
|
||||
## Update input
|
||||
grep "^SoundInName" ${JS8CALL_CONF_FILE}
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "s|^SoundInName.*|SoundInName=\"${JS8_AUDIO_DEVICE}\"|" ${JS8CALL_CONF_FILE}
|
||||
else
|
||||
echo "SoundInName=\"${JS8_AUDIO_DEVICE}\"" >> ${JS8CALL_CONF_FILE}
|
||||
fi
|
||||
|
||||
## Update output
|
||||
grep "^SoundOutName" ${JS8CALL_CONF_FILE}
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "s|^SoundOutName.*|SoundOutName=\"${JS8_AUDIO_DEVICE}\"|" ${JS8CALL_CONF_FILE}
|
||||
else
|
||||
echo "SoundOutName=\"${JS8_AUDIO_DEVICE}\"" >> ${JS8CALL_CONF_FILE}
|
||||
fi
|
||||
|
||||
## Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
|
||||
else
|
||||
et-log "No ET_AUDIO device detected."
|
||||
notify_user "Can't start JS8Call. No ET_AUDIO device detected."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in."
|
||||
notify_user "Can't start JS8Call. No supported audio device plugged in."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
40
overlay/opt/emcomm-tools/bin/et-kill-all
Executable file
40
overlay/opt/emcomm-tools/bin/et-kill-all
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 12 November 2024
|
||||
# Updated : 7 February 2025
|
||||
# Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and
|
||||
# amatuer radio applications to ensure a clean start for the next mode.
|
||||
|
||||
stop_pat() {
|
||||
PS_OUT=$(ps -ef | grep "[p]at http")
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
PAT_PID=$(ps -ef | grep "[p]at http" | awk '{print $2}')
|
||||
kill -9 ${PAT_PID}
|
||||
fi
|
||||
}
|
||||
|
||||
# 1. Attempt to stop all EmComm Tools services regardless if they are running.
|
||||
# 2. Stop the applications first, then the modems.
|
||||
stop_all_services() {
|
||||
systemctl --user stop et-service-winlink-ardop
|
||||
systemctl --user stop et-service-winlink-packet
|
||||
systemctl --user stop et-service-winlink-native-packet
|
||||
systemctl --user stop et-service-ardop
|
||||
systemctl --user stop et-service-direwolf-300
|
||||
systemctl --user stop et-service-direwolf-9600
|
||||
systemctl --user stop et-service-direwolf-simple
|
||||
systemctl --user stop et-service-direwolf-aprs-digipeater
|
||||
systemctl --user stop et-service-direwolf-packet-digipeater
|
||||
|
||||
# Stop VARA with a sledge hammer
|
||||
pkill et-winlink
|
||||
pkill et-vara
|
||||
pkill VARA
|
||||
|
||||
stop_pat
|
||||
}
|
||||
|
||||
et-log "Stopping all services"
|
||||
stop_all_services
|
||||
40
overlay/opt/emcomm-tools/bin/et-kill-bt
Executable file
40
overlay/opt/emcomm-tools/bin/et-kill-bt
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 14 March 2025
|
||||
# UPdated : 15 March 2025
|
||||
# Purpose : Stops all services tied to Bluetooth TNC operations
|
||||
#
|
||||
# Post Conditions:
|
||||
# 1. All services started for supporting Bluetooth over serial are stopped.
|
||||
#
|
||||
# Note: If you try to re-establish a Bluetooth connection, you will needed to:
|
||||
# 1. Turn off and turn back on your radio.
|
||||
# 2. Wait 30 seconds before reconnecting (i.e. ./et-uv-pro connect)
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
stop_all_bt_services() {
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[k]issattach");
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Killing kissattach processes"
|
||||
killall kissattach
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0");
|
||||
if [[ $? -eq 0 ]]; then
|
||||
ps -ef | grep "[r]fcomm0" | awk '{print $2}' | while read pid; do
|
||||
echo "Killing rfcomm process: $pid"
|
||||
kill $pid
|
||||
done
|
||||
|
||||
echo -e "\n${YELLOW}Wait 30 seconds before reconnecting over Bluetooth${NC}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stop_all_bt_services
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 16 March 2024
|
||||
# Updated : 9 October 2024
|
||||
# Updated : 2 January 2025
|
||||
# Purpose : Log message to standard out and log file
|
||||
|
||||
ET_TEMP_DIR=/tmp/et
|
||||
@@ -27,5 +27,5 @@ fi
|
||||
|
||||
TIMESTAMP=`date "+%Y-%m-%d %H:%M:%S"`
|
||||
|
||||
echo $@
|
||||
echo -e $@
|
||||
echo "$TIMESTAMP $@" >> ${ET_LOG_FILE}
|
||||
|
||||
46
overlay/opt/emcomm-tools/bin/et-mirror.sh
Executable file
46
overlay/opt/emcomm-tools/bin/et-mirror.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 29 December 2024
|
||||
# Purpose : Mirrors a website for offline browsing
|
||||
|
||||
ET_OFFLINE_WWW_DIR="${HOME}/offline-www"
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "$(basename $) Usage: $0 <start-url>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e ${ET_OFFLINE_WWW_DIR} ]; then
|
||||
et-log "Creating offline web directory: ${ET_OFFLINE_WWW_DIR}"
|
||||
mkdir -v ${ET_OFFLINE_WWW_DIR}
|
||||
fi
|
||||
|
||||
START_URL=$1
|
||||
|
||||
# Validate the URL format
|
||||
if ! [[ $START_URL =~ ^https?:// ]]; then
|
||||
echo "Invalid URL. Provide a valid URL that starts with http:// or https://"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DOMAIN_NAME=$(echo "$START_URL" | awk -F[/:] '{print $4}')
|
||||
|
||||
echo "Starting website mirroring..."
|
||||
|
||||
wget --mirror \
|
||||
--convert-links \
|
||||
--adjust-extension \
|
||||
--page-requisites \
|
||||
--no-parent \
|
||||
--directory-prefix="${ET_OFFLINE_WWW_DIR}" \
|
||||
"${START_URL}"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Website mirroring completed successfully."
|
||||
echo "Domain: ${DOMAIN_NAME}"
|
||||
echo "URL: ${START_URL}"
|
||||
echo "Output Directory: ${ET_OFFLINE_WWW_DIR}"
|
||||
else
|
||||
echo "An error occurred while mirroring the website."
|
||||
exit 1
|
||||
fi
|
||||
276
overlay/opt/emcomm-tools/bin/et-mode
Executable file
276
overlay/opt/emcomm-tools/bin/et-mode
Executable file
@@ -0,0 +1,276 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# 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
|
||||
MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode"
|
||||
|
||||
QTTERMTCP_CONF_FILE="${HOME}/.config/QtTermTCP.ini"
|
||||
|
||||
# List of supported modes of operation
|
||||
MODE_ID_NONE="none"
|
||||
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"
|
||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||
MODE_ID_WINLINK_VARA_HF="winlink-vara-hf"
|
||||
MODE_ID_WINLINK_VARA_FM="winlink-vara-fm"
|
||||
|
||||
# Default to 1200 baud packet for terminal sessions
|
||||
TERM_MODE=1200
|
||||
|
||||
# Attempt to stop all EmComm Tools services regardless if they are running.
|
||||
stop_all_services() {
|
||||
et-kill-all
|
||||
}
|
||||
|
||||
exit_on_service_failure() {
|
||||
local systemd_unit_name="$1"
|
||||
systemctl is-active --user --quiet "${systemd_unit_name}"
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start mode. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
TIMEOUT=15 # Total time to wait in seconds
|
||||
INTERVAL=2 # Interval between checks in seconds
|
||||
|
||||
start_and_wait_for_service() {
|
||||
local systemd_unit_name="$1"
|
||||
local elapsed=0
|
||||
|
||||
et-log "Starting ${systemd_unit_name}..."
|
||||
systemctl --user start ${systemd_unit_name}
|
||||
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
|
||||
while ! systemctl is-active --user --quiet "${systemd_unit_name}"; do
|
||||
sleep "$INTERVAL"
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
if [ "$elapsed" -ge "$TIMEOUT" ]; then
|
||||
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
done
|
||||
|
||||
# Some applications even when started still need a bit of extra time to be available.
|
||||
# Add a short think time of 2 seconds. The ARDOP modem requies extra time.
|
||||
sleep 2
|
||||
|
||||
# Do one more check to ensure that we are running, otherwise exit.
|
||||
exit_on_service_failure ${systemd_unit_name}
|
||||
}
|
||||
|
||||
start_and_wait_for_vara() {
|
||||
local vara_cmd="$1"
|
||||
local elapsed=0
|
||||
|
||||
et-log "Starting ${vara_cmd}..."
|
||||
${vara_cmd} &
|
||||
|
||||
et-log "Waiting for ${vara_cmd} to become active..."
|
||||
|
||||
while true; do
|
||||
CHECK_VARA=$(ps -ef | grep "[V]ARA")
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
sleep "$INTERVAL"
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
if [ "$elapsed" -ge "$TIMEOUT" ]; then
|
||||
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
et-log "Waiting for ${vara_cmd} to become active..."
|
||||
done
|
||||
}
|
||||
|
||||
select_term_mode () {
|
||||
term_mode=()
|
||||
term_mode+=("1200" "1200 baud (default for VHF/UHF)")
|
||||
term_mode+=("9600" "9600 baud (VHF/UHF)")
|
||||
term_mode+=("300" "300 baud (HF)")
|
||||
|
||||
# Only allow VARA terminal modes when using QtTermTCP
|
||||
if [[ "${SELECTED_MODE}" == "${MODE_ID_BBS_CLIENT2}" ]]; then
|
||||
if [ -e "${HOME}/.wine32/drive_c/VARA FM/VARAFM.exe" ]; then
|
||||
term_mode+=("vara-fm" "VARA FM")
|
||||
fi
|
||||
|
||||
if [ -e "${HOME}/.wine32/drive_c/VARA/VARA.exe" ]; then
|
||||
term_mode+=("vara-hf" "VARA HF")
|
||||
fi
|
||||
fi
|
||||
|
||||
TERM_MODE=$(dialog --clear --menu "Select a modem" 13 60 10 "${term_mode[@]}" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
|
||||
if [ "${TERM_MODE}" == "9600" ]; then
|
||||
dialog --title "Note on 9600 Baud" --msgbox "9600 baud is only supported on limited radios and typically requires a special cable.\n\nDon't forget to set the packet settings to 9600 on the radio." 0 0
|
||||
fi
|
||||
|
||||
tput sgr 0 && clear
|
||||
|
||||
if [ ${exit_status} -ne 0 ]; then
|
||||
et-log "No modem selected. Mode will not be started."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Build list of options
|
||||
options=()
|
||||
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")
|
||||
options+=("${MODE_ID_WINLINK_PACKET}" "Winlink over VHF/UHF (AX.25 Packet)")
|
||||
|
||||
if [ -e "${HOME}/.wine32/drive_c/VARA FM/VARAFM.exe" ]; then
|
||||
options+=("${MODE_ID_WINLINK_VARA_FM}" "Winlink over VHF/UHF (VARA FM)")
|
||||
fi
|
||||
|
||||
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink over HF (ARDOP)")
|
||||
|
||||
if [ -e "${HOME}/.wine32/drive_c/VARA/VARA.exe" ]; then
|
||||
options+=("${MODE_ID_WINLINK_VARA_HF}" "Winlink over HF (VARA HF)")
|
||||
fi
|
||||
|
||||
# Prompt user for option and save exit status
|
||||
SELECTED_MODE=$(dialog --clear --menu "Select a mode:" 18 65 10 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
|
||||
tput sgr 0 && clear
|
||||
|
||||
if [ $exit_status -eq 0 ]; then
|
||||
|
||||
stop_all_services
|
||||
|
||||
echo ${SELECTED_MODE} > ${MODE_STATUS_FILE}
|
||||
|
||||
case ${SELECTED_MODE} in
|
||||
${MODE_ID_NONE})
|
||||
et-log "No mode selected"
|
||||
;;
|
||||
${MODE_ID_APRS_DIGIPEATER})
|
||||
systemctl --user start et-service-direwolf-aprs-digipeater
|
||||
et-log "APRS digipeater now running."
|
||||
;;
|
||||
${MODE_ID_APRS_CLIENT})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-yaac start
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT})
|
||||
select_term_mode
|
||||
et-log "Using ${TERM_MODE} as the modem speed."
|
||||
|
||||
case "${TERM_MODE}" in
|
||||
"1200")
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
;;
|
||||
"9600")
|
||||
start_and_wait_for_service et-service-direwolf-9600
|
||||
;;
|
||||
"300")
|
||||
start_and_wait_for_service et-service-direwolf-300
|
||||
;;
|
||||
esac
|
||||
|
||||
et-log "Starting Paracon."
|
||||
et-paracon start
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT2})
|
||||
select_term_mode
|
||||
et-log "Using ${TERM_MODE} as the modem."
|
||||
|
||||
case "${TERM_MODE}" in
|
||||
"1200")
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
;;
|
||||
"9600")
|
||||
start_and_wait_for_service et-service-direwolf-9600
|
||||
;;
|
||||
"300")
|
||||
start_and_wait_for_service et-service-direwolf-300
|
||||
;;
|
||||
"vara-fm")
|
||||
sed -i "s|^VARAFM=.*|VARAFM=1|g" ${QTTERMTCP_CONF_FILE}
|
||||
sed -i "s|^VARAHF=.*|VARAHF=0|g" ${QTTERMTCP_CONF_FILE}
|
||||
start_and_wait_for_vara et-vara-fm
|
||||
;;
|
||||
"vara-hf")
|
||||
sed -i "s|^VARAFM=.*|VARAFM=0|g" ${QTTERMTCP_CONF_FILE}
|
||||
sed -i "s|^VARAHF=.*|VARAHF=1|g" ${QTTERMTCP_CONF_FILE}
|
||||
start_and_wait_for_vara et-vara-hf
|
||||
;;
|
||||
esac
|
||||
|
||||
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"
|
||||
et-chattervox start
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
systemctl --user start et-service-direwolf-packet-digipeater
|
||||
et-log "Packet digipeater now running."
|
||||
;;
|
||||
${MODE_ID_WINLINK_ARDOP})
|
||||
et-log "Using ARDOP as the modem."
|
||||
start_and_wait_for_service et-service-ardop
|
||||
start_and_wait_for_service et-service-winlink-ardop
|
||||
min http://localhost:8080
|
||||
;;
|
||||
${MODE_ID_WINLINK_PACKET})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
start_and_wait_for_service et-service-winlink-packet
|
||||
min http://localhost:8080
|
||||
;;
|
||||
${MODE_ID_WINLINK_VARA_FM})
|
||||
dialog --title "User Action Required" --msgbox "VARA FM is not a plug and play mode. You must configure VARA manually." 10 50
|
||||
tput sgr 0 && clear
|
||||
start_and_wait_for_vara et-vara-fm
|
||||
et-winlink start-vara-fm &
|
||||
sleep 1
|
||||
min http://localhost:8080 2>/dev/null
|
||||
;;
|
||||
${MODE_ID_WINLINK_VARA_HF})
|
||||
dialog --title "User Action Required" --msgbox "VARA HF is not a plug and play mode. You must configure VARA manually." 10 50
|
||||
tput sgr 0 && clear
|
||||
start_and_wait_for_vara et-vara-hf
|
||||
et-winlink start-vara-hf &
|
||||
sleep 1
|
||||
min http://localhost:8080 2>/dev/null
|
||||
;;
|
||||
*)
|
||||
et-log "Mode ${SELECTED_MODE} not yet supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
et-log "No mode selected"
|
||||
echo ${MODE_ID_NONE} > ${MODE_STATUS_FILE}
|
||||
exit 1
|
||||
fi
|
||||
93
overlay/opt/emcomm-tools/bin/et-paracon
Executable file
93
overlay/opt/emcomm-tools/bin/et-paracon
Executable file
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 3 December 2024
|
||||
# Purpose : Wrapper script for starting Paracon with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Dire Wolf is started
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Callsign and AGWPE host updated in Paracon
|
||||
# 2. Paracon is started
|
||||
|
||||
PARACON_CONF_DIR=${HOME}/.local/share/emcomm-tools/bbs-client
|
||||
PARACON_CONF_FILE=${PARACON_CONF_DIR}/paracon.cfg
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
echo " start - Start Paracon"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start() {
|
||||
update-config
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
RIGCTLD_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start Paracon. Dire Wolf not running."
|
||||
notify_user "Can't start Paracon. Dire Wolf not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
cd ${PARACON_CONF_DIR}
|
||||
CMD="paracon"
|
||||
et-log "Starting Paracon in ${PARACON_CONF_DIR} with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
|
||||
cd ${CWD_DIR}
|
||||
|
||||
else
|
||||
et-log "Error updating configuration. Can't start Paracon"
|
||||
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)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start Paracon. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
et-log "Updating Paracon configuration file: ${PARACON_CONF_FILE}..."
|
||||
sed -i "s|^host.*|host = localhost|" ${PARACON_CONF_FILE}
|
||||
sed -i "s|^callsign.*|callsign = ${CALLSIGN}|" ${PARACON_CONF_FILE}
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
107
overlay/opt/emcomm-tools/bin/et-qttermtcp
Executable file
107
overlay/opt/emcomm-tools/bin/et-qttermtcp
Executable file
@@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 17 December 2024
|
||||
# Updated : 15 March 2025
|
||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||
#
|
||||
# Preconditions
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. The BBS Client (QtTermTCP) mode is started via et-mode.
|
||||
#
|
||||
# Postconditions
|
||||
# 1. Stop all running EmComm Tools modes
|
||||
# 2. QtTermTCP audio settings updated
|
||||
# 3. QtTermTCP started
|
||||
|
||||
CONF_DIR="${HOME}/.config"
|
||||
CONF_FILE="${CONF_DIR}/QtTermTCP.ini"
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " start - Update config and start JS8Call"
|
||||
echo " update-config - Update config"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start() {
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
cd ${CONF_DIR}
|
||||
|
||||
update-config && /usr/local/bin/QtTermTCP
|
||||
|
||||
cd ${CWD_DIR}
|
||||
}
|
||||
|
||||
update-config () {
|
||||
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
# Update configuration with current callsign and grid
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start QtTermTCP. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "s|^AGWTermCall.*|AGWTermCall=${CALLSIGN}|g" ${CONF_FILE}
|
||||
sed -i "s|^MYCALL.*|MYCALL=${CALLSIGN}|g" ${CONF_FILE}
|
||||
sed -i "s|^VARATermCall.*|VARATermCall=${CALLSIGN}|g" ${CONF_FILE}
|
||||
sed -i "s|^YAPPPath.*|YAPPPath=${HOME}/Downloads|" ${CONF_FILE}
|
||||
|
||||
et-log "Updated QtTermTCP configuration with user callsign '${CALLSIGN}'"
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0");
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Configuring for use with Bluetooth TNC"
|
||||
return
|
||||
fi
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
## Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
else
|
||||
et-log "No ET_AUDIO device detected."
|
||||
notify_user "Can't start QtTermInfo. No ET_AUDIO device detected."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in."
|
||||
notify_user "Can't start QtTermInfo. No supported audio device plugged in."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -2,75 +2,67 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 11 October 2024
|
||||
# Updated : 12 October 2024
|
||||
# Updated : 16 March 2025
|
||||
# Purpose : A script for managaing plug-and-play radios
|
||||
set -e
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <command>"
|
||||
echo " active - show active radio"
|
||||
echo " list - list supported radios by id"
|
||||
echo " set <radio id> - set radio as active by id"
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||
|
||||
case $1 in
|
||||
list)
|
||||
NO_RADIO_ID="no-radio"
|
||||
|
||||
printf "%-20s %-10s %-10s\n" "Radio ID" "Vendor" "Model"
|
||||
options=()
|
||||
options+=("${NO_RADIO_ID}" "No radio")
|
||||
while IFS= read -r radio; do
|
||||
ID=$(cat $radio | jq -r .id)
|
||||
VENDOR=$(cat $radio | jq -r .vendor)
|
||||
MODEL=$(cat $radio | jq -r .model)
|
||||
|
||||
find ${ET_HOME}/conf/radios.d -type f -name \*.json | sort -n | while read radio; do
|
||||
ID=$(cat $radio | jq -r .id)
|
||||
VENDOR=$(cat $radio | jq -r .vendor)
|
||||
MODEL=$(cat $radio | jq -r .model)
|
||||
options+=("$ID" "$VENDOR $MODEL")
|
||||
done < <(find $ET_HOME/conf/radios.d -type f | grep -v "bt.json" | sort)
|
||||
|
||||
printf "%-20s %-10s %-10s\n" $ID "$VENDOR" "$MODEL"
|
||||
done
|
||||
SELECTED_RADIO=$(dialog --clear --menu "Select a radio:" 21 60 10 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
|
||||
;;
|
||||
set)
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Radio ID required. Run '$(basename $0) list' to get list of radios"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RADIO_CONF="${ET_HOME}/conf/radios.d/$2.json"
|
||||
if [ ! -e ${RADIO_CONF} ]; then
|
||||
echo "Radio configuration does not exist for radio ID: '$2'"
|
||||
exit 1
|
||||
fi
|
||||
tput sgr 0 && clear
|
||||
|
||||
if [ $exit_status -eq 0 ]; then
|
||||
|
||||
# Special case to run without a radio configured
|
||||
if [ ${SELECTED_RADIO} == ${NO_RADIO_ID} ]; then
|
||||
[ -e ${ACTIVE_RADIO} ] && rm ${ACTIVE_RADIO}
|
||||
ln -s ${RADIO_CONF} ${ACTIVE_RADIO}
|
||||
echo "Set active radio to: $SELECTED_RADIO"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
;;
|
||||
active)
|
||||
RADIO_CONF="${ET_HOME}/conf/radios.d/$SELECTED_RADIO.json"
|
||||
[ -e ${ACTIVE_RADIO} ] && rm ${ACTIVE_RADIO}
|
||||
ln -s ${RADIO_CONF} ${ACTIVE_RADIO}
|
||||
echo "Set active radio to: $SELECTED_RADIO"
|
||||
|
||||
if [ ! -L "${ACTIVE_RADIO}" ]; then
|
||||
echo "No active radio defined. Run: '$(basename $0) set <radio ID>'"
|
||||
exit 1
|
||||
fi
|
||||
ID=$(cat ${ACTIVE_RADIO} | jq -r .id)
|
||||
VENDOR=$(cat ${ACTIVE_RADIO} | jq -r .vendor)
|
||||
MODEL=$(cat ${ACTIVE_RADIO} | jq -r .model)
|
||||
|
||||
ID=$(cat ${ACTIVE_RADIO} | jq -r .id)
|
||||
VENDOR=$(cat ${ACTIVE_RADIO} | jq -r .vendor)
|
||||
MODEL=$(cat ${ACTIVE_RADIO} | jq -r .model)
|
||||
BLUETOOTH_TNC_CHECK=$(ps -ef | grep "[r]fcomm connect")
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Killing running processes for Bluetooth TNC"
|
||||
sudo /opt/emcomm-tools/bin/et-kill-bt
|
||||
fi
|
||||
|
||||
printf "%-20s %-10s %-10s\n" "Radio ID" "Vendor" "Model"
|
||||
printf "%-20s %-10s %-10s\n" $ID "$VENDOR" "$MODEL"
|
||||
printf "%-20s %-10s %-10s\n" "Radio ID" "Vendor" "Model"
|
||||
printf "%-20s %-10s %-10s\n\n" $ID "$VENDOR" "$MODEL"
|
||||
|
||||
printf "\nConfiguration Notes\n"
|
||||
cat ${ACTIVE_RADIO} | jq -r '.notes[] | "* \(.)"'
|
||||
;;
|
||||
*)
|
||||
echo "Command not supported."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
printf "${YELLOW}RADIO CONFIGURATION NOTES\n"
|
||||
cat ${ACTIVE_RADIO} | jq -r '.notes[] | "* \(.)"'
|
||||
echo -e "${NC}"
|
||||
|
||||
printf "${GREEN}REQUIRED ACTIONS\n"
|
||||
printf "1. Apply the settings above to your radio.\n"
|
||||
printf "2. Plug in the USB cable for your radio. If it is already\n"
|
||||
printf " connected, reconnect it.\n"
|
||||
printf "3. Run 'et-mode' and select the desired mode of operation.\n\n"
|
||||
printf " Note: JS8Call does not require a mode to be selected.\n"
|
||||
echo -e "${NC}"
|
||||
else
|
||||
echo "No radio selected."
|
||||
fi
|
||||
|
||||
@@ -2,16 +2,22 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 October 2024
|
||||
# Updated : 11 October 2024
|
||||
# Updated : 25 March 2025
|
||||
# Purpose : Utility script for dumping system information
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <command>"
|
||||
echo " active-radio - Display model of active radio"
|
||||
echo " et-cat - Is CAT control connected"
|
||||
echo " et-gps - Is the GPS connected"
|
||||
echo " ip - System IP address"
|
||||
echo " release - EmComm Tools Release"
|
||||
echo " active-radio - Display model of active radio"
|
||||
echo " callsign - Current callsign"
|
||||
echo " et-audio - Show state of audio interface"
|
||||
echo " et-audio-card - Display audio card and device: <card>,<device>"
|
||||
echo " et-cat - Show state of CAT control interface"
|
||||
echo " et-gps - Show state of GPS interface"
|
||||
echo " et-time - Show if time is synched via GPS"
|
||||
echo " et-mode - Show current mode"
|
||||
echo " grid - Current grid square defined by user"
|
||||
echo " ip - System IP address"
|
||||
echo " release - EmComm Tools release"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
@@ -19,6 +25,8 @@ if [ $# -ne 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
case $1 in
|
||||
active-radio)
|
||||
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
|
||||
@@ -26,6 +34,62 @@ case $1 in
|
||||
else
|
||||
echo "No radio selected"
|
||||
fi
|
||||
;;
|
||||
callsign)
|
||||
cat ${ET_USER_CONFIG} | jq -r .callsign
|
||||
;;
|
||||
grid)
|
||||
cat ${ET_USER_CONFIG} | jq -r .grid
|
||||
;;
|
||||
et-audio)
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
UDEV_OUT=$(udevadm info /dev/et-audio | grep ET_DEVICE)
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
# Display friendly audio device name
|
||||
ET_DEVICE=$(udevadm info /dev/et-audio | grep ET_DEVICE | cut -d"=" -f2)
|
||||
case $ET_DEVICE in
|
||||
"DIGIRIG_LITE")
|
||||
echo "DigiRig Lite"
|
||||
;;
|
||||
"DIGIRIG_MOBILE")
|
||||
echo "DigiRig Mobile"
|
||||
;;
|
||||
*)
|
||||
echo $ET_DEVICE
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo "Connected"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Not connected"
|
||||
fi
|
||||
|
||||
;;
|
||||
et-audio-card)
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [ $? -eq 0 ]; then
|
||||
AUDIO_CARD=$(echo $APLAY_OUT | cut -d":" -f1 | awk '{print $2}')
|
||||
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||
echo $AUDIO_CARD,$AUDIO_DEVICE
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
;;
|
||||
et-cat)
|
||||
|
||||
@@ -40,16 +104,23 @@ case $1 in
|
||||
# 2. Check if the rigctl systemd unit is running properly
|
||||
systemctl status rigctld --no-pager > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
|
||||
# Note: I am disabling the VFO read as it causes issues with serval Icom
|
||||
# radios and results in the VFO changing momentarily during this client
|
||||
# request. It causes issues during TX and RX. If it is not bulletproof,
|
||||
# features like this will be turned off. This is a problem given that
|
||||
# Conky calls this method every 10 seconds.
|
||||
#
|
||||
# 3. Grab and format frequency
|
||||
FREQ=$(timeout 1 rigctl -m 2 f)
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%'d MHz\n" "$FREQ" | sed 's|,|.|g'
|
||||
else
|
||||
echo "Connected. Can't access VFO";
|
||||
fi
|
||||
#FREQ=$(timeout 1 rigctl -m 2 f)
|
||||
#if [ $? -eq 0 ]; then
|
||||
# printf "%'d MHz\n" "$FREQ" | sed 's|,|.|g'
|
||||
#else
|
||||
# echo "Connected. Can't access VFO";
|
||||
#fi
|
||||
echo "Connected";
|
||||
else
|
||||
echo "Connected. rigctld not running"
|
||||
echo "Connected. No rig control"
|
||||
fi
|
||||
else
|
||||
echo "Not connected";
|
||||
@@ -99,8 +170,83 @@ case $1 in
|
||||
fi
|
||||
|
||||
;;
|
||||
et-mode)
|
||||
|
||||
SELECTED_MODE=$(cat "${HOME}/.config/emcomm-tools/et-mode")
|
||||
|
||||
MODE_ID_NONE="none"
|
||||
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"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||
MODE_ID_WINLINK_VARA_HF="winlink-vara-hf"
|
||||
MODE_ID_WINLINK_VARA_FM="winlink-vara-fm"
|
||||
|
||||
if [ ! -e /dev/et-audio ]; then
|
||||
echo "Run 'et-mode' to set"
|
||||
echo ${MODE_ID_NONE} > "${HOME}/.config/emcomm-tools/et-mode"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case ${SELECTED_MODE} in
|
||||
${MODE_ID_NONE})
|
||||
echo "Run 'et-mode' to set"
|
||||
;;
|
||||
${MODE_ID_APRS_DIGIPEATER})
|
||||
echo "APRS Digipeater"
|
||||
;;
|
||||
${MODE_ID_APRS_CLIENT})
|
||||
echo "APRS"
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT})
|
||||
echo "BBS Client"
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT2})
|
||||
echo "BBS Client"
|
||||
;;
|
||||
${MODE_ID_BBS_SERVER})
|
||||
echo "BBS Server"
|
||||
;;
|
||||
${MODE_ID_CHAT_CLIENT})
|
||||
echo "Chat (chattervox)"
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
echo "Packet Digipeater"
|
||||
;;
|
||||
${MODE_ID_WINLINK_ARDOP})
|
||||
echo "Winlink ARDOP"
|
||||
;;
|
||||
${MODE_ID_WINLINK_PACKET})
|
||||
echo "Winlink Packet"
|
||||
;;
|
||||
${MODE_ID_WINLINK_VARA_FM})
|
||||
echo "Winlink VARA FM"
|
||||
;;
|
||||
${MODE_ID_WINLINK_VARA_HF})
|
||||
echo "Winlink VARA HF"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown"
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
et-time)
|
||||
ET_OUT=$(${ET_HOME}/bin/et-time)
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Yes"
|
||||
else
|
||||
echo "No"
|
||||
fi
|
||||
|
||||
;;
|
||||
ip)
|
||||
hostname -I
|
||||
hostname -I | awk '{print $1}'
|
||||
;;
|
||||
release)
|
||||
grep DISTRIB_DESCRIPTION /etc/lsb-release | sed 's|"||g' | awk '{print $1}' | cut -d"=" -f2
|
||||
|
||||
12
overlay/opt/emcomm-tools/bin/et-term
Executable file
12
overlay/opt/emcomm-tools/bin/et-term
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 November 2024
|
||||
# Purpose : Set terminal colors to xterm colors
|
||||
|
||||
DEFAULT_PROFILE=$(gsettings get org.gnome.Terminal.ProfilesList default)
|
||||
if [ $? -eq 0 ]; then
|
||||
# strip single quotes from profile's UUID
|
||||
PROFILE_UUID=$(echo ${DEFAULT_PROFILE} | sed "s|'||g")
|
||||
|
||||
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${PROFILE_UUID}/ palette "['#000000', '#cd0000', '#00cd00', '#cdcd00', '#0000ee', '#cd00cd', '#00cdcd', '#e5e5e5', '#7f7f7f', '#ff0000', '#00ff00', '#ffff00', '#5c5cff', '#ff00ff', '#00ffff', '#ffffff']"
|
||||
fi
|
||||
325
overlay/opt/emcomm-tools/bin/et-th-d74
Executable file
325
overlay/opt/emcomm-tools/bin/et-th-d74
Executable file
@@ -0,0 +1,325 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 January 2025
|
||||
# Updated : 20 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the Kenwood TH-D74.
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
CLEAN_UP=1
|
||||
|
||||
cleanup() {
|
||||
# Note: We need to reconnect to the Bluetooth device on every mode change.
|
||||
# As such, we need kill all the rfcomm and kiss process on exit.
|
||||
if [[ ${CLEAN_UP} -eq 1 ]]; then
|
||||
sudo /opt/emcomm-tools/bin/et-kill-bt
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill all Bluetooth TNC services on exit
|
||||
trap cleanup EXIT
|
||||
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/kenwood-thd74.bt.json"
|
||||
DEVICE_NAME=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.deviceName)
|
||||
BLUETOOTH_CHANNEL=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.channel)
|
||||
BT_DEVICE="/dev/rfcomm0"
|
||||
AX25_PORT="wl2k"
|
||||
AX25_CONF_FILE="/etc/ax25/axports"
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <command>"
|
||||
echo " c, connect - Connect to radio via Bluetooth"
|
||||
echo " p, pair - Pair radio (one-time operation)"
|
||||
echo " u, unpair - Unpair radio"
|
||||
|
||||
CLEAN_UP=0
|
||||
}
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -e ${BT_DEVICE} ]]; then
|
||||
echo -e "${YELLOW}Your ${BLUE}${DEVICE_NAME}${YELLOW} may have a connection that needs to be cleaned up."
|
||||
echo -e "Press ${WHITE}[ENTER]${YELLOW} to clean-up.${NC}"
|
||||
read -p ""
|
||||
|
||||
cleanup
|
||||
fi
|
||||
|
||||
stop_all_services() {
|
||||
et-kill-all
|
||||
}
|
||||
|
||||
exit_if_no_active_radio () {
|
||||
if [ ! -e ${ACTIVE_RADIO} ]; then
|
||||
echo "${ACTIVE_RADIO} file not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
get_mac_or_exit () {
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC address found in ${ACTIVE_RADIO}."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
update_ax25_conf() {
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
et-log "No callsign set. Run et-user first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GREP_OUT=$(grep ${AX25_PORT} ${AX25_CONF_FILE})
|
||||
if [ $? -eq 0 ]; then
|
||||
# Delete all existing AX.25 port entries. Note: we can't use sed here
|
||||
# since we do not have permission to create a temporary file with
|
||||
# inline replacement. ed modifies the file directly.
|
||||
printf "g/^${AX25_PORT}/d\nw\nq\n" | ed ${AX25_CONF_FILE} > /dev/null 2>&1
|
||||
|
||||
fi
|
||||
|
||||
echo "${AX25_PORT} ${CALLSIGN} 1200 255 2 1200 Packet" >> ${AX25_CONF_FILE}
|
||||
}
|
||||
|
||||
do_kiss_attach() {
|
||||
echo -e "${BLUE}Connecting KISS interface using ${BT_DEVICE} and AX.25 port: ${AX25_PORT}${NC}"
|
||||
KISS_OUT=$(sudo kissattach ${BT_DEVICE} ${AX25_PORT})
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "${RED}Failed to attach KISS port.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KISS_OUT=$(sudo kissparms -c 1 -p ${AX25_PORT})
|
||||
}
|
||||
|
||||
exit_on_service_failure() {
|
||||
local systemd_unit_name="$1"
|
||||
systemctl is-active --user --quiet "${systemd_unit_name}"
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start mode. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
TIMEOUT=15 # Total time to wait in seconds
|
||||
INTERVAL=2 # Interval between checks in seconds
|
||||
|
||||
start_and_wait_for_service() {
|
||||
local systemd_unit_name="$1"
|
||||
local elapsed=0
|
||||
|
||||
et-log "Starting ${systemd_unit_name}..."
|
||||
systemctl --user start ${systemd_unit_name}
|
||||
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
|
||||
while ! systemctl is-active --user --quiet "${systemd_unit_name}"; do
|
||||
sleep "$INTERVAL"
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
if [ "$elapsed" -ge "$TIMEOUT" ]; then
|
||||
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
done
|
||||
|
||||
# Some applications even when started still need a bit of extra time to be available.
|
||||
# Add a short think time of 2 seconds. The ARDOP modem requies extra time.
|
||||
sleep 2
|
||||
|
||||
# Do one more check to ensure that we are running, otherwise exit.
|
||||
exit_on_service_failure ${systemd_unit_name}
|
||||
}
|
||||
|
||||
|
||||
exit_if_no_active_radio
|
||||
|
||||
case $1 in
|
||||
p|pair)
|
||||
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -eq 0 ]; then
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}" | grep "Paired:" | awk '{print $2}')
|
||||
if [ "${PAIR_STATUS}" == "yes" ]; then
|
||||
echo "Device with MAC ${MAC} is already paired."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Goto Menu > Configuration > Bluetooth > Pairing Mode"
|
||||
echo -e "4. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
echo "Searching for ${DEVICE_NAME}..."
|
||||
|
||||
HCI_OUT=$(hcitool scan | grep "${DEVICE_NAME}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Can't find ${DEVICE_NAME}. Make sure that the radio is on and in pairing mode."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAC=$(echo ${HCI_OUT} | awk '{print $1}')
|
||||
|
||||
# Update configuration file detected MAC address
|
||||
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
|
||||
|
||||
# Generate an expect script to automatically pair our device.
|
||||
PAIR_SCRIPT="${HOME}/pair"
|
||||
|
||||
cat <<EOF > ${PAIR_SCRIPT}
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set device "${MAC}"
|
||||
set timeout 60
|
||||
|
||||
spawn bluetoothctl
|
||||
expect "Agent registered"
|
||||
send "power on\r"
|
||||
expect "Changing power on succeeded"
|
||||
send "scan on\r"
|
||||
expect "${MAC}"
|
||||
send "pair ${MAC}\r"
|
||||
expect {
|
||||
"Enter PIN code" {
|
||||
send "0000\r"
|
||||
}
|
||||
"Confirm passkey" {
|
||||
send "yes\r"
|
||||
}
|
||||
}
|
||||
expect "Pairing successful"
|
||||
send "trust ${MAC}\r"
|
||||
expect "trust succeeded"
|
||||
send "exit\r"
|
||||
expect eof
|
||||
EOF
|
||||
|
||||
sleep 1 && chmod 755 ${PAIR_SCRIPT} && expect ${PAIR_SCRIPT}
|
||||
|
||||
;;
|
||||
u|unpair)
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC found in radio configuration file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No device with ${MAC} found. Can't unpair."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Unpairing ${DEVICE_NAME}..."
|
||||
bluetoothctl untrust ${MAC}
|
||||
bluetoothctl remove ${MAC}
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "You may also want to remove this device from your ${DEVICE_NAME}"
|
||||
echo -e "under Menu > Configuration > Bluetooth > Connect > <select device> > Menu > Clear"
|
||||
echo -e "${NC}"
|
||||
|
||||
;;
|
||||
c|connect)
|
||||
get_mac_or_exit
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Menu > Configuration > Bluetooth > On"
|
||||
echo -e "4. Menu > Configuration > Interface > KISS > Bluetooth"
|
||||
echo -e "5. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
is_paired=$(bluetoothctl info ${MAC} | grep "Paired" | awk '{print $2}')
|
||||
if [ "${is_paired}" != "yes" ]; then
|
||||
echo -e "${RED}"
|
||||
et-log "${DEVICE_NAME} is not paired. Run: '$(basename $0) pair'"
|
||||
echo -e "${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "Found ${DEVICE_NAME} with MAC address: ${MAC}"
|
||||
|
||||
update_ax25_conf
|
||||
|
||||
sudo rfcomm connect ${BT_DEVICE} ${MAC} ${BLUETOOTH_CHANNEL} 1>/dev/null 2>&1 &
|
||||
|
||||
sleep 10 && reset
|
||||
|
||||
if [[ ! -e "${BT_DEVICE}" ]]; then
|
||||
echo -e "${RED}Failed to connect via Bluetooth${NC}"
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Try turning off and back on your radio."
|
||||
echo -e "2. Check your radio and ensure that ${BLUE}$(hostname)${YELLOW} is listed under:"
|
||||
echo -e " Menu > General Settings> Connection > Paired Devices: $(hostname)."
|
||||
echo -e ""
|
||||
echo -e " If it is not listed, re-run: ${WHITE}$(basename $0) pair${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stop_all_services
|
||||
|
||||
echo -e "\nSelect a packet application to start:"
|
||||
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"axcall")
|
||||
do_kiss_attach
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "SAMPLE COMMANDS DESCRIPTION "
|
||||
echo -e "----------------------------- --------------------------------"
|
||||
echo -e "axcall wl2k <STATION> Connect directly to a node "
|
||||
echo -e "axcall wl2k <STATION> <DIGI> Connect to node via a digipeater"
|
||||
echo -e "sudo axlisten -a -tttt -c Monitor inbound and outbound traffic"
|
||||
echo -e "${NC}"
|
||||
|
||||
# We can't have the rfcomm and kiss processes killed.
|
||||
CLEAN_UP=0
|
||||
break
|
||||
;;
|
||||
"QtTermTCP")
|
||||
et-qttermtcp start 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"Winlink")
|
||||
do_kiss_attach
|
||||
start_and_wait_for_service et-service-winlink-native-packet
|
||||
min http://localhost:8080 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"YAAC")
|
||||
et-yaac start
|
||||
break
|
||||
;;
|
||||
"Exit")
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option, please select a number from the list."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
;;
|
||||
*)
|
||||
et-log "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
20
overlay/opt/emcomm-tools/bin/et-time
Executable file
20
overlay/opt/emcomm-tools/bin/et-time
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 21 November 2024
|
||||
# Purpose : Determines if time has been synchronized via GPS
|
||||
|
||||
if [ ! -e /dev/et-gps ]; then
|
||||
et-log "No GPS detected. Can't verify time sync"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TRACKING_INFO=$(chronyc tracking | grep GPS)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "GPS plugged in, but not used for time source. There may an internet connection."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
et-log "Time appears to be synched via GPS"
|
||||
echo ""
|
||||
chronyc tracking | grep time
|
||||
53
overlay/opt/emcomm-tools/bin/et-user
Executable file
53
overlay/opt/emcomm-tools/bin/et-user
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 25 October 2024
|
||||
# Updated: 4 November 2024
|
||||
# Purpose: Set user-specific settings for EmComm Tools.
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
if [ ! -e ${ET_USER_CONFIG} ]; then
|
||||
cp /etc/skel/.config/emcomm-tools/user.json ${ET_USER_CONFIG}
|
||||
fi
|
||||
|
||||
CUR_CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
CUR_GRID=$(cat ${ET_USER_CONFIG} | jq -r .grid)
|
||||
CUR_WINLINK_PASSWD=$(cat ${ET_USER_CONFIG} | jq -r .winlinkPasswd)
|
||||
|
||||
while true; do
|
||||
read -e -p "Enter your callsign (current: ${CUR_CALLSIGN}): " callsign
|
||||
read -e -p "Enter your maidenhead grid square (current: ${CUR_GRID}): " grid
|
||||
read -e -p "Enter your Winlink password: " winlink_passwd
|
||||
|
||||
callsign=${callsign:-"$CUR_CALLSIGN"}
|
||||
grid=${grid:-"$CUR_GRID"}
|
||||
winlink_passwd=${winlink_passwd:-"$CUR_WINLINK_PASSWD"}
|
||||
|
||||
echo
|
||||
echo "Is the following correct?:"
|
||||
echo "Callsign: $callsign"
|
||||
echo "Grid Square: $grid"
|
||||
echo "Winlink Password: *******"
|
||||
read -p "(y/n): " confirm
|
||||
|
||||
if [[ "$confirm" =~ ^[Yy]$ ]]; then
|
||||
|
||||
cat <<EOF > "${ET_USER_CONFIG}"
|
||||
{
|
||||
"callsign": "${callsign}",
|
||||
"grid": "${grid}",
|
||||
"winlinkPasswd": "${winlink_passwd}"
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "User settings updated..."
|
||||
break
|
||||
elif [[ "$confirm" =~ ^[Nn]$ ]]; then
|
||||
echo "Let's try again."
|
||||
echo
|
||||
else
|
||||
echo "Please enter 'y' or 'n'."
|
||||
fi
|
||||
done
|
||||
|
||||
64
overlay/opt/emcomm-tools/bin/et-user-backup
Executable file
64
overlay/opt/emcomm-tools/bin/et-user-backup
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 14 January 2025
|
||||
# Updated : 1 February 2025
|
||||
# Purpose : Back up select files from the user's home directory.
|
||||
#
|
||||
# The backups are limited to the following:
|
||||
# 1. EmComm Tools configuration
|
||||
# 2. Winlink email
|
||||
# 3. SSH keys
|
||||
|
||||
TODAY=$(date +"%Y%m%d")
|
||||
BACKUP_FILE="${HOME}/etc-user-backup-${HOSTNAME}-${TODAY}.tar.gz"
|
||||
|
||||
ESC="\033"
|
||||
CYAN="$ESC[36m"
|
||||
GREEN="$ESC[0;32m"
|
||||
RED="$ESC[0;31m"
|
||||
WHITE="$ESC[1;37m"
|
||||
YELLOW="$ESC[1;33m"
|
||||
NC="$ESC[0m"
|
||||
|
||||
if [ -e "${BACKUP_FILE}" ]; then
|
||||
echo -e -n "${RED}A backup file for today exists. Can ${WHITE}${BACKUP_FILE} ${RED}be overwritten? (y/n) ${NC}"
|
||||
read response
|
||||
[[ $response != [yY] ]] && echo "Skipping backup and exiting." && exit 1
|
||||
fi
|
||||
|
||||
# All paths are relative to $HOME.
|
||||
BACKUP_DIRS=(
|
||||
".config/emcomm-tools"
|
||||
".local/share/emcomm-tools"
|
||||
".local/share/pat"
|
||||
)
|
||||
|
||||
tar -czf ${BACKUP_FILE} \
|
||||
--transform 's|^.*\.local|.local|' \
|
||||
-C "${HOME}" "${BACKUP_DIRS[@]}"
|
||||
|
||||
[ $? -ne 0 ] && et-log "Error creating backup" && exit 1
|
||||
|
||||
# Test that we can read if after we create it.
|
||||
TAR_OUT=$(tar -tzf ${BACKUP_FILE})
|
||||
[ $? -ne 0 ] && et-log "Can't read backup file: ${BACKUP_FILE}. Error creating backup." && exit 1
|
||||
|
||||
echo -e "${GREEN}Backup created: ${WHITE}${BACKUP_FILE}\n"
|
||||
|
||||
echo -e "${CYAN}Note: Only the following directories were backed up:"
|
||||
for dir in "${BACKUP_DIRS[@]}"; do
|
||||
echo "* $dir"
|
||||
done
|
||||
|
||||
echo -e "\nIf you need files outside of these directories, please back them up manually.\n${NC}"
|
||||
|
||||
read -p "Do you want see the full list of files backed up? (y/n) " response
|
||||
[[ $response != [yY] ]] && exit 0
|
||||
|
||||
echo -e "1. ${YELLOW}Press ${WHITE}[SPACE]${YELLOW} to page through the list of files.${NC}"
|
||||
echo -e "2. ${YELLOW}Press ${WHITE}[UP/DOWN]${YELLOW} to scroll through the list of files.${NC}"
|
||||
echo -e "3. ${YELLOW}Press ${WHITE}q${YELLOW} when done viewing the list of files.\n${NC}"
|
||||
read -p "Press any key to view the backup."
|
||||
|
||||
tar -tzf ${BACKUP_FILE} | less
|
||||
|
||||
46
overlay/opt/emcomm-tools/bin/et-user-restore
Executable file
46
overlay/opt/emcomm-tools/bin/et-user-restore
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 15 January 2025
|
||||
# Updated : 17 January 2025
|
||||
# Purpose : Restore backup to user's home directory.
|
||||
|
||||
BACKUP_FILE_PATTERN="etc-user-backup-*.tar.gz"
|
||||
USB_MEDIA_MOUNT=/media
|
||||
|
||||
options=()
|
||||
|
||||
# 1. Search home directory
|
||||
echo "Searching ${HOME} for backup files...."
|
||||
while IFS= read -r backup; do
|
||||
options+=("${backup}" "")
|
||||
done < <(find ~ -type f -name ${BACKUP_FILE_PATTERN} 2> /dev/null)
|
||||
|
||||
# 2. Search attached USB drive
|
||||
DF_OUT=$(df -h | grep ${USB_MEDIA_MOUNT})
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Searching ${USB_MEDIA_MOUNT} for backup files...."
|
||||
while IFS= read -r backup; do
|
||||
options+=("${backup}" "")
|
||||
done < <(find ${USB_MEDIA_MOUNT} -type f -name ${BACKUP_FILE_PATTERN} 2> /dev/null)
|
||||
fi
|
||||
|
||||
selected_file=$(dialog --clear --menu "Select a backup to restore" 20 80 10 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
|
||||
tput sgr 0 && clear
|
||||
|
||||
[ ${exit_status} -ne 0 ] && echo "No backup selected. Exiting." && exit 1
|
||||
|
||||
[ ! -e "${selected_file}" ] && echo "File ${selected_file} does not exist. Exiting."
|
||||
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
cd ~ && tar -xzf "${selected_file}"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "${selected_file} restored to ${HOME}."
|
||||
else
|
||||
echo "An error occured while attempting to restore ${selected_file}"
|
||||
fi
|
||||
|
||||
cd ${CWD}
|
||||
314
overlay/opt/emcomm-tools/bin/et-uv-pro
Executable file
314
overlay/opt/emcomm-tools/bin/et-uv-pro
Executable file
@@ -0,0 +1,314 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 January 2025
|
||||
# Updated : 17 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
CLEAN_UP=1
|
||||
|
||||
cleanup() {
|
||||
# Note: We need to reconnect to the Bluetooth device on every mode change.
|
||||
# As such, we need kill all the rfcomm and kiss process on exit.
|
||||
if [[ ${CLEAN_UP} -eq 1 ]]; then
|
||||
sudo /opt/emcomm-tools/bin/et-kill-bt
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill all Bluetooth TNC services on exit
|
||||
trap cleanup EXIT
|
||||
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/btech-uvpro.bt.json"
|
||||
DEVICE_NAME="UV-PRO"
|
||||
BT_DEVICE="/dev/rfcomm0"
|
||||
AX25_PORT="wl2k"
|
||||
AX25_CONF_FILE="/etc/ax25/axports"
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <command>"
|
||||
echo " c, connect - Connect to radio via Bluetooth"
|
||||
echo " p, pair - Pair radio (one-time operation)"
|
||||
echo " u, unpair - Unpair radio"
|
||||
|
||||
CLEAN_UP=0
|
||||
}
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -e ${BT_DEVICE} ]]; then
|
||||
echo -e "${YELLOW}Your ${BLUE}${DEVICE_NAME}${YELLOW} may have a connection that needs to be cleaned up."
|
||||
echo -e "Press ${WHITE}[ENTER]${YELLOW} to clean-up.${NC}"
|
||||
read -p ""
|
||||
|
||||
cleanup
|
||||
fi
|
||||
|
||||
stop_all_services() {
|
||||
et-kill-all
|
||||
}
|
||||
|
||||
exit_if_no_active_radio () {
|
||||
if [ ! -e ${ACTIVE_RADIO} ]; then
|
||||
echo "${ACTIVE_RADIO} file not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
get_mac_or_exit () {
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC address found in ${ACTIVE_RADIO}."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
update_ax25_conf() {
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
et-log "No callsign set. Run et-user first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GREP_OUT=$(grep ${AX25_PORT} ${AX25_CONF_FILE})
|
||||
if [ $? -eq 0 ]; then
|
||||
# Delete all existing AX.25 port entries. Note: we can't use sed here
|
||||
# since we do not have permission to create a temporary file with
|
||||
# inline replacement. ed modifies the file directly.
|
||||
printf "g/^${AX25_PORT}/d\nw\nq\n" | ed ${AX25_CONF_FILE} > /dev/null 2>&1
|
||||
|
||||
fi
|
||||
|
||||
echo "${AX25_PORT} ${CALLSIGN} 1200 255 2 1200 Packet" >> ${AX25_CONF_FILE}
|
||||
}
|
||||
|
||||
do_kiss_attach() {
|
||||
echo -e "${BLUE}Connecting KISS interface using ${BT_DEVICE} and AX.25 port: ${AX25_PORT}${NC}"
|
||||
KISS_OUT=$(sudo kissattach ${BT_DEVICE} ${AX25_PORT})
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "${RED}Failed to attach KISS port.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KISS_OUT=$(sudo kissparms -c 1 -p ${AX25_PORT})
|
||||
}
|
||||
|
||||
exit_on_service_failure() {
|
||||
local systemd_unit_name="$1"
|
||||
systemctl is-active --user --quiet "${systemd_unit_name}"
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start mode. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
TIMEOUT=15 # Total time to wait in seconds
|
||||
INTERVAL=2 # Interval between checks in seconds
|
||||
|
||||
start_and_wait_for_service() {
|
||||
local systemd_unit_name="$1"
|
||||
local elapsed=0
|
||||
|
||||
et-log "Starting ${systemd_unit_name}..."
|
||||
systemctl --user start ${systemd_unit_name}
|
||||
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
|
||||
while ! systemctl is-active --user --quiet "${systemd_unit_name}"; do
|
||||
sleep "$INTERVAL"
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
if [ "$elapsed" -ge "$TIMEOUT" ]; then
|
||||
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
done
|
||||
|
||||
# Some applications even when started still need a bit of extra time to be available.
|
||||
# Add a short think time of 2 seconds. The ARDOP modem requies extra time.
|
||||
sleep 2
|
||||
|
||||
# Do one more check to ensure that we are running, otherwise exit.
|
||||
exit_on_service_failure ${systemd_unit_name}
|
||||
}
|
||||
|
||||
|
||||
exit_if_no_active_radio
|
||||
|
||||
case $1 in
|
||||
p|pair)
|
||||
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -eq 0 ]; then
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}" | grep "Paired:" | awk '{print $2}')
|
||||
if [ "${PAIR_STATUS}" == "yes" ]; then
|
||||
echo "Device with MAC ${MAC} is already paired."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Goto Menu > Pairing and press OK"
|
||||
echo -e "4. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
echo "Searching for ${DEVICE_NAME}..."
|
||||
|
||||
HCI_OUT=$(hcitool scan | grep "${DEVICE_NAME}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Can't find ${DEVICE_NAME}. Make sure that the radio is on and in pairing mode."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAC=$(echo ${HCI_OUT} | awk '{print $1}')
|
||||
|
||||
# Update configuration file detected MAC address
|
||||
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
|
||||
|
||||
# Generate an expect script to automatically pair our device.
|
||||
PAIR_SCRIPT="${HOME}/pair"
|
||||
|
||||
cat <<EOF > ${PAIR_SCRIPT}
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set device "${MAC}"
|
||||
set timeout 60
|
||||
|
||||
spawn bluetoothctl
|
||||
expect "Agent registered"
|
||||
send "power on\r"
|
||||
expect "Changing power on succeeded"
|
||||
send "scan on\r"
|
||||
expect "${MAC}"
|
||||
send "pair ${MAC}\r"
|
||||
expect "Pairing successful"
|
||||
send "trust ${MAC}\r"
|
||||
expect "trust succeeded"
|
||||
send "exit\r"
|
||||
expect eof
|
||||
EOF
|
||||
|
||||
sleep 1 && chmod 755 ${PAIR_SCRIPT} && expect ${PAIR_SCRIPT}
|
||||
|
||||
;;
|
||||
u|unpair)
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC found in radio configuration file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No device with ${MAC} found. Can't unpair."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Unpairing ${DEVICE_NAME}..."
|
||||
bluetoothctl untrust ${MAC}
|
||||
bluetoothctl remove ${MAC}
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "You may also want to remove this device from your ${DEVICE_NAME}"
|
||||
echo -e "under Menu > General Settings > Connection > Paired Devices."
|
||||
echo -e "${NC}"
|
||||
|
||||
;;
|
||||
c|connect)
|
||||
get_mac_or_exit
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Goto Menu > General Settings > KISS TNC > Enable KISS TNC"
|
||||
echo -e "4. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
is_paired=$(bluetoothctl info ${MAC} | grep "Paired" | awk '{print $2}')
|
||||
if [ "${is_paired}" != "yes" ]; then
|
||||
echo -e "${RED}${DEVICE_NAME} is not paired. Run: '${WHITE}$(basename $0) pair${RED}'"
|
||||
echo -e "${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "Found ${DEVICE_NAME} with MAC address: ${MAC}"
|
||||
|
||||
update_ax25_conf
|
||||
|
||||
sudo rfcomm connect /dev/rfcomm0 ${MAC} 1>/dev/null 2>&1 &
|
||||
|
||||
sleep 10 && reset
|
||||
|
||||
if [[ ! -e "${BT_DEVICE}" ]]; then
|
||||
echo -e "${RED}Failed to connect via Bluetooth${NC}"
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Try turning off and back on your radio."
|
||||
echo -e "2. Check your radio and ensure that ${BLUE}$(hostname)${YELLOW} is listed under:"
|
||||
echo -e " Menu > General Settings> Connection > Paired Devices: $(hostname)."
|
||||
echo -e ""
|
||||
echo -e " If it is not listed, re-run: ${WHITE}$(basename $0) pair${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stop_all_services
|
||||
|
||||
echo -e "\nSelect a packet application to start:"
|
||||
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"axcall")
|
||||
do_kiss_attach
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "SAMPLE COMMANDS DESCRIPTION "
|
||||
echo -e "----------------------------- --------------------------------"
|
||||
echo -e "axcall wl2k <STATION> Connect directly to a node "
|
||||
echo -e "axcall wl2k <STATION> <DIGI> Connect to node via a digipeater"
|
||||
echo -e "sudo axlisten -a -tttt -c Monitor inbound and outbound traffic"
|
||||
echo -e "${NC}"
|
||||
|
||||
# We can't have the rfcomm and kiss processes killed.
|
||||
CLEAN_UP=0
|
||||
break
|
||||
;;
|
||||
"QtTermTCP")
|
||||
et-qttermtcp start 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"Winlink")
|
||||
do_kiss_attach
|
||||
start_and_wait_for_service et-service-winlink-native-packet
|
||||
min http://localhost:8080 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"YAAC")
|
||||
et-yaac start
|
||||
break
|
||||
;;
|
||||
"Exit")
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option, please select a number from the list."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
;;
|
||||
*)
|
||||
et-log "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
38
overlay/opt/emcomm-tools/bin/et-vara-fm
Executable file
38
overlay/opt/emcomm-tools/bin/et-vara-fm
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 7 February 2025
|
||||
# Purpose : Run VARA FM
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
EXE="${HOME}/.wine32/drive_c/VARA FM/VARAFM.exe"
|
||||
|
||||
if [[ ! -e ${EXE} ]]; then
|
||||
echo -e "${RED}"
|
||||
echo -e "${EXE} does not exist."
|
||||
echo -e "You might NOT have installed the windows subsystem (WINE)."
|
||||
echo -e "Navigate to ${WHITE}${HOME}/add-ons/wine${RED} and follow the"
|
||||
echo -e "instructions in the ${WHITE}README.md${RED} file."
|
||||
echo -e "${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [[ -e /dev/et-audio ]]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
# Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
else
|
||||
echo -e "${RED}No ET_AUDIO device detected.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}No ET_AUDIO device plugged in.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wine ~/.wine32/drive_c/VARA\ FM/VARAFM.exe
|
||||
38
overlay/opt/emcomm-tools/bin/et-vara-hf
Executable file
38
overlay/opt/emcomm-tools/bin/et-vara-hf
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 20 January 2025
|
||||
# Updated : 7 February 2025
|
||||
# Purpose : Run VARA HF
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
EXE="${HOME}/.wine32/drive_c/VARA/VARA.exe"
|
||||
|
||||
if [[ ! -e ${EXE} ]]; then
|
||||
echo -e "${RED}"
|
||||
echo -e "${EXE} does not exist."
|
||||
echo -e "You might NOT have installed the windows subsystem (WINE)."
|
||||
echo -e "Navigate to ${WHITE}${HOME}/add-ons/wine${RED} and follow the"
|
||||
echo -e "instructions in the ${WHITE}README.md${RED} file."
|
||||
echo -e "${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [[ -e /dev/et-audio ]]; then
|
||||
|
||||
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
# Configure ALSA settings for sound card
|
||||
/opt/emcomm-tools/bin/et-audio update-config
|
||||
else
|
||||
echo -e "${RED}No ET_AUDIO device detected.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}No ET_AUDIO device plugged in.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wine ${EXE}
|
||||
315
overlay/opt/emcomm-tools/bin/et-vr-n76
Executable file
315
overlay/opt/emcomm-tools/bin/et-vr-n76
Executable file
@@ -0,0 +1,315 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# : Cliff Jones
|
||||
# Date : 1 January 2025
|
||||
# Updated : 17 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the Vero VGC VR-N76.
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
CLEAN_UP=1
|
||||
|
||||
cleanup() {
|
||||
# Note: We need to reconnect to the Bluetooth device on every mode change.
|
||||
# As such, we need kill all the rfcomm and kiss process on exit.
|
||||
if [[ ${CLEAN_UP} -eq 1 ]]; then
|
||||
sudo /opt/emcomm-tools/bin/et-kill-bt
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill all Bluetooth TNC services on exit
|
||||
trap cleanup EXIT
|
||||
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/vgc-vrn76.bt.json"
|
||||
DEVICE_NAME="VR-N76"
|
||||
BT_DEVICE="/dev/rfcomm0"
|
||||
AX25_PORT="wl2k"
|
||||
AX25_CONF_FILE="/etc/ax25/axports"
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $(basename $0) <command>"
|
||||
echo " c, connect - Connect to radio via Bluetooth"
|
||||
echo " p, pair - Pair radio (one-time operation)"
|
||||
echo " u, unpair - Unpair radio"
|
||||
|
||||
CLEAN_UP=0
|
||||
}
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -e ${BT_DEVICE} ]]; then
|
||||
echo -e "${YELLOW}Your ${BLUE}${DEVICE_NAME}${YELLOW} may have a connection that needs to be cleaned up."
|
||||
echo -e "Press ${WHITE}[ENTER]${YELLOW} to clean-up.${NC}"
|
||||
read -p ""
|
||||
|
||||
cleanup
|
||||
fi
|
||||
|
||||
stop_all_services() {
|
||||
et-kill-all
|
||||
}
|
||||
|
||||
exit_if_no_active_radio () {
|
||||
if [ ! -e ${ACTIVE_RADIO} ]; then
|
||||
echo "${ACTIVE_RADIO} file not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
get_mac_or_exit () {
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC address found in ${ACTIVE_RADIO}."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
update_ax25_conf() {
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
et-log "No callsign set. Run et-user first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GREP_OUT=$(grep ${AX25_PORT} ${AX25_CONF_FILE})
|
||||
if [ $? -eq 0 ]; then
|
||||
# Delete all existing AX.25 port entries. Note: we can't use sed here
|
||||
# since we do not have permission to create a temporary file with
|
||||
# inline replacement. ed modifies the file directly.
|
||||
printf "g/^${AX25_PORT}/d\nw\nq\n" | ed ${AX25_CONF_FILE} > /dev/null 2>&1
|
||||
|
||||
fi
|
||||
|
||||
echo "${AX25_PORT} ${CALLSIGN} 1200 255 2 1200 Packet" >> ${AX25_CONF_FILE}
|
||||
}
|
||||
|
||||
do_kiss_attach() {
|
||||
echo -e "${BLUE}Connecting KISS interface using ${BT_DEVICE} and AX.25 port: ${AX25_PORT}${NC}"
|
||||
KISS_OUT=$(sudo kissattach ${BT_DEVICE} ${AX25_PORT})
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "${RED}Failed to attach KISS port.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KISS_OUT=$(sudo kissparms -c 1 -p ${AX25_PORT})
|
||||
}
|
||||
|
||||
exit_on_service_failure() {
|
||||
local systemd_unit_name="$1"
|
||||
systemctl is-active --user --quiet "${systemd_unit_name}"
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start mode. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
TIMEOUT=15 # Total time to wait in seconds
|
||||
INTERVAL=2 # Interval between checks in seconds
|
||||
|
||||
start_and_wait_for_service() {
|
||||
local systemd_unit_name="$1"
|
||||
local elapsed=0
|
||||
|
||||
et-log "Starting ${systemd_unit_name}..."
|
||||
systemctl --user start ${systemd_unit_name}
|
||||
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
|
||||
while ! systemctl is-active --user --quiet "${systemd_unit_name}"; do
|
||||
sleep "$INTERVAL"
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
if [ "$elapsed" -ge "$TIMEOUT" ]; then
|
||||
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||
exit 1
|
||||
fi
|
||||
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||
done
|
||||
|
||||
# Some applications even when started still need a bit of extra time to be available.
|
||||
# Add a short think time of 2 seconds. The ARDOP modem requies extra time.
|
||||
sleep 2
|
||||
|
||||
# Do one more check to ensure that we are running, otherwise exit.
|
||||
exit_on_service_failure ${systemd_unit_name}
|
||||
}
|
||||
|
||||
|
||||
exit_if_no_active_radio
|
||||
|
||||
case $1 in
|
||||
p|pair)
|
||||
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -eq 0 ]; then
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}" | grep "Paired:" | awk '{print $2}')
|
||||
if [ "${PAIR_STATUS}" == "yes" ]; then
|
||||
echo "Device with MAC ${MAC} is already paired."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Goto Menu > Pairing and press OK"
|
||||
echo -e "4. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
echo "Searching for ${DEVICE_NAME}..."
|
||||
|
||||
HCI_OUT=$(hcitool scan | grep "${DEVICE_NAME}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Can't find ${DEVICE_NAME}. Make sure that the radio is on and in pairing mode."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAC=$(echo ${HCI_OUT} | awk '{print $1}')
|
||||
|
||||
# Update configuration file detected MAC address
|
||||
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
|
||||
|
||||
# Generate an expect script to automatically pair our device.
|
||||
PAIR_SCRIPT="${HOME}/pair"
|
||||
|
||||
cat <<EOF > ${PAIR_SCRIPT}
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set device "${MAC}"
|
||||
set timeout 60
|
||||
|
||||
spawn bluetoothctl
|
||||
expect "Agent registered"
|
||||
send "power on\r"
|
||||
expect "Changing power on succeeded"
|
||||
send "scan on\r"
|
||||
expect "${MAC}"
|
||||
send "pair ${MAC}\r"
|
||||
expect "Pairing successful"
|
||||
send "trust ${MAC}\r"
|
||||
expect "trust succeeded"
|
||||
send "exit\r"
|
||||
expect eof
|
||||
EOF
|
||||
|
||||
sleep 1 && chmod 755 ${PAIR_SCRIPT} && expect ${PAIR_SCRIPT}
|
||||
|
||||
;;
|
||||
u|unpair)
|
||||
MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No MAC found in radio configuration file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PAIR_STATUS=$(bluetoothctl info "${MAC}")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No device with ${MAC} found. Can't unpair."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Unpairing ${DEVICE_NAME}..."
|
||||
bluetoothctl untrust ${MAC}
|
||||
bluetoothctl remove ${MAC}
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "You may also want to remove this device from your ${DEVICE_NAME}"
|
||||
echo -e "under Menu > General Settings > Connection > Paired Devices."
|
||||
echo -e "${NC}"
|
||||
|
||||
;;
|
||||
c|connect)
|
||||
get_mac_or_exit
|
||||
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Turn off your ${DEVICE_NAME}"
|
||||
echo -e "2. Turn on your ${DEVICE_NAME}"
|
||||
echo -e "3. Goto Menu > General Settings > KISS TNC > Enable KISS TNC"
|
||||
echo -e "4. Press ${WHITE}[ENTER]${YELLOW} when done.${NC}"
|
||||
read -p ""
|
||||
|
||||
is_paired=$(bluetoothctl info ${MAC} | grep "Paired" | awk '{print $2}')
|
||||
if [ "${is_paired}" != "yes" ]; then
|
||||
echo -e "${RED}${DEVICE_NAME} is not paired. Run: '${WHITE}$(basename $0) pair${RED}'"
|
||||
echo -e "${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "Found ${DEVICE_NAME} with MAC address: ${MAC}"
|
||||
|
||||
update_ax25_conf
|
||||
|
||||
sudo rfcomm connect /dev/rfcomm0 ${MAC} 1>/dev/null 2>&1 &
|
||||
|
||||
sleep 10 && reset
|
||||
|
||||
if [[ ! -e "${BT_DEVICE}" ]]; then
|
||||
echo -e "${RED}Failed to connect via Bluetooth${NC}"
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "1. Try turning off and back on your radio."
|
||||
echo -e "2. Check your radio and ensure that ${BLUE}$(hostname)${YELLOW} is listed under:"
|
||||
echo -e " Menu > General Settings> Connection > Paired Devices: $(hostname)."
|
||||
echo -e ""
|
||||
echo -e " If it is not listed, re-run: ${WHITE}$(basename $0) pair${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stop_all_services
|
||||
|
||||
echo -e "\nSelect a packet application to start:"
|
||||
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"axcall")
|
||||
do_kiss_attach
|
||||
echo -e "${YELLOW}"
|
||||
echo -e "SAMPLE COMMANDS DESCRIPTION "
|
||||
echo -e "----------------------------- --------------------------------"
|
||||
echo -e "axcall wl2k <STATION> Connect directly to a node "
|
||||
echo -e "axcall wl2k <STATION> <DIGI> Connect to node via a digipeater"
|
||||
echo -e "sudo axlisten -a -tttt -c Monitor inbound and outbound traffic"
|
||||
echo -e "${NC}"
|
||||
|
||||
# We can't have the rfcomm and kiss processes killed.
|
||||
CLEAN_UP=0
|
||||
break
|
||||
;;
|
||||
"QtTermTCP")
|
||||
et-qttermtcp start 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"Winlink")
|
||||
do_kiss_attach
|
||||
start_and_wait_for_service et-service-winlink-native-packet
|
||||
min http://localhost:8080 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"YAAC")
|
||||
et-yaac start
|
||||
break
|
||||
;;
|
||||
"Exit")
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option, please select a number from the list."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
;;
|
||||
*)
|
||||
et-log "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
175
overlay/opt/emcomm-tools/bin/et-winlink
Executable file
175
overlay/opt/emcomm-tools/bin/et-winlink
Executable file
@@ -0,0 +1,175 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 4 November 2024
|
||||
# Updated : 4 February 2025
|
||||
# Purpose : Wrapper script for starting YAAC with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Appropriate modem is started: Dire Wolf (et-direwolf) or ARDOP (et-ardop).
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Callsign, Winlink password, and grid are updated are updated
|
||||
# 2. pat http is started
|
||||
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
PAT_CONF_FILE=${HOME}/.config/pat/config.json
|
||||
PAT_CONF_FILE_TEMPLATE=/etc/skel/.config/pat/config.json
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
echo " start-ardop - Start Pat Winlink in ardop mode"
|
||||
echo " start-packet - Start Pat Winlink in packet mode"
|
||||
echo " start-native-packet - Start Pat Winlink in native AX.25 packet mode"
|
||||
echo " start-vara-fm - Start Pat Winlink in VARA FM mode"
|
||||
echo " start-vara-hf - Start Pat Winlink in VARA HF mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 10000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start_ardop() {
|
||||
|
||||
ps -ef | grep "[a]rdopcf"
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start Pat in ARDOP mode. ARDOP not running. Run: et-ardop"
|
||||
notify_user "ARDOP not running. Run: et-ardop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
update_config ardop
|
||||
|
||||
CMD="pat http"
|
||||
et-log "Starting Pat with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
}
|
||||
|
||||
start_packet() {
|
||||
|
||||
RIGCTLD_OUT=$(ps -ef | grep "[d]irewolf")
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start Pat in packet mode. Dire Wolf not running. Run: et-direwolf simple-packet"
|
||||
notify_user "Dire Wolf not running. Run: et-direwolf simple-packet"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
update_config packet
|
||||
|
||||
CMD="pat http"
|
||||
et-log "Starting Pat with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
}
|
||||
|
||||
# Only the BTECH UV PRO is supported in this mode
|
||||
start_native_packet() {
|
||||
|
||||
BLUETOOTH_TNC_CHECK=$(ps -ef | grep "[r]fcomm connect")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "${RED}Can't start Pat in native AX.25 packet mode."
|
||||
echo -e "If you have a UV Pro, first run: ${YELLOW}et-uv-pro connect${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
update_config native-packet
|
||||
|
||||
CMD="pat http"
|
||||
et-log "Starting Pat with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
}
|
||||
|
||||
start_vara_fm() {
|
||||
|
||||
update_config vara-fm
|
||||
|
||||
CMD="pat http"
|
||||
et-log "Starting Pat with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
}
|
||||
|
||||
start_vara_hf() {
|
||||
|
||||
update_config vara-hf
|
||||
|
||||
CMD="pat http"
|
||||
et-log "Starting Pat with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
}
|
||||
|
||||
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
|
||||
notify_user "Can't start Pat. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
ardop)
|
||||
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.ardop.json
|
||||
;;
|
||||
packet)
|
||||
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.ax25-agw.json
|
||||
;;
|
||||
native-packet)
|
||||
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.ax25-native.json
|
||||
;;
|
||||
vara-fm)
|
||||
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.vara-fm.json
|
||||
;;
|
||||
vara-hf)
|
||||
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.vara-hf.json
|
||||
;;
|
||||
esac
|
||||
|
||||
et-log "Updating Pat configuration file: ${PAT_CONF_FILE}..."
|
||||
cp -v ${PAT_CONF_FILE_TEMPLATE} ${PAT_CONF_FILE}
|
||||
|
||||
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${PAT_CONF_FILE}
|
||||
sed -i "s|{{ET_WINLINK_PASSWD}}|${WINLINK_PASSWD}|g" ${PAT_CONF_FILE}
|
||||
sed -i "s|{{ET_GRID}}|${GRID}|g" ${PAT_CONF_FILE}
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start-ardop)
|
||||
start_ardop
|
||||
;;
|
||||
start-packet)
|
||||
start_packet
|
||||
;;
|
||||
start-native-packet)
|
||||
start_native_packet
|
||||
;;
|
||||
start-vara-fm)
|
||||
start_vara_fm
|
||||
;;
|
||||
start-vara-hf)
|
||||
start_vara_hf
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
118
overlay/opt/emcomm-tools/bin/et-yaac
Executable file
118
overlay/opt/emcomm-tools/bin/et-yaac
Executable file
@@ -0,0 +1,118 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 3 November 2024
|
||||
# Updated : 16 March 2025
|
||||
# Purpose : Wrapper script for starting YAAC with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Dire Wolf is started or Bluetooth TNC is connected
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Callsign is updated in YAAC
|
||||
# 2. YAAC is started
|
||||
|
||||
YAAC_CONF_DIR=${HOME}/.java/.userPrefs/org/ka2ddo/yaac
|
||||
YAAC_CONF_FILE_PORTS=${YAAC_CONF_DIR}/Ports/prefs.xml
|
||||
YAAC_CONF_FILE_PORTS_TEMPLATE=/etc/skel/.java/.userPrefs/org/ka2ddo/yaac/Ports/prefs.xml
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
echo " start - Start YAAC"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start() {
|
||||
update-config
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
CMD="java -jar /opt/yaac/YAAC.jar"
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0")
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Starting YAAC in Bluetooth mode with: ${CMD}"
|
||||
${CMD}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Starting YAAC in Dire Wolf mode with: ${CMD}"
|
||||
${CMD}
|
||||
else
|
||||
et-log "Can't start YAAC. Dire Wolf or Bluetooth TNC services not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
et-log "Error updating configuration. Can't start YAAC"
|
||||
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)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start YAAC. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
et-log "Updating YAAC ports file: ${YAAC_CONF_FILE_PORTS}..."
|
||||
cp -v ${YAAC_CONF_FILE_PORTS_TEMPLATE} ${YAAC_CONF_FILE_PORTS}
|
||||
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${YAAC_CONF_FILE_PORTS}
|
||||
|
||||
# Add GPS port only if it is available
|
||||
systemctl status gpsd --no-pager > /dev/null
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "GPS not connected. Removing GPS port from configuration."
|
||||
sed -i '/GPSD/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "Bluetooth TNC not connected. Removing rfcomm port from configuration."
|
||||
sed -i '/Serial_TNC/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[d]irewolf")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "Dire Wolf not running. Removing KISS over TCP port from configuration."
|
||||
sed -i '/KISS-over-TCP/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
echo "Generated the configuration below..."
|
||||
echo
|
||||
cat ${YAAC_CONF_FILE_PORTS}
|
||||
echo
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
13
overlay/opt/emcomm-tools/conf/radios.d/btech-uvpro.bt.json
Normal file
13
overlay/opt/emcomm-tools/conf/radios.d/btech-uvpro.bt.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "btech-uvpro",
|
||||
"vendor": "BTECH",
|
||||
"model": "UV PRO (BT)",
|
||||
"bluetooth": {
|
||||
"mac": ""
|
||||
},
|
||||
"notes": [
|
||||
"Menu > General Settings > KISS TNC > Enable KISS TNC = checked"
|
||||
],
|
||||
"fieldNotes": [
|
||||
]
|
||||
}
|
||||
11
overlay/opt/emcomm-tools/conf/radios.d/digirig-lite.json
Normal file
11
overlay/opt/emcomm-tools/conf/radios.d/digirig-lite.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "digirig-lite",
|
||||
"vendor": "DigiRig",
|
||||
"model": "Lite",
|
||||
"rigctrl": {
|
||||
"id": "1",
|
||||
"ptt": "NONE"
|
||||
},
|
||||
"notes": [
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "digirig-mobile-no-cat",
|
||||
"vendor": "DigiRig",
|
||||
"model": "Mobile (No CAT)",
|
||||
"rigctrl": {
|
||||
"id": "6",
|
||||
"ptt": "RTS"
|
||||
},
|
||||
"notes": [
|
||||
"Set your VFO manually",
|
||||
"Adjust your volume, RF gain and squelch manually"
|
||||
]
|
||||
}
|
||||
16
overlay/opt/emcomm-tools/conf/radios.d/elecraft-kx2.json
Normal file
16
overlay/opt/emcomm-tools/conf/radios.d/elecraft-kx2.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": "elecraft-kx2",
|
||||
"vendor": "Elecraft",
|
||||
"model": "KX-2 (DigiRig)",
|
||||
"rigctrl": {
|
||||
"id": "2044",
|
||||
"baud": "38400",
|
||||
"ptt": "RTS"
|
||||
},
|
||||
"notes": [
|
||||
"In Menu set RS232 to 38400 b",
|
||||
"Note current Mic Gain setting then set to 5 (ALC meter should read 3-5 bars during TX)",
|
||||
"Set AF Gain to 15 (ensure input level is green in JS8CALL)",
|
||||
"For voice operation, return Mic Gain to setting noted above (25 typical)"
|
||||
]
|
||||
}
|
||||
13
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7100.json
Normal file
13
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7100.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "icom-ic7100",
|
||||
"vendor": "Icom",
|
||||
"model": "IC-7100",
|
||||
"rigctrl": {
|
||||
"id": "3070",
|
||||
"baud": "9600",
|
||||
"ptt": "RIG"
|
||||
},
|
||||
"notes": [
|
||||
"TODO: Add notes"
|
||||
]
|
||||
}
|
||||
18
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7200.json
Normal file
18
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7200.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "icom-ic7200",
|
||||
"vendor": "Icom",
|
||||
"model": "IC-7200",
|
||||
"rigctrl": {
|
||||
"id": "3061",
|
||||
"baud": "19200",
|
||||
"ptt": "RIG"
|
||||
},
|
||||
"notes": [
|
||||
"Set SSB to USB",
|
||||
"Set filter to wide",
|
||||
"Menu DATA = ON",
|
||||
"Menu D-Mod = U ",
|
||||
"Menu USB Lvl = 75",
|
||||
"Menu CIV BAUD = At (Automatic) or 19200"
|
||||
]
|
||||
}
|
||||
13
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json
Normal file
13
overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "icom-ic7300",
|
||||
"vendor": "Icom",
|
||||
"model": "IC-7300",
|
||||
"rigctrl": {
|
||||
"id": "3073",
|
||||
"baud": "19200",
|
||||
"ptt": "RIG"
|
||||
},
|
||||
"notes": [
|
||||
"[MENU] > [SET] > [Connectors] > [CI-V] > CI-V USB Baud Rate = 19200"
|
||||
]
|
||||
}
|
||||
16
overlay/opt/emcomm-tools/conf/radios.d/kenwood-thd74.bt.json
Normal file
16
overlay/opt/emcomm-tools/conf/radios.d/kenwood-thd74.bt.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": "kenwood-thd74",
|
||||
"vendor": "Kenwood",
|
||||
"model": "TH-D74 (BT)",
|
||||
"bluetooth": {
|
||||
"deviceName" : "TH-D74",
|
||||
"channel": "2",
|
||||
"mac": ""
|
||||
},
|
||||
"notes": [
|
||||
"Menu > Configuration > Bluetooth > On",
|
||||
"Menu > Configuration > Interface > KISS > Bluetooth"
|
||||
],
|
||||
"fieldNotes": [
|
||||
]
|
||||
}
|
||||
@@ -8,6 +8,6 @@
|
||||
"ptt": "RIG"
|
||||
},
|
||||
"notes": [
|
||||
"The QMX uses the Kenwood TS-440 CAT control driver"
|
||||
"This is device is purely plug-and-play and requires no changes."
|
||||
]
|
||||
}
|
||||
|
||||
15
overlay/opt/emcomm-tools/conf/radios.d/vgc-vrn76.bt.json
Normal file
15
overlay/opt/emcomm-tools/conf/radios.d/vgc-vrn76.bt.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "vgc-vrn76",
|
||||
"vendor": "VGC",
|
||||
"model": "VR-N76 (BT)",
|
||||
"bluetooth": {
|
||||
"mac": ""
|
||||
},
|
||||
"notes": [
|
||||
"Menu > General Settings > KISS TNC > Enable KISS TNC = checked"
|
||||
],
|
||||
"fieldNotes": [
|
||||
"Power cycle VGC between each Bluetooth operation",
|
||||
"If power cycling VGC doesn't help, cycle Bluetooth on laptop"
|
||||
]
|
||||
}
|
||||
24
overlay/opt/emcomm-tools/conf/radios.d/xiegu-g90.json
Normal file
24
overlay/opt/emcomm-tools/conf/radios.d/xiegu-g90.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "xiegu-g90",
|
||||
"vendor": "Xiegu",
|
||||
"model": "G90 (DigiRig)",
|
||||
"rigctrl": {
|
||||
"id": "3088",
|
||||
"baud": "19200",
|
||||
"ptt": "RTS"
|
||||
},
|
||||
"notes": [
|
||||
"AGC = OFF (AGC--)",
|
||||
"MODE = U-D",
|
||||
"RF-GAIN = 50%",
|
||||
"AUX IN = 10",
|
||||
"AUX OUT = 13"
|
||||
],
|
||||
"fieldNotes": [
|
||||
"Set AGC: Short press [AGC]",
|
||||
"Set Mode: Press Mode arrow keys on top of head unit ",
|
||||
"Set RF Gain: Long press [AGC]. Use VFO knob to change",
|
||||
"Set AUX IN: Long press [FUNC]. Menu 5. Use VFO to change",
|
||||
"Set AUX OUT: Long press [FUNC]. Menu 6. Use VFO to change"
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "yaesu-ft818nd",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FT-818ND",
|
||||
"model": "FT-818ND (DigiRig)",
|
||||
"rigctrl": {
|
||||
"id": "1041",
|
||||
"baud": "38400",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "yaesu-ft857d",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FT-857D",
|
||||
"model": "FT-857D (DigiRig)",
|
||||
"rigctrl": {
|
||||
"id": "1022",
|
||||
"baud": "38400",
|
||||
@@ -12,7 +12,7 @@
|
||||
"Menu 020 CAT = CAT",
|
||||
"Menu 036 DIG DISP = 0 Hz",
|
||||
"Menu 037 DIG GAIN = 50",
|
||||
"Menu 038 DIG MODE = USB-U",
|
||||
"Menu 038 DIG MODE = USER-U",
|
||||
"Menu 039 DIG SHIFT = 0 Hz",
|
||||
"Menu 040 DIG VOX = 0",
|
||||
"Menu 071 PKT 1200 = 10",
|
||||
|
||||
37
overlay/opt/emcomm-tools/conf/radios.d/yaesu-ft891.json
Normal file
37
overlay/opt/emcomm-tools/conf/radios.d/yaesu-ft891.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"id": "yaesu-ft891",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FT-891 (DR-891)",
|
||||
"rigctrl": {
|
||||
"id": "1036",
|
||||
"baud": "38400",
|
||||
"ptt": "RIG"
|
||||
},
|
||||
"notes": [
|
||||
"05-06 CAT RATE = 38400bps",
|
||||
"05-07 CAT TOT = 100ms",
|
||||
"05-08 CAT RTS = DISABLE",
|
||||
"08-01 DATA MODE = OTHERS",
|
||||
"08-02 PSK TONE = 1500Hz",
|
||||
"08-03 OTHER DISP = 1500Hz",
|
||||
"08-04 OTHER SHIFT = 1500Hz",
|
||||
"08-05 DATA LCUT FREQ = OFF",
|
||||
"08-07 DATA HCUT FREQ = OFF",
|
||||
"08-09 DATA IN SELECT = REAR",
|
||||
"08-10 DATA PTT SELECT = DAKY",
|
||||
"08-11 DATA OUT LEVEL = 50",
|
||||
"08-12 DATA BFO = USB",
|
||||
"11-07 SSB BFO = AUTO",
|
||||
"For digital operation always set Mode = DATA",
|
||||
"For digital operation always set WDH = 3000",
|
||||
"For digital operation always set mode to USB"
|
||||
],
|
||||
"fieldNotes": [
|
||||
"Long press [BAND] and select DATA using the VFO knob",
|
||||
"Short press [F] multiple times and stop at FUNCTION-1 screen",
|
||||
"Use the MFK to select WDH",
|
||||
"Short press the MFK, then rotate to set the WDH value to 3000",
|
||||
"Long press [F] to exit",
|
||||
"Set digital output power via menu 16-03."
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user