esp-iot-solution icon indicating copy to clipboard operation
esp-iot-solution copied to clipboard

usb cdc 4g module issue & ppp connect error (AEGHB-842)

Open yel-best opened this issue 1 year ago • 1 comments

Answers checklist.

  • [X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

use ESP-IDF 5.2.3 use USB CDC 4G module EC801E-CN use usb cdc 4g module demo

Use the default configuration, and enable ppp, insert the sim card, connect the 4g module via usb, and run the use case program to get the following log, you can see the telecom, but can not make a ppp connection, what is the reason?

esp_modem_dce: esp_modem_dce_generic_command(31): Command:ATD*99***1#

I (11702) 4g_main: Modem Board Event: SIM Card Connected
E (11705) led_indicator: ./managed_components/espressif__led_indicator/src/led_indicator.c:461 (led_indicator_stop):invalid p_handle
I (11702) modem_board: Modem state STAGE_CHECK_SIM, Success!
I (11824) modem_board: Modem state STAGE_CHECK_SIGNAL, Start
I (11826) modem_board: Signal quality: rssi=22, ber=99
I (11826) modem_board: Modem state STAGE_CHECK_SIGNAL, Success!
I (11931) modem_board: Modem state STAGE_CHECK_REGIST, Start
I (11934) modem_board: Network registered, Operator: "CHN-UNICOM"
I (11934) modem_board: Modem state STAGE_CHECK_REGIST, Success!
I (12039) modem_board: Modem state STAGE_START_PPP, Start
W (12045) esp_modem_dce: esp_modem_dce_generic_command(31): Command:ATD*99***1#
...failed
E (12048) esp-modem-dte: esp_dte_handle_line(79): handle line failed
E (22045) esp-modem-dte: esp_modem_dte_send_cmd(272): process command timeout
 response timeoutem_dce: esp_modem_dce_generic_command(26): Command:ATO
E (22050) esp_modem_dce: esp_modem_switch_to_data_mode(144): Resume data mode failed
E (22059) esp_modem_dce: esp_modem_dce_set_working_mode(168): Setting data mode failed
E (22067) esp-modem-dte: esp_modem_dte_change_mode(354): set new working mode:1 failed
E (22076) esp-modem: esp_modem_start_ppp(46): enter ppp mode failed
W (22083) modem_board: Modem state STAGE_START_PPP, Failed, retry1, after 3000ms...

yel-best avatar Oct 10 '24 11:10 yel-best

It seems that the AT endpoint of this 4G module does not support switching to the PPPoS communication mode. Try using a dual-interface approach: one interface for sending AT commands and the other for sending PPPoS data packets.

Set the following configuration:
CONFIG_MODEM_SUPPORT_SECONDARY_AT_PORT=y

lijunru-hub avatar Nov 19 '24 06:11 lijunru-hub