Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple_cmux_client example of modem-v1.0.2 does not work with SIM800c and ESP32 (IDFGH-11134) #366

Closed
3 tasks done
Hossein-M98 opened this issue Sep 26, 2023 · 1 comment

Comments

@Hossein-M98
Copy link

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hello
I am using esp-idf-v5.1.1 and esp-protocols-modem-v1.0.2.
I compiled the simple_cmux_client example and programmed my board, but it seems there is a bug in the esp-protocols-modem-v1.0.2 release that DCE can't enter the CMUX mode.
I just changed the UART pins in sdkconfig to match my board. Likewise, I also changed the DCE device to SIM800.
Debug logs are available here:

I (0) cpu_start: App cpu up.
I (504) cpu_start: Pro cpu start user code
I (504) cpu_start: cpu freq: 160000000 Hz
I (504) cpu_start: Application information:
I (509) cpu_start: Project name:     simple_cmux_client
I (515) cpu_start: App version:      1
I (519) cpu_start: Compile time:     Sep 26 2023 08:52:30
I (526) cpu_start: ELF file SHA256:  46dbbb0d3508d699...
I (531) cpu_start: ESP-IDF:          v5.1.1-dirty
I (537) cpu_start: Min chip rev:     v0.0
I (542) cpu_start: Max chip rev:     v3.99 
I (546) cpu_start: Chip rev:         v3.0
I (551) heap_init: Initializing. RAM available for dynamic allocation:
I (559) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (564) heap_init: At 3FFB52E0 len 0002AD20 (171 KiB): DRAM
I (571) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (577) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (583) heap_init: At 4008D924 len 000126DC (73 KiB): IRAM
I (591) spi_flash: detected chip: generic
I (594) spi_flash: flash io: dio
I (602) app_start: Starting scheduler on CPU0
I (603) app_start: Starting scheduler on CPU1
I (603) main_task: Started on CPU0
I (613) main_task: Calling app_main()
I (613) uart: queue free spaces: 30
I (623) cmux_example: not set_flow_control, because 2-wire mode active.
W (1083) CMUX: Restarting CMUX state machine (reason: 4)
I (1083) CMUX: Protocol recovered
E (1753) cmux_example: Failed to configure multiplexed command mode... exiting
I (1753) main_task: Returned from app_main()
@github-actions github-actions bot changed the title simple_cmux_client example of modem-v1.0.2 does not work with SIM800c and ESP32 simple_cmux_client example of modem-v1.0.2 does not work with SIM800c and ESP32 (IDFGH-11134) Sep 26, 2023
david-cermak added a commit to david-cermak/esp-protocols that referenced this issue Sep 26, 2023
1.0.3
Bug Fixes
- Fix to allow MSC frame (SIM800 CMUX) after v1.0.2 (8d5947e, espressif#366)
- Add CMUX example to target tests (4f2ebaa)
@david-cermak
Copy link
Collaborator

Thanks for the quick report. Indeed, that latest change did break the CMUX protocol for SIM800. Added a lot of consistency checks to make the CMUX more strict (and robust), but missed the MSC frame.

Should be fixed in 8d5947e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants