Re: Quectel EC21 with internal GSM MUX

Denis Kenzior <[email protected]> Mon, 6 Oct 2025 08:56:06 -0500
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
Hi Martin,

On 10/6/25 8:15 AM, Martin Hundebøll wrote:
> On Thu, 2025-09-25 at 14:55 +0000, Christian Meusel wrote:
> 
> <snip>
> 
>>      Sep 25 14:45:48 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:ate_cb()
>> 0x4f6400
>>      Sep 25 14:45:48 target ofonod[4030]: at_chat_send_common:
>> enqueued "AT+CMUX=0,0,5,127,10,3,30,10,2", len is 1
>>      Sep 25 14:45:48 target ofonod[4030]: UART: >
>> AT+CMUX=0,0,5,127,10,3,30,10,2\r
>>      Sep 25 14:45:48 target ofonod[4030]: UART: < \r\n
>>      Sep 25 14:45:48 target ofonod[4030]: UART: < OK\r\n
>>      Sep 25 14:45:48 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:cmux_cb()
>> 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/src/modem.c:get_modem_prope
>> rty() modem 0x4f6400 property Mux
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:cmux_acti
>> vation_delay_cb() 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:cmux_gatm
>> ux() 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:create_ch
>> at() 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:create_ch
>> at() 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:identify_
>> model() 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]: at_chat_send_common:
>> enqueued "AT+CGMM", len is 1
>>      Sep 25 14:45:49 target ofonod[4030]: Aux: > AT+CGMM\r
>>      Sep 25 14:45:49 target ofonod[4030]: Aux: <
>> \r\nEC21\r\n\r\nOK\r\n
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:cgmm_cb()
>> 0x4f6400 ok 1
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:cgmm_cb()
>> 0x4f6400 model EC21
>>      Sep 25 14:45:49 target ofonod[4030]:
>> ../../../../../../workspace/sources/ofono/plugins/quectel.c:setup_aux
>> () 0x4f6400
>>      Sep 25 14:45:49 target ofonod[4030]: at_chat_send_common:
>> enqueued "ATE0; &C0; +CMEE=1", len is 1
>>      Sep 25 14:45:49 target ofonod[4030]: at_chat_send_common:
>> enqueued "AT+QURCCFG="urcport","uart1"", len is 2
>>      Sep 25 14:45:49 target ofonod[4030]: at_chat_send_common:
>> enqueued "AT+CFUN?", len is 3
>>      Sep 25 14:45:49 target ofonod[4030]: Aux: > ATE0; &C0; +CMEE=1\r
>>      Sep 25 14:45:49 target ofonod[4030]: Aux: < \r\nOK\r\n
>>      Sep 25 14:45:54 target ofonod[4030]: Aux: < \r\nNORMAL POWER
>> DOWN\r\n
>>      Sep 25 14:45:54 target ofonod[4030]: Modem: < \r\nPOWERED
>> DOWN\r\n
>>      Sep 25 14:45:54 target ofonod[4030]: Aux: < \r\nPOWERED DOWN\r\n
> 
> I think these "POWER" notification from the modem are the culprit. We
> carry the attached patch in our setup to avoid those messages stalling
> the AT parser.

But they come exactly 5 seconds after the initial power up sequence.

> 
> I must admit that past me would have written a better commit message,
> but here we are :/

But these URCs seem fine?  They have both initial and trailing \r\n and no 
trailing spaces?

> 
> With that said: Why does the modem choose to power down? Is
> someone/something toggling the power-up GPIO to the modem?

The 5 second timing is suspicious.  oFono core does set a timer and will invoke 
a .disable() if .enable() doesn't succeed in a given time.  But the default 
timeout is 20 seconds (see src/modem.c DEFAULT_POWERED_TIMEOUT)

Regards,
-Denis