From 32179bd18d9634864f4dd6ce0cc8bfbf70539a2d Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sun, 28 Jun 2026 16:46:46 -0700 Subject: [PATCH] retiuclum - Added support to dynamically enable/disable modem73 depending on the system state --- overlay/etc/skel/.reticulum/README.md | 1 + ...em73-node => config.blueprint.modem73-only-node} | 3 +-- overlay/opt/emcomm-tools/bin/et-reticulum | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) rename overlay/etc/skel/.reticulum/{config.blueprint.modem73-node => config.blueprint.modem73-only-node} (98%) diff --git a/overlay/etc/skel/.reticulum/README.md b/overlay/etc/skel/.reticulum/README.md index 4e0955c..ede9738 100644 --- a/overlay/etc/skel/.reticulum/README.md +++ b/overlay/etc/skel/.reticulum/README.md @@ -26,6 +26,7 @@ the supported tokens below. ET_CALLSIGN ET_RETICULUM_INTERFACE_AUTO_ENABLED ET_RETICULUM_INTERFACE_AX25KISS_ENABLED +ET_RETICULUM_INTERFACE_MODEM73_ENABLED ET_RETICULUM_INTERFACE_RNODE_BANDWIDTH ET_RETICULUM_INTERFACE_RNODE_CODINGRATE ET_RETICULUM_INTERFACE_RNODE_ENABLED diff --git a/overlay/etc/skel/.reticulum/config.blueprint.modem73-node b/overlay/etc/skel/.reticulum/config.blueprint.modem73-only-node similarity index 98% rename from overlay/etc/skel/.reticulum/config.blueprint.modem73-node rename to overlay/etc/skel/.reticulum/config.blueprint.modem73-only-node index 3fa2ba1..e3b6e85 100644 --- a/overlay/etc/skel/.reticulum/config.blueprint.modem73-node +++ b/overlay/etc/skel/.reticulum/config.blueprint.modem73-only-node @@ -129,9 +129,8 @@ [[modem73]] type = Modem73Interface mode = roaming - enabled = yes + enabled = {{ET_RETICULUM_INTERFACE_MODEM73_ENABLED}} target_host = 127.0.0.1 target_port = 8001 control_host = 127.0.0.1 control_port = 8073 - diff --git a/overlay/opt/emcomm-tools/bin/et-reticulum b/overlay/opt/emcomm-tools/bin/et-reticulum index 99301fd..4c53d18 100755 --- a/overlay/opt/emcomm-tools/bin/et-reticulum +++ b/overlay/opt/emcomm-tools/bin/et-reticulum @@ -137,6 +137,19 @@ fi et-log "Updating configuration for this session..." +############################################################ +# MODEM73 interface updates +############################################################ + +# Enable/disable intereface based on PnP device detection +IS_MODEM73_RUNNING=`ps -ef | grep [m]odem73` +if [[ $? -eq 0 ]]; then + INTERFACE_MODEM73_ENABLED="yes" +else + INTERFACE_MODEM73_ENABLED="no" +fi +sed -i "s|{{ET_RETICULUM_INTERFACE_MODEM73_ENABLED}}|${INTERFACE_MODEM73_ENABLED}|g" ${RETICULUM_CONF_FILE} + ############################################################ # AX.25 KISS (Packet Radio) interface updates ############################################################