Skip to content

Commit 443c58b

Browse files
SeppoTakalodivipillaiCopilot
authored
Apply suggestions from code review
Co-authored-by: Divya S Pillai <91891495+divipillai@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent c112c24 commit 443c58b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/scripts/sm2_stop_cmux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ log_dbg() {
5252
fi
5353
}
5454

55-
AT_CMUX=$(ls /dev/gsmtty* 2>/dev/null | sort -V | head -n 1 || true)
55+
AT_CMUX=$(ls /dev/gsmtty* 2>/dev/null | sort -V | head -n 2 | tail -n 1 || true)
5656

5757
# Stop modem trace collection if running
5858
start-stop-daemon --stop --pidfile $TRACE_PID_FILE --remove-pidfile --oknodo --retry 1
5959

60-
# Send CMUX CLD frame via AT command on channel 1 if available
60+
# Send CMUX CLD frame via AT command on the AT command channel (DLC 2) if available
6161
if [ -n "$AT_CMUX" ] && [ -c "$AT_CMUX" ]; then
6262
log_dbg "Sending AT#XCMUXCLD on $AT_CMUX"
6363
chat $CHATOPT -t5 '' 'AT#XCMUXCLD' 'OK' >$AT_CMUX <$AT_CMUX || true

doc/app/sm_cellular_modem.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ PPP cannot function while the modem is in NTN mode, so it must be stopped and re
195195
Option A manages CMUX and PPP as a single lifecycle: stopping PPP also issues ``AT+CFUN=0`` and tears down CMUX.
196196
For NTN scenarios, use the separate CMUX management scripts so that CMUX stays alive across PPP restarts:
197197

198-
* :file:`sm2_start_cmux.sh` — starts CMUX only, then exits. The ``gsmtty`` channels remain open.
199-
* :file:`sm2_stop_cmux.sh` — stops CMUX and releases the serial port.
200-
* :file:`sm2_start_ppp.sh` with the ``-C`` flag attaches PPP to an already-running CMUX. When PPP stops, the modem and CMUX are left untouched.
198+
* :file:`sm2_start_cmux.sh` - Starts CMUX only, then exits. The ``gsmtty`` channels remain open.
199+
* :file:`sm2_stop_cmux.sh` - Stops CMUX and releases the serial port.
200+
* :file:`sm2_start_ppp.sh` with the ``-C`` flag - attaches PPP to an already-running CMUX. When PPP stops, the modem and CMUX are left untouched.
201201

202202
When PPP is not running, all CMUX channels (``gsmtty1`` and ``gsmtty2``) are available for AT commands.
203203
This allows the host to reconfigure the modem (for example, switch profiles) through the AT channel while PPP is inactive.

0 commit comments

Comments
 (0)