ESP Modem component CMUX example not working

skateone
Posts: 7
Joined: Fri May 19, 2017 12:06 pm

ESP Modem component CMUX example not working

Postby skateone » Mon Mar 21, 2022 10:00 pm

Good day.
I am trying to get your esp modem component working with my SIMCOM A 7672E modem.
my requirement is to be able to CMUX gps AT commands while handling an active PPPos connection with the ESP32C3 SOC.


compent URL : https://components.espressif.com/compon ... /esp_modem

The example doesnt work...

i have neabled the debug log on the standard CMUX example provided :

D (844) intr_alloc: Connected src 39 to int 2 (cpu 0)
I (849) sleep: Configure to isolate all GPIO pins in sleep state
I (856) sleep: Enable automatic switching of GPIO sleep configuration
D (863) cpu_start: Setting C++ exception workarounds.
D (868) intr_alloc: Connected src 50 to int 3 (cpu 0)
I (873) cpu_start: Starting scheduler.
D (877) intr_alloc: Connected src 37 to int 4 (cpu 0)
D (877) heap_init: New heap initialised at 0x3fcc0000
D (877) intr_alloc: Connected src 33 to int 7 (cpu 0)
D (887) event: running task for loop 0x3fc95c50
D (887) event: created task for loop 0x3fc95c50
D (887) event: created event loop 0x3fc95c50
D (897) esp_netif_lwip: LwIP stack has been initialized
D (897) esp_netif_lwip: esp-netif has been successfully initialized
I (25907) uart: queue free spaces: 30
D (25907) intr_alloc: Connected src 22 to int 9 (cpu 0)
D (25907) esp_netif_objects: esp_netif_add_to_list 0x3fc9b0cc
D (25907) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1)
D (25917) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3fc9b3fc
D (25927) esp-netif_lwip-ppp: Phase Dead
D (25927) command_lib: generic_command command AT+CMUX=0

D (25937) command_lib: Response: AT+CMUX=0
OK

D (25947) CMUX: Payload frame: dlci:00 type:73 payload:0 available:2
D (25957) CMUX: Payload frame: dlci:01 type:73 payload:0 available:2
D (25967) CMUX: Payload frame: dlci:02 type:73 payload:0 available:2
D (25977) command_lib: generic_command command ATE0

D (25977) CMUX: Payload frame: dlci:01 type:ef payload:5 available:19
D (25977) CMUX: Payload frame: dlci:01 type:ef payload:6 available:8
E (26477) cmux_example: Failed to configure desired mode... exiting
D (26477) event: deleted loop 0x3fc95c50

rpiloverbd
Posts: 101
Joined: Tue Mar 22, 2022 5:23 am

Re: ESP Modem component CMUX example not working

Postby rpiloverbd » Tue Mar 22, 2022 5:28 am

Hi, I think you'll get more help if you share your connection diagram.

skateone
Posts: 7
Joined: Fri May 19, 2017 12:06 pm

Re: ESP Modem component CMUX example not working

Postby skateone » Tue Mar 22, 2022 8:22 pm

The modem connections are custom but i have changed the example source to cater for that.
here goes:

Modem reset IO9. ( this is the boot pin i know but it works well for modem reset )
Modem Power: IO5

IO9 and IO5 drive grounding mosfets that act as switches

MOdem Status : IO6 ( feedback from modem to esp32c3 formodem power status )
Modem TXD: IO7
Modem TXD: IO10

TX and TX pass through a 3.3V to 1.8V bidirectional Voltage translator

If you look at the logs the modem powers up and get access to the AT interface. all the other exemples work fine..
Just not the CMUX

skateone
Posts: 7
Joined: Fri May 19, 2017 12:06 pm

Re: ESP Modem component CMUX example not working

Postby skateone » Mon Mar 28, 2022 11:31 am

an update:

i have been testing with the terminal example app...

from what i can see the unit goes into cmux mode but then after that the response times out..

cmux init log

I (39897) modem_console: Switching to CMUX name...
D (39897) command_lib: generic_command command AT+CMUX=0

] (39898) TERM: starting cmd transaction [AT+CMUX=0
D (39918) DATA RECEIVED: 0x3fc9e414 41 54 2b 43 4d 55 58 3d 30 0d 0d 0a 4f 4b 0d 0a |AT+CMUX=0...OK..|
D (39919) command_lib: Response: AT+CMUX=0
OK


D (39932) CMUX Received: 0x3fc9e414 f9 03 73 01 d7 f9 |..s...|
D (39933) CMUX: Payload frame: dlci:00 type:73 payload:0 available:2
D (39951) CMUX Received: 0x3fc9e414 f9 07 73 01 15 f9 |..s...|
D (39952) CMUX: Payload frame: dlci:01 type:73 payload:0 available:2
D (39971) CMUX Received: 0x3fc9e414 f9 0b 73 01 92 f9 |..s...|
D (39972) CMUX: Payload frame: dlci:02 type:73 payload:0 available:2
I (39990) modem_console: OK


cmux enabled with AT sent:

I (218315) modem_console: Sending command AT with timeout 1000
] (218316) TERM: starting cmd transaction [AT
I (218317) TERM CMUX: set read callback
D (218328) Send: 0x3fc9fd08 f9 05 ef 07 |....|
D (218329) Send: 0x3fc9fe18 41 54 0d |AT.|
D (218340) Send: 0x3fc9fd0c b2 f9 |..|
D (218337) CMUX Received: 0x3fc9e414 f9 05 ef 07 41 54 0d b2 f9 f9 05 ef 0d 0d 0a 4f |....AT.........O|
D (218363) CMUX Received: 0x3fc9e424 4b 0d 0a 5f f9 |K.._.|
D (218364) CMUX: Payload frame: dlci:01 type:ef payload:3 available:17
D (218375) CMUX: Payload frame: dlci:01 type:ef payload:6 available:8
I (219351) TERM CMUX: set read callback
E (219351) modem_console: Failed with TIMEOUT


The repsonse from the modem is correct but seems like the callback functions are not triggereing corredctly and then we incure a timeout

akabhinav32
Posts: 1
Joined: Tue May 24, 2022 7:23 am

Re: ESP Modem component CMUX example not working

Postby akabhinav32 » Tue May 24, 2022 7:26 am

I have the same use case, the same SIMCOM chip, and the same problem. Could you find a solution to the problem?

Thanks

skateone
Posts: 7
Joined: Fri May 19, 2017 12:06 pm

Re: ESP Modem component CMUX example not working

Postby skateone » Fri Jun 03, 2022 9:39 pm

i wrote my own cmux handler but its still has lots of bugs. want to attemt the new realease.. will let you know on the outcome of that

Who is online

Users browsing this forum: Bing [Bot] and 109 guests