Skip to content

cinterion: fix setting current modes

Lukas Vögl requested to merge lvoegl/ModemManager:cinterion-current-modes into main

When setting current modes in a Cinterion PLS8 modem, it sometimes takes more than 20 seconds to receive a response for the AT+COPS command issued when changing current modes (maybe related to #716).

<inf> [1715334926.319447] [modem0] processing user request to set current modes to '4g' (preferred 'none')...
<dbg> [1715334926.321481] [ttyACM1/at] --> 'AT+COPS=,,,7<CR>'
<dbg> [1715334946.575959] [modem0] loading signal quality...
<dbg> [1715334946.976680] [ttyACM1/at] <-- '<CR><LF>OK<CR><LF><CR><LF>+CGEV: NW DETACH<CR><LF><CR><LF>+CGEV: NW DETACH<CR><LF><CR><LF>+CIEV: 1,0<CR><LF><CR><LF>+CIEV: 2,0<CR><LF><CR><LF>+CIEV: 6,0<CR><LF><CR><LF>+CIEV: 4,0<CR><LF><CR><LF>+CIEV: 1,5<CR><LF><CR><LF>+CIEV: 1,4<CR><LF><CR><LF>+CIEV: 3,1<CR><LF><CR><LF>+CIEV: 2,1<CR><LF><CR><LF>+CIEV: 4,1<CR><LF><CR><LF>+CIEV: 6,1<CR><LF><CR><LF>+CGREG: 0<CR><LF><CR><LF>+CIEV: psinfo,3<CR><LF><CR><LF>+CIEV: psinfo,0<CR><LF><CR><LF>+CREG: 2<CR><LF><CR><LF>+CGREG: 2<CR><LF><CR><LF>+CEREG: 2<CR><LF><CR><LF>+CIEV: psinfo,17<CR><LF>'


Also, the Cinterion plugin implements load_access_technologies via SIND psinfo URCs, which makes the periodic signal check skip polling access technologies. When disabling the periodic signal check here, both signal quality and access technologies are cleared, but clearing access technologies interferes with the URCs.

<inf> [1716803190.163878] [modem0] processing user request to set current modes to '2g' (preferred 'none')...
<dbg> [1716803190.165292] [ttyACM1/at] device open count is 3 (open)
<dbg> [1716803190.166211] [ttyACM1/at] --> 'AT+COPS=,,,0<CR>'
<dbg> [1716803210.316723] [ttyACM1/at] <-- '<CR><LF>OK<CR><LF><CR><LF>+CGEV: NW DETACH<CR><LF><CR><LF>+CIEV: 3,0<CR><LF><CR><LF>+CIEV: 1,0<CR><LF><CR><LF>+CIEV: 2,0<CR><LF><CR><LF>+CIEV: 6,0<CR><LF><CR><LF>+CIEV: 4,0<CR><LF><CR><LF>+CIEV: 1,4<CR><LF><CR><LF>+CIEV: 1,3<CR><LF><CR><LF>+CIEV: 2,1<CR><LF><CR><LF>+CIEV: 4,1<CR><LF><CR><LF>+CIEV: 6,1<CR><LF><CR><LF>+CGREG: 0<CR><LF><CR><LF>+CEREG: 0<CR><LF><CR><LF>+CIEV: psinfo,16<CR><LF><CR><LF>+CIEV: psinfo,3<CR><LF><CR><LF>+CREG: 2<CR><LF><CR><LF>+CGREG: 2<CR><LF><CR><LF>+CEREG: 2<CR><LF><CR><LF>+CIEV: psinfo,0<CR><LF><CR><LF>+CEREG: 4<CR><LF><CR><LF>+CIEV: psinfo,4<CR><LF>'
<dbg> [1716803210.320474] [modem0] (cinterion) received indicator 'psinfo' update: 16
<dbg> [1716803210.321298] [modem0] (cinterion) received indicator 'psinfo' update: 3
<inf> [1716803210.322303] [modem0] access technology changed (lte -> edge)
<dbg> [1716803210.322815] [modem0] (cinterion) received indicator 'psinfo' update: 0
<inf> [1716803210.323988] [modem0] access technology changed (edge -> unknown)
<dbg> [1716803210.324447] [modem0] (cinterion) received indicator 'psinfo' update: 4
<inf> [1716803210.325712] [modem0] access technology changed (unknown -> edge)
# changed technology from psinfo URC

<msg> [1716803210.327026] [modem0] network forced PS detach: all contexts have been deactivated
<dbg> [1716803210.331261] [modem0] signal quality updated (0)
<dbg> [1716803210.333957] [modem0] signal quality updated (20)
<msg> [1716803210.346531] [modem0] 3GPP registration state changed (roaming -> registering)
<dbg> [1716803210.347503] [modem0] loading Operator Code...
<dbg> [1716803210.348633] [ttyACM1/at] device open count is 4 (open)
<dbg> [1716803210.350606] [ttyACM1/at] device open count is 5 (open)
<msg> [1716803210.352592] [modem0] 3GPP registration state changed (roaming -> searching)
<inf> [1716803210.353825] [modem0] consolidated registration state: cs 'searching', ps 'idle', eps 'idle', 5gs 'unknown' --> 'searching'
<msg> [1716803210.357753] [modem0] 3GPP packet service state changed (attached -> detached)
<msg> [1716803210.361229] [modem0] state changed (registered -> searching)
<dbg> [1716803210.374343] [modem0] signal quality updated (0)
<inf> [1716803210.375521] [modem0] access technology changed (edge -> unknown)
# cleared technology by disabling periodic signal check

<dbg> [1716803210.376004] [modem0] periodic signal checks disabled
<dbg> [1716803210.382964] [modem0] periodic signal check refresh ignored: checks not enabled
<inf> [1716803210.383384] [modem0] current modes set to '2g' (preferred 'none')

It seems we should not clear access technologies if polling access technologies is unsupported.

Merge request reports