espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.6k stars 7.27k forks source link

ESP Modem crash when GNSS is started (IDFGH-8268) #9755

Closed MartinPatarinski closed 1 year ago

MartinPatarinski commented 2 years ago

Answers checklist.

IDF version.

v5.0-dev-3290-g01d014c42d

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

Custom board with ESP32S3

Power Supply used.

Battery

What is the expected behavior?

I expected that GNSS is started, modem SIM7070G is started and runs normally

What is the actual behavior?

A crash occurs whenever the GNSS is started and trying to get fix status.

Steps to reproduce.

  1. Power Off
  2. Power On
  3. Set baudrate
  4. Set configuration
  5. Set CMUX mode
  6. Attach to network
  7. Wait for IP
  8. Start GNSS
  9. Connect to MQTT Backend over TLS (may be does not affect)

Debug Logs.

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2f (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd03e0,len:0x32c0
load:0x403b6000,len:0xbb8
load:0x403b9000,len:0x4c0c
entry 0x403b6260
W (30) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (46) boot: ESP-IDF v5.0-dev-3290-g01d014c42d-dirty 2nd stage bootloader
I (47) boot: compile time 19:16:19
I (47) boot: chip revision: 0
I (50) boot.esp32s3: Boot SPI Speed : 80MHz
I (55) boot.esp32s3: SPI Mode       : DIO
I (60) boot.esp32s3: SPI Flash Size : 8MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label            Usage          Type ST Offset   Length
I (81) boot:  0 otadata          OTA data         01 00 0000d000 00002000
I (88) boot:  1 reserved         WiFi data        01 02 0000f000 00001000
I (96) boot:  2 ota_0            OTA app          00 10 00010000 00280000
I (103) boot:  3 ota_1            OTA app          00 11 00290000 00280000
I (111) boot:  4 prod             Unknown data     01 ff 00610000 00003000
I (118) boot:  5 safeNVrb0        Unknown data     01 ff 00613000 00003000
I (126) boot:  6 safeNVrb1        Unknown data     01 ff 00616000 00003000
I (133) boot:  7 safeNVrb2        Unknown data     01 ff 00619000 00003000
I (141) boot:  8 config           WiFi data        01 02 0061c000 00046000
I (149) boot:  9 appl             WiFi data        01 02 00662000 00004000
I (156) boot: 10 shared           WiFi data        01 02 00666000 00003000
W (164) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x72414ae0 0x000034b4 0x00000000 0x01000000 0x9458fe00 0x6f52d48c
2) 0x2c8a4b8d 0xa5523167 0xa5d6ca33 0xc06a4058 0x5dead851 0x08070821 0xe0e8ec10 0x3e60daee
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (256) boot: 11 efuse_em         efuse            01 05 00669000 00002000
I (263) boot: 12 nvs_key          NVS keys         01 04 0066b000 00001000
I (271) boot: 13 nvs              WiFi data        01 02 0066c000 00004000
I (278) boot: 14 coredump         Unknown data     01 03 00670000 00008000
I (286) boot: 15 log              Unknown data     01 82 00678000 00050000
I (294) boot: 16 spiffs           Unknown data     01 82 006c8000 00137000
I (301) boot: End of partition table
I (305) boot: No factory image, trying OTA 0
[boot] Custom bootloader message defined in the KConfig file.
I (316) boot: Loading Image: 0!
I (320) esp_image: segment 0: paddr=00010020 vaddr=3c110020 size=55a78h (350840) map
I (391) esp_image: segment 1: paddr=00065aa0 vaddr=3fc97f30 size=05204h ( 20996) load
I (396) esp_image: segment 2: paddr=0006acac vaddr=40374000 size=0536ch ( 21356) load
I (402) esp_image: segment 3: paddr=00070020 vaddr=42000020 size=10264ch (1058380) map
I (595) esp_image: segment 4: paddr=00172674 vaddr=4037936c size=0ebb8h ( 60344) load
I (609) esp_image: segment 5: paddr=00181234 vaddr=50000000 size=00010h (    16) load
I (609) esp_image: segment 6: paddr=0018124c vaddr=600fe000 size=00028h (    40) load
I (615) esp_image: segment 7: paddr=0018127c vaddr=00000000 size=0ed54h ( 60756)
I (634) esp_image: Verifying image signature...
I (634) secure_boot_v2: Verifying with RSA-PSS...
I (637) secure_boot_v2: Signature verified successfully!
I (648) boot: Loaded app from partition at offset 0x10000
I (728) boot: Set actual ota_seq=1 in otadata[0]
I (728) secure_boot_v2: enabling secure boot v2...
I (728) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (735) boot: Disabling RNG early entropy source...
I (752) cpu_start: Pro cpu up.
I (752) cpu_start: Starting app cpu, entry point is 0x403755ac
0x403755ac: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-master/components/esp_system/port/cpu_start.c:152

I (0) cpu_start: App cpu up.
I (766) cpu_start: Pro cpu start user code
I (766) cpu_start: cpu freq: 160000000 Hz
I (766) cpu_start: Application information:
I (769) cpu_start: Project name:     ksc2n_A_Sample
I (774) cpu_start: App version:      Tag_Plan_SW_2236_v1.0_Pre-41-g8
I (781) cpu_start: Compile time:     Sep  8 2022 14:15:38
I (787) cpu_start: ELF file SHA256:  67b17f8232d892e0...
I (793) cpu_start: ESP-IDF:          v5.0-dev-3290-g01d014c42d-dirty
I (800) heap_init: Initializing. RAM available for dynamic allocation:
I (808) heap_init: At 3FCC1F78 len 0001E088 (120 KiB): D/IRAM
I (814) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (821) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (827) heap_init: At 600FE028 len 00001FD8 (7 KiB): RTCRAM
I (834) spi_flash: detected chip: generic
I (838) spi_flash: flash io: dio
W (842) cpu_start: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (857) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x72414ae0 0x000034b4 0x00000000 0x01000000 0x9458fe00 0x6f52d48c
2) 0x2c8a4b8d 0xa5523167 0xa5d6ca33 0xc06a4058 0x5dead851 0x08070821 0xe0e8ec10 0x3e60daee
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (951) sleep: Configure to isolate all GPIO pins in sleep state
I (955) sleep: Enable automatic switching of GPIO sleep configuration
I (962) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1042) SystemLogger: Partition size: total: 293921, used: 0
I (1042) SystemLogger: Initialized
I (1042) SystemLogger: Output mode already set.
W (1172) NVManager: Initializing NVManager_Init
E (1172) NVManager: Read all Operation Data: FAILED !
E (1172) NVManager: Read all Error Data: FAILED !
I (1172) DEM: The DEM is initialized.
I (1172) system_api: Base MAC address is not set
I (1182) system_api: read default base MAC address from EFUSE
I (1192) BE_CommManager: Client initialized successfully
I (1192) gpio: GPIO[6]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1202) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1212) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1222) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1232) gpio: GPIO[45]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1242) gpio: GPIO[46]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1252) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1262) gpio: GPIO[48]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1272) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1282) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1282) EcuManager: +++++++  initialisation completed
I (1292) ResourceManager: WiFi AP name: KSC_DUT
I (1302) ResourceManager: WiFi AP pass: 12345678
I (1302) ResourceManager: ++   initialisation completed, 7 resources initialised
I (1312) DataLogger: Initializing SNTP
E (1322) NVManager: Read all Operation Data: FAILED !
E (1322) NVManager: Read all Error Data: FAILED !
I (1322) HAL_CAN_DRV: Driver installed
I (1332) HAL_CAN_DRV: Driver started
I (1332) HAL_CAN_DRV: Starting transmissions
I (1342) ResourceManager: ++  CAN0 initialized!
I (1342) pp: pp rom version: e7ae62f
I (1352) net80211: net80211 rom version: e7ae62f
I (1362) wifi_init: rx ba win: 6
I (1362) wifi_init: tcpip mbox: 32
I (1362) wifi_init: udp mbox: 6
I (1362) wifi_init: tcp mbox: 6
I (1372) wifi_init: tcp tx win: 5744
I (1372) wifi_init: tcp rx win: 5744
I (1382) wifi_init: tcp mss: 1440
I (1382) wifi_init: WiFi IRAM OP enabled
I (1382) wifi_init: WiFi RX IRAM OP enabled
I (1392) ResourceManager: ++  Modem initialized
I (1392) statusLED: statusLED initialization!
I (1402) statusLED: statusLED initialized!
I (1402) ResourceManager: ++  Modem initialized
I (1412) ResourceManager: ++  RESOURCE_GNSS changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_INIT
I (1422) EcuManager: +++++++  ECU state changed from ECU_STATE_NOT_INIT to ECU_STATE_INITIALIZING
I (1432) EcuManager: Wakeup cause undefined, probably normal startup.
I (1442) ESPModem: Modem successfully initialized
I (1452) EcuManager: NV data check status OK !
I (1452) ResourceManager: ++  CAN0 proceed to starting
I (1462) ResourceManager: ++  IsoLib CAN0 shutting down
I (1462) ResourceManager: ++  WiFI AP starting
I (1472) ResourceManager: ++  Modem initialized
I (1472) ResourceManager: ++  Modem starting
I (1482) EcuManager: +++++++  ECU state changed from ECU_STATE_INITIALIZING to ECU_STATE_NORMAL
I (1492) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1502) ResourceManager: ++  CAN0 starting
I (1512) ResourceManager: ++  CAN0 started successfully
I (1512) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STOPPED with target state: RESOURCE_TARGET_STATE_STARTED
I (1532) ResourceManager: ++  ISOLIB CAN0 starting
I (1532) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1552) ResourceManager: ++  send start AP command
I (1552) WiFi_AP: WiFi starts as AP
I (1562) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
W (1562) phy_init: failed to load RF calibration data (0x110f), falling back to full calibration
I (1672) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1672) WiFi_AP: received WIFI_EVENT_AP_START
I (1672) ResourceManager: ++  send start Modem command
I (1692) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1702) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STOPPED to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1722) ResourceManager: ++  IsoLib CAN0 starting
I (1722) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1742) ResourceManager: ++  connect the STA to the remote AP
W (1742) WiFi_AP: WiFi_AP::connect called but not supported
I (1752) statusLED: Displayed code (status) changed to STATE_BLINK_CODE_22 - J1939 Error
I (1812) CF2_IsoBus: READ_iso_manuf_code: 111 - 0 6f
I (1822) ESPModem: Switching off the Modem...
I (1822) CF2_IsoBus: READ_iso_serial_no: 1398101 - 155555 - 15 55 55
I (1842) CF2_IsoBus: iso_self_cnf_addr: 1 iso_ind_group: 2 iso_dev_class_inst: 0 iso_dev_class: 11 iso_padding: 0 iso_func: 132 iso_func_inst: 0 iso_ecu_inst: 1 iso_man_code: 111 iso_serial_no: 1398101
I (1912) CF3_Telematic: READ_iso_manuf_code: 111 - 0 6f
I (1922) CF3_Telematic: READ_iso_serial_no: 1398101 - 155555 - 15 55 55
I (1942) CF3_Telematic: iso_self_cnf_addr: 1 iso_ind_group: 2 iso_dev_class_inst: 0 iso_dev_class: 11 iso_padding: 0 iso_func: 132 iso_func_inst: 1 iso_ecu_inst: 1 iso_man_code: 111 iso_serial_no: 1398101
I (1962) ResourceManager: ++  IsoLib CAN0 started successfully
I (1972) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1972) ResourceManager: ++  connect the STA to the remote AP
W (1982) WiFi_AP: WiFi_AP::connect called but not supported
I (2502) CF3_Telematic: NETWORK EVENT CF3 32
I (2502) CF3_Telematic: NETWORK EVENT CF3 200
I (2522) CF2_IsoBus: NETWORK EVENT CF2 200
I (2522) CF2_IsoBus: NETWORK EVENT CF2 32
I (2522) statusLED: Displayed code (status) changed to STATE_05_HZ_BLINK_RATE - Normal
I (6902) ESPModem: Modem powered OFF successfully
I (7022) ESPModem: Switching on the Modem...
I (13562) ESPModem: Modem powered ON successfully
I (13572) uart: queue free spaces: 30
I (13572) ESPmodem_Cmux: config NETWORK
I (13582) ESPmodem_Cmux: AT command OK
I (13592) ESPmodem_Cmux: reconfigure to 4-wire UART
I (13612) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (13612) ResourceManager: ++  connect the Modem to Internet
I (13622) ESPmodem_Cmux: config MODEM
I (13632) ESPmodem_Cmux: setting flow_control
I (13632) ESPmodem_Cmux: set_flow_control OK
I (13642) ESPmodem_Cmux: esp_modem_set_network_mode OK
I (13642) ESPmodem_Cmux: set_preferred_mode OK
I (13672) ESPmodem_Cmux: set_network_bands OK
I (13682) ESPmodem_Cmux: Module name: SIMCOM_SIM7070
I (13692) ESPmodem_Cmux: Module SW version: Revision:1951B10SIM7070
I (13702) ESPmodem_Cmux: IMEI: 865456053875009
I (13702) ESPmodem_Cmux: IMSI: 901288005633609
I (13712) ESPmodem_Cmux: Operator name: "A1 BG",9
I (13732) ESPmodem_Cmux: Mode: 9
I (13742) ESPmodem_Cmux: Radio state: 1
I (13772) ESPmodem_Cmux: Battery status: voltage=4263, charging_status=0, level=97
I (13772) ESPmodem_Cmux: Signal quality: rssi=21, ber=99
I (13922) ESPmodem_Cmux: PPP state changed event 259
I (13922) ESPmodem_Cmux: PPP state changed event 262
I (13932) ESPmodem_Cmux: Modem has correctly entered multiplexed command/data mode
I (13942) ESPmodem_Cmux: Attached to nework, wait for IP
I (19942) ESPmodem_Cmux: PPP state changed event 263
I (19942) ESPmodem_Cmux: PPP state changed event 265
I (19972) esp-netif_lwip-ppp: Connected
I (19972) esp-netif_lwip-ppp: Name Server1: 217.14.160.130
I (19972) esp-netif_lwip-ppp: Name Server2: 217.14.164.35
I (19982) ESPmodem_Cmux: Modem Connect to PPP Server
I (19982) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (19992) ESPmodem_Cmux: IP          : 100.82.28.117
I (19992) ESPmodem_Cmux: Netmask     : 255.255.255.255
I (20002) ESPmodem_Cmux: Gateway     : 10.64.64.64
I (20002) ESPmodem_Cmux: Name Server1: 217.14.160.130
I (20012) ESPmodem_Cmux: Name Server2: 217.14.164.35
I (20012) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (20022) ESPmodem_Cmux: GOT ip event!!!
I (20022) ESPmodem_Cmux: PPP state changed event 266
I (20022) ResourceManager: ++   connection to the Internet established
I (20042) ResourceManager: ++  GNSS starting...
I (20052) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_CONNECTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (21312) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT

assert failed: xEventGroupSetBits event_groups.c:603 (xEventGroup)

Backtrace:0x4037603a:0x3fcc42500x4037e8c9:0x3fcc4270 0x40385341:0x3fcc4290 0x403819d2:0x3fcc43b0 0x4202212a:0x3fcc43d0 0x42023c83:0x3fcc43f0 0x42022705:0x3fcc4410 0x42027815:0x3fcc4440 0x42027931:0x3fcc4460 0x420279ce:0x3fcc4490 0x420279e9:0x3fcc44c0 0x42022705:0x3fcc44e0 0x42022852:0x3fcc4510 0x420229c1:0x3fcc4570 0x40382045:0x3fcc4590
0x4037603a: panic_abort at C:/Espressif/frameworks/esp-idf-master/components/esp_system/panic.c:409

0x4037e8c9: esp_system_abort at C:/Espressif/frameworks/esp-idf-master/components/esp_system/esp_system.c:135

0x40385341: __assert_func at C:/Espressif/frameworks/esp-idf-master/components/newlib/assert.c:85

0x403819d2: xEventGroupSetBits at C:/Espressif/frameworks/esp-idf-master/components/freertos/FreeRTOS-Kernel/event_groups.c:603 (discriminator 1)

0x4202212a: esp_modem::SignalGroup::set(unsigned int) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_primitives_freertos.cpp:53

0x42023c83: std::_Function_handler<bool (unsigned char*, unsigned int), esp_modem::DTE::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<esp_modem::command_result (unsigned char*, unsigned int)>, unsigned int, char)::{lambda(unsigned char*, unsigned int)#1}>::_M_invoke(std::_Any_data const&, unsigned char*&&, unsigned int&&) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_dte.cpp:49
 (inlined by) _M_invoke at c:\espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\bits/std_function.h:282

0x42022705: std::function<bool (unsigned char*, unsigned int)>::operator()(unsigned char*, unsigned int) const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\bits/std_function.h:687

0x42027815: esp_modem::CMux::data_available(unsigned char*, unsigned int) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_cmux.cpp:142

0x42027931: esp_modem::CMux::on_footer(esp_modem::CMux::CMuxFrame&) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_cmux.cpp:268

0x420279ce: esp_modem::CMux::on_cmux_data(unsigned char*, unsigned int) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_cmux.cpp:317

0x420279e9: std::_Function_handler<bool (unsigned char*, unsigned int), esp_modem::CMux::init()::{lambda(unsigned char*, unsigned int)#1}>::_M_invoke(std::_Any_data const&, unsigned char*&&, unsigned int&&) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_cmux.cpp:369
 (inlined by) _M_invoke at c:\espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\bits/std_function.h:282

0x42022705: std::function<bool (unsigned char*, unsigned int)>::operator()(unsigned char*, unsigned int) const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\bits/std_function.h:687

0x42022852: esp_modem::UartTerminal::task() at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_uart.cpp:139

0x420229c1: esp_modem::UartTerminal::s_task(void*) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_uart.cpp:83

0x40382045: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-master/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:141

ELF file SHA256: 67b17f8232d892e0

Rebooting...
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2f (SPI_FAST_FLASH_BOOT)
Saved PC:0x42028bf5
0x42028bf5: esp_modem::dce_commands::get_gnss_information_sim70xx(esp_modem::CommandableIf*, gps_s&) at C:/Projects/ksc-2n/src/SERVICES/EspModem_Driver/src/esp_modem_command_library.cpp:760

SPIWP:0xee
mode:DIO, clock div:1

More Information.

GNSS is started via set_gnss_power_mode() And then the fix status is checked every 100 ms via get_gnss_information_sim70xx()

david-cermak commented 2 years ago

I have a similar bugfix in progress in https://github.com/espressif/esp-protocols/pull/125 fixing a race condition in the DTE command. Could you please try to cherry-pick the fixing commit (https://github.com/espressif/esp-protocols/pull/125/commits/f673106df7fdbdc6073d530e680539fb83288528) to see if it helps.

Although I'm not sure it would, since according to the backtrace it looks like the internal DTE's signal (SignalGroup) is set to nullptr. Might it be possible that your DTE goes out of scope somewhere and gets destroyed at some point?

MartinPatarinski commented 2 years ago

I think that the signal set of "PPP_STARTED" causes the issue. I update the code in set ang clear functions like this void SignalGroup::set(uint32_t bits) { if(event_group != NULL) { xEventGroupSetBits(event_group, bits); } else { ESP_LOGE("ESPDRV", "Signal %d set failed. event_group is NULL", bits); } } and got the following log entry E (65111) ESPDRV: Signal 1 set failed. event_group is NULL

sylvioalves commented 2 years ago

Does the GNSS works in PPP mode or only AT? I think not, I guess it is missing changing from PPP to Command mode before retrieving GNSS info. Can you check whether this procedure is being followed?

MartinPatarinski commented 2 years ago

No, we are using the CMUX mode in order to have the DATA mode(PPP) and the COMMAND mode (AT). Why do you say that GNSS works only in COMMAND mode.. is this documented somewhere that we've missed ?

sylvioalves commented 2 years ago

No, we are using the CMUX mode in order to have the DATA mode(PPP) and the COMMAND mode (AT). Why do you say that GNSS works only in COMMAND mode.. is this documented somewhere that we've missed ?

I was thinking about BG96. In the past, I had to keep switching between command and PPP mode in order to get GNSS positioning and keep network working. So I wasn't aware about the CMUX option. it seems SIM70x has it available, right?

david-cermak commented 2 years ago

Same as here. @RilabsAutomotive Could you please check if https://github.com/espressif/esp-protocols/commit/a02bf05eed7c96f703958a3a3f52c6234e386ffb fixes your issue?

utya commented 1 year ago

hi guys. Can i access to diagnostic port of bg96 from esp32?

MartinPatarinski commented 1 year ago

The issue actually came from a limitation of the SIM7070G from SIMCOM. It cannot currently handle mobile data connection and provide GPS coordinates at the same time. The data line drops when a GPS location is requested. The issue is reported to SIMCOM and they are currently investigating it.

p.s. sorry for the late update

david-cermak commented 1 year ago

Same as https://github.com/espressif/esp-idf/issues/9636#issuecomment-1482629860

sandeepkumar449 commented 1 year ago

i am working on sim7600e-h try to connect gnss and mqtt using espidf but when gnss is enable automatically mqtt disconnected. pppos connection failed. i dont know why?