Giter Site home page Giter Site logo

olliiiver / esp_lte_modem Goto Github PK

View Code? Open in Web Editor NEW
54.0 5.0 17.0 65 KB

ESP32 / esp-idf LTE UART modem library for sim7600 with cmux support

License: MIT License

CMake 0.54% Makefile 0.33% C 95.99% Python 3.14%
esp-idf esp32 sim7600 lte modem sim7000g cmux pppoe sim7600x gsm

esp_lte_modem's Introduction

PPP over Serial (PPPoS) client library

Copy of the following repo with some additions (PIN submit, etc) for SIM7600x LTE modems.

https://github.com/espressif/esp-idf/tree/master/examples/protocols/pppos_client

CMUX multiplexer protocol

This repository contains additions from 4688 which allows the use of TCP/IP data streams and AT commands in parallel over one UART connection (two wire null modem).

Pin Assignment

The following pin assignments are used by default which can be changed in menuconfig.

ESP32 Cellular Modem
GPIO25 RX
GPIO26 TX
GND GND
5V VCC

UART buffers

I had some problems with UART buffers (especially CONFIG_EXAMPLE_MODEM_UART_RX_BUFFER_SIZE) below 16KB.

Usage in other projects

The library can be inserted into your own projects. Just checkout this repo to the root of your project and insert the folloing into the main CMakeLists.txt file:

list(APPEND EXTRA_COMPONENT_DIRS "esp_lte_modem/components/modem")
set(IDF_EXTRA_COMPONENT_DIRS ${EXTRA_COMPONENT_DIRS})

Monitor output

Monitor output from example (pppos_client_main.c):

I (383) cpu_start: Pro cpu start user code
I (383) cpu_start: Application information:
I (383) cpu_start: Project name:     pppos_client
I (389) cpu_start: App version:      34b5e4d-dirty
I (394) cpu_start: Compile time:     Jan 10 2021 14:40:39
I (400) cpu_start: ELF file SHA256:  140ea96103be123a...
I (406) cpu_start: ESP-IDF:          v4.3-dev-1197-g8bc19ba89
I (413) heap_init: Initializing. RAM available for dynamic allocation:
I (420) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (426) heap_init: At 3FFB3B48 len 0002C4B8 (177 KiB): DRAM
I (432) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (438) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (445) heap_init: At 4008B9E4 len 0001461C (81 KiB): IRAM
I (452) spi_flash: detected chip: generic
I (456) spi_flash: flash io: dio
I (461) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (474) uart: queue free spaces: 30
I (484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
W (564) esp-modem: Rx Break
E (1984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (1984) dce_service: esp_modem_dce_sync(67): send command failed
E (1984) bg96: bg96_init(539): sync failed
I (2484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
E (3984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (3984) dce_service: esp_modem_dce_sync(67): send command failed
E (3984) bg96: bg96_init(539): sync failed
I (4484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
E (5984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (5984) dce_service: esp_modem_dce_sync(67): send command failed
E (5984) bg96: bg96_init(539): sync failed
I (6484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
E (7984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (7984) dce_service: esp_modem_dce_sync(67): send command failed
E (7984) bg96: bg96_init(539): sync failed
I (8484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
E (9984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (9984) dce_service: esp_modem_dce_sync(67): send command failed
E (9984) bg96: bg96_init(539): sync failed
I (10484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
E (11804) esp-modem: esp_dte_handle_line(138): handle line failed
W (11804) pppos_example: Unknow line received: RDY

E (11984) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (11984) dce_service: esp_modem_dce_sync(67): send command failed
E (11984) bg96: bg96_init(539): sync failed
E (12264) esp-modem: esp_dte_handle_line(137): no handler for line
W (12264) pppos_example: Unknow line received: +CPIN: SIM PIN

I (12484) pppos_example: Trying to initialize modem on GPIO TX: 17 / RX: 16
I (12534) bg96: CMUX setup
I (12934) bg96: PIN ASK response: +CPIN: SIM PIN

I (12934) bg96: SIM needs PIN
I (13034) bg96: PIN ASK response: OK

I (13034) bg96: submit PIN
I (13144) bg96: set PIN ok
E (13464) esp-modem: esp_dte_handle_line(137): no handler for line
W (13464) pppos_example: Unknow line received: +CPIN: READY

E (13904) esp-modem: esp_dte_handle_line(137): no handler for line
W (13904) pppos_example: Unknow line received: SMS DONE

E (14594) esp-modem: esp_dte_handle_line(138): handle line failed
W (14594) pppos_example: Unknow line received: PB DONE

I (15344) bg96: CMUX command success
I (15344) bg96: enter CMUX mode ok
I (15894) pppos_example: Module: SIMCOM_SIM7600E
I (15894) pppos_example: Operator: "xxx"
I (15894) pppos_example: IMEI: xxx
I (15894) pppos_example: IMSI: xxx
I (16004) pppos_example: rssi: 0, ber: 0
I (16864) pppos_example: Battery voltage: 0 mV
I (16864) esp-modem: APN: xxx
I (16964) esp-modem: PPP MODE
I (16964) esp-modem: Got ATD
I (17014) esp-modem: Handle Line: CONNECT 115200
|� 115200
|�t",7
 for DLCI 1
I (17014) DCE_TAG: ATD response: CONNECT 115200
|� 115200
|�t",7

I (17064) pppos_example: Modem PPP Started
I (17314) esp-netif_lwip-ppp: Connected
I (17314) esp-netif_lwip-ppp: Name Server1: x.x.x.x
I (17314) esp-netif_lwip-ppp: Name Server2: x.x.x.x
I (17314) pppos_example: Modem Connect to PPP Server
I (17324) pppos_example: ~~~~~~~~~~~~~~
I (17324) pppos_example: IP          : x.x.x.x
I (17334) pppos_example: Netmask     : 255.255.255.255
I (17334) pppos_example: Gateway     : x.x.x.x
I (17344) pppos_example: Name Server1: x.x.x.x
I (17344) pppos_example: Name Server2: x.x.x.x
I (17354) pppos_example: ~~~~~~~~~~~~~~
I (17354) pppos_example: GOT ip event!!!
I (17364) system_api: Base MAC address is not set
I (17364) system_api: read default base MAC address from EFUSE
I (17374) pppos_example: MQTT other event id: 7
I (17764) pppos_example: MQTT_EVENT_CONNECTED
I (17764) pppos_example: sent subscribe successful, msg_id=20524
I (17864) pppos_example: MQTT_EVENT_SUBSCRIBED, msg_id=20524
I (17864) pppos_example: sent publish successful, msg_id=0
I (17964) pppos_example: MQTT_EVENT_DATA
TOPIC=/topic/esp-pppos
DATA=esp32-pppos
I (18164) pppos_example: rssi: 0, ber: 0
I (23264) pppos_example: rssi: 0, ber: 0
I (28364) pppos_example: rssi: 0, ber: 0
I (33464) pppos_example: rssi: 0, ber: 0

esp_lte_modem's People

Contributors

olliiiver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

esp_lte_modem's Issues

SIM7600

Hi!, i have a problem with sms example. In my code i´m use esp-idf v4.3.2 and ppp work OK, but when add the code for sms never take the semaphore here:

static esp_err_t esp_modem_dte_send_cmd(modem_dte_t *dte, const char *command, uint32_t timeout)
{
esp_err_t ret = ESP_FAIL;
modem_dce_t *dce = dte->dce;
MODEM_CHECK(dce, "DTE has not yet bind with DCE", err);
MODEM_CHECK(command, "command is NULL", err);
esp_modem_dte_t esp_dte = __containerof(dte, esp_modem_dte_t, parent);
/
Calculate timeout clock tick /
/
Reset runtime information /
dce->state = MODEM_STATE_PROCESSING;
/
Send command via UART /
uart_write_bytes(esp_dte->uart_port, command, strlen(command));
/
Check timeout */
MODEM_CHECK(xSemaphoreTake(esp_dte->process_sem, pdMS_TO_TICKS(timeout)) == pdTRUE, "process command timeout", err);
ret = ESP_OK;
err:
dce->handle_line = NULL;
return ret;
}

do you know whats the problem?.

Error While Integrating The File To My Gateway Program.

Hey, I was trying to integrate an Lte-Modem to my program, the Lte_Modem file runs fine standalone, but when I try integrate it to my original gateway program it shows an error. I tried changing the CMake files and all but no change was seen.
Screenshot (12)

Test speed

What is the maximum speed to upload a file using FTP?
or How can the upload speed be checked using this module?

The CMUX is not activate in the code

I tried to test the CMUX support on TTGO SIM7000G board, and saw the following issues:

  • In current code bg96.c file, the CMUX is not activated by default.
   /* CMUX */
    if (bg96_dce->parent.dte->cmux) {
        ESP_LOGI(DCE_TAG, "CMUX setup");
 //         esp_modem_start_cmux(dte); 
 //       DCE_CHECK(bg96_dce->parent.dte->change_mode(bg96_dce->parent.dte, 2) == ESP_OK, "CMUX failed", err_io);
    }

start_cmux function not working

I wrote the following portion of code to start cmux function

void app_main(void)
{
gpio_pad_select_gpio(gsm_reset_pin);
 gpio_set_direction(gsm_reset_pin,GPIO_MODE_OUTPUT);
#if CONFIG_LWIP_PPP_PAP_SUPPORT
    esp_netif_auth_type_t auth_type = NETIF_PPP_AUTHTYPE_PAP;
#elif CONFIG_LWIP_PPP_CHAP_SUPPORT
    esp_netif_auth_type_t auth_type = NETIF_PPP_AUTHTYPE_CHAP;
#elif !defined(CONFIG_EXAMPLE_MODEM_PPP_AUTH_NONE)
#error "Unsupported AUTH Negotiation"
#endif
    ESP_ERROR_CHECK(esp_netif_init());
    ESP_ERROR_CHECK(esp_event_loop_create_default());
    ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, ESP_EVENT_ANY_ID, &on_ip_event, NULL));
    ESP_ERROR_CHECK(esp_event_handler_register(NETIF_PPP_STATUS, ESP_EVENT_ANY_ID, &on_ppp_changed, NULL));

    event_group = xEventGroupCreate();

    /* create dte object */
    esp_modem_dte_config_t config = ESP_MODEM_DTE_DEFAULT_CONFIG();
    /* setup UART specific configuration based on kconfig options */
    /* setup UART specific configuration based on kconfig options */
    config.tx_io_num = CONFIG_EXAMPLE_MODEM_UART_TX_PIN;
    config.rx_io_num = CONFIG_EXAMPLE_MODEM_UART_RX_PIN;
    config.rts_io_num = CONFIG_EXAMPLE_MODEM_UART_RTS_PIN;
    config.cts_io_num = CONFIG_EXAMPLE_MODEM_UART_CTS_PIN;
    config.rx_buffer_size = CONFIG_EXAMPLE_MODEM_UART_RX_BUFFER_SIZE;
    config.tx_buffer_size = CONFIG_EXAMPLE_MODEM_UART_TX_BUFFER_SIZE;
    config.event_queue_size = CONFIG_EXAMPLE_MODEM_UART_EVENT_QUEUE_SIZE;
    config.event_task_stack_size = CONFIG_EXAMPLE_MODEM_UART_EVENT_TASK_STACK_SIZE;
    config.event_task_priority = CONFIG_EXAMPLE_MODEM_UART_EVENT_TASK_PRIORITY;
    config.line_buffer_size = CONFIG_EXAMPLE_MODEM_UART_RX_BUFFER_SIZE * 2;

  
    ESP_LOGI("GSM","setting reset pin high");
    gpio_set_level(gsm_reset_pin, 1);
    vTaskDelay(pdMS_TO_TICKS(100));
    ESP_LOGI("GSM","setting reset pin low");
    gpio_set_level(gsm_reset_pin, 0);
    vTaskDelay(pdMS_TO_TICKS(20000));
    ESP_LOGI("GSM","Waiting for modem to sync..");


   modem_dte_t *dte = esp_modem_dte_init(&config);

    /* Register event handler */
    ESP_ERROR_CHECK(esp_modem_set_event_handler(dte, modem_event_handler, ESP_EVENT_ANY_ID, NULL));

    /*Init netif object*/
    esp_netif_config_t cfg = ESP_NETIF_DEFAULT_PPP();
    esp_netif_t *esp_netif = esp_netif_new(&cfg);
    assert(esp_netif);
    void *modem_netif_adapter = esp_modem_netif_setup(dte);
    esp_modem_netif_set_default_handlers(modem_netif_adapter, esp_netif);
    
   


       esp_modem_start_cmux(dte);
        dce = sim7600_init(dte);
        vTaskDelay(pdMS_TO_TICKS(5000));
         ESP_ERROR_CHECK(dce->set_flow_ctrl(dce, MODEM_FLOW_CONTROL_NONE));
        ESP_ERROR_CHECK(dce->store_profile(dce));
        /* Print Module ID, Operator, IMEI, IMSI */
        ESP_LOGI(TAG, "Module: %s", dce->name);
        ESP_LOGI(TAG, "Operator: %s", dce->oper);
        ESP_LOGI(TAG, "IMEI: %s", dce->imei);
        ESP_LOGI(TAG, "IMSI: %s", dce->imsi);
        /* Get signal quality */
        uint32_t rssi = 0, ber = 0;
        ESP_ERROR_CHECK(dce->get_signal_quality(dce, &rssi, &ber));
        ESP_LOGI(TAG, "rssi: %d, ber: %d", rssi, ber);
         GPS_location();
        //ESP_LOGI("GPS","GPS Got location");
         cord_cal();
        /* Get battery voltage */
        //uint32_t voltage = 0, bcs = 0, bcl = 0;
       // ESP_ERROR_CHECK(dce->get_battery_status(dce, &bcs, &bcl, &voltage));
       // ESP_LOGI(TAG, "Battery voltage: %d mV", voltage);
        /* setup PPPoS network parameters */
//#if !defined(CONFIG_EXAMPLE_MODEM_PPP_AUTH_NONE) && (defined(CONFIG_LWIP_PPP_PAP_SUPPORT) || defined(CONFIG_LWIP_PPP_CHAP_SUPPORT))
///        esp_netif_ppp_set_auth(esp_netif, auth_type, CONFIG_EXAMPLE_MODEM_PPP_AUTH_USERNAME, CONFIG_EXAMPLE_MODEM_PPP_AUTH_PASSWORD);
//#endif
        /* attach the modem to the network interface */
        esp_netif_attach(esp_netif, modem_netif_adapter);
        /* Wait for IP address */
        xEventGroupWaitBits(event_group, CONNECT_BIT, pdTRUE, pdTRUE, portMAX_DELAY);

}

But it is not working:)

debug log

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\rhmna\esp_lte_modem-main> set IDF_PATH=C:\Users\rhmna\esp\esp-idf
PS C:\Users\rhmna\esp_lte_modem-main> C:\Users\rhmna\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\rhmna\esp\esp-idf\tools\idf_monitor.py -p COM5 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 c:\Users\rhmna\esp_lte_modem-main\build\pppos_client.elf
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM5 instead...
--- idf_monitor on \\.\COM5 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (12) boot: ESP-IDF v4.4.1-dirty 2nd stage bootloader
I (13) boot: compile time 11:13:03
I (13) boot: chip revision: 1
I (15) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (22) boot.esp32: SPI Speed      : 40MHz
I (27) boot.esp32: SPI Mode       : DIO
I (31) boot.esp32: SPI Flash Size : 16MB
I (36) boot: Enabling RNG early entropy source...
I (41) boot: Partition Table:
I (45) boot: ## Label            Usage          Type ST Offset   Length
I (52) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (59) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (67) boot:  2 factory          factory app      00 00 00010000 00100000
I (74) boot: End of partition table
I (79) boot_comm: chip revision: 1, min. application chip revision: 0
I (86) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=11584h ( 71044) map
I (120) esp_image: segment 1: paddr=000215ac vaddr=3ffb0000 size=023a4h (  9124) load
I (124) esp_image: segment 2: paddr=00023958 vaddr=40080000 size=0c6c0h ( 50880) load
I (147) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=3ec88h (257160) map
I (240) esp_image: segment 4: paddr=0006ecb0 vaddr=4008c6c0 size=00338h (   824) load
I (241) esp_image: segment 5: paddr=0006eff0 vaddr=50000000 size=00010h (    16) load
I (252) boot: Loaded app from partition at offset 0x10000
I (252) boot: Disabling RNG early entropy source...
I (269) cpu_start: Pro cpu up.
I (269) cpu_start: Starting app cpu, entry point is 0x400811dc
0x400811dc: call_start_cpu1 at C:/Users/rhmna/esp/esp-idf/components/esp_system/port/cpu_start.c:160

I (0) cpu_start: App cpu up.
I (283) cpu_start: Pro cpu start user code
I (283) cpu_start: cpu freq: 160000000
I (283) cpu_start: Application information:
I (287) cpu_start: Project name:     pppos_client
I (293) cpu_start: App version:      1
I (297) cpu_start: Compile time:     Dec  1 2022 11:35:33
I (303) cpu_start: ELF file SHA256:  f3231774957a423d...
I (309) cpu_start: ESP-IDF:          v4.4.1-dirty
I (315) heap_init: Initializing. RAM available for dynamic allocation:
I (322) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (328) heap_init: At 3FFB4138 len 0002BEC8 (175 KiB): DRAM
I (334) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (341) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (347) heap_init: At 4008C9F8 len 00013608 (77 KiB): IRAM
I (354) spi_flash: detected chip: generic
I (358) spi_flash: flash io: dio
I (363) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (373) GSM: setting reset pin high
I (473) GSM: setting reset pin low
I (20473) GSM: Waiting for modem to sync..
I (20473) uart: queue free spaces: 30
E (20473) **esp-modem: esp_modem_start_cmux(829): DTE has not yet bind with DCE**
I (20533) bg96: CMUX setup
I (21033) bg96: PIN ASK response: +CPIN: READY

I (21133) bg96: PIN ASK response: OK

I (26893) pppos_example: Module: SIMCOM_SIM7600G-H
I (26893) pppos_example: Operator: "Vi India Vodafone IN"
I (26893) pppos_example: IMEI: 862636050449717
I (26893) pppos_example: IMSI: 404466097514230
I (27093) pppos_example: rssi: 17, ber: 99
I (27093) GPS: Locating GPS
I (27193) GPS_AT_COMMAND_RESPONSE: Success line : OK

I (27193) GPS: Waiting 30 seconds for GPS to locate
I (57293) GPS_AT_COMMAND_RESPONSE: line : +CGPSINFO: 1057.271289,N,07619.376233,E,031222,042307.0,85.7,0.0,

I (57293) GPS_AT_COMMAND_RESPONSE: GPS line : +CGPSINFO: 1057.271289,N,07619.376233,E,031222,042307.0,85.7,0.0,

I (57403) GPS_AT_COMMAND_RESPONSE: Success line : OK

I (57503) GPS_AT_COMMAND_RESPONSE: Success line : OK

I (57503) GPS: Calculating co-ordinates
I (57503) Gps: direction >N,E
I (57503) GPS: Latitude---> 1057.271289  Longitude--->07619.376233
I (57513) decimal:  : 10.95452118
I (57513) degree:  : 76.32293701
I (57513) final:  : location------> 10.95452118,76.32293701
I (57523) esp-modem: APN: CMNET
I (57613) esp-modem: PPP MODE
I (57713) DCE_TAG: ATD response: CONNECT 115200

I (57713) pppos_example: Modem PPP Started
I (117713) esp-netif_lwip-ppp: Connection lost
I (117713) pppos_example: Modem Disconnect from PPP Server

AT command is working well to get the location. I can't get IP
Any help will really be appreciated

SIM800 CMUX

Hello everyone , I was testing the ppp from the original ESP IDF example and it works for SIM800L , but when I try to test the CMUX with this repository it didn't work.I get the same errors in the logs refered in the .md , due to modem initialization (+RDY , CPIN READY , etc).The commands AT like a RSSI , and the other works , but the ppp never get and IP :( . I want to know if this was tested for sim800L.

PD: My IDF is 4.2.1

Thanks in advance !

after issue esp32 software reset the library gets stucks

Hi,

I am using this code to link esp32 with 7600 and send data to MQTT, but I have noticed 1 issue, on power the code works fine, but if it gets reset by software reset or esp32 reset itself for any error that the code get hangs in the below-mentioned loop,

` do {
ESP_LOGI(TAG, "Trying to initialize modem on GPIO TX: %d / RX: %d", config.tx_io_num, config.rx_io_num);

    /* create dce object */
    #if CONFIG_EXAMPLE_MODEM_DEVICE_SIM800
        dce = sim800_init(dte);
    #elif CONFIG_EXAMPLE_MODEM_DEVICE_BG96
        dce = bg96_init(dte);
    #elif CONFIG_EXAMPLE_MODEM_DEVICE_SIM7600
        dce = sim7600_init(dte);
    #else
        #error "Unsupported DCE"
    #endif
    vTaskDelay(500 / portTICK_PERIOD_MS);
} while (dce == NULL);`

following is log after reset

�[0;32mI (29066) pppos_example: GOT ip event!!!�[0m
�[0;32mI (29076) system_api: Base MAC address is not set�[0m
�[0;32mI (29076) system_api: read default base MAC address from EFUSE�[0m
�[0;32mI (29086) pppos_example: MQTT other event id: 7�[0m
�[0;32mI (30226) pppos_example: MQTT_EVENT_CONNECTED�[0m
�[0;32mI (30226) pppos_example: sent subscribe successful, msg_id=59904�[0m
�[0;32mI (30576) pppos_example: MQTT_EVENT_SUBSCRIBED, msg_id=59904�[0m
�[0;32mI (30576) pppos_example: sent publish successful, msg_id=0�[0m
�[0;32mI (30926) pppos_example: MQTT_EVENT_DATA�[0m
TOPIC=/topic/esp-pppos

DATA=esp32-pppos
�[0;32mI (32476) pppos_example: rssi: 0, ber: 0�[0m
�[0;32mI (33576) pppos_example: rssi: 0, ber: 0�[0m
�[0;32mI (34676) pppos_example: rssi: 0, ber: 0�[0m
�[0;32mI (35776) pppos_example: rssi: 0, ber: 0�[0m
�[0;32mI (36876) pppos_example: rssi: 0, ber: 0�[0m
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6984
load:0x40078000,len:13852
load:0x40080400,len:4548
entry 0x400806ec
�[0;32mI (29) boot: ESP-IDF v4.2 2nd stage bootloader�[0m
�[0;32mI (29) boot: compile time 16:43:57�[0m
�[0;32mI (29) boot: chip revision: 1�[0m
�[0;32mI (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0�[0m
�[0;32mI (39) boot.esp32: SPI Speed : 40MHz�[0m
�[0;32mI (43) boot.esp32: SPI Mode : DIO�[0m
�[0;32mI (48) boot.esp32: SPI Flash Size : 4MB�[0m
�[0;32mI (52) boot: Enabling RNG early entropy source...�[0m
�[0;32mI (58) boot: Partition Table:�[0m
�[0;32mI (61) boot: ## Label Usage Type ST Offset Length�[0m
�[0;32mI (69) boot: 0 nvs WiFi data 01 02 00009000 00006000�[0m
�[0;32mI (76) boot: 1 phy_init RF data 01 01 0000f000 00001000�[0m
�[0;32mI (84) boot: 2 factory factory app 00 00 00010000 00100000�[0m
�[0;32mI (91) boot: End of partition table�[0m
�[0;32mI (95) boot_comm: chip revision: 1, min. application chip revision: 0�[0m
�[0;32mI (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x19360 (103264) map�[0m
�[0;32mI (150) esp_image: segment 1: paddr=0x00029388 vaddr=0x3ffb0000 size=0x02114 ( 8468) load�[0m
�[0;32mI (154) esp_image: segment 2: paddr=0x0002b4a4 vaddr=0x40080000 size=0x00400 ( 1024) load�[0m
�[0;32mI (158) esp_image: segment 3: paddr=0x0002b8ac vaddr=0x40080400 size=0x0476c ( 18284) load�[0m
�[0;32mI (174) esp_image: segment 4: paddr=0x00030020 vaddr=0x400d0020 size=0x63810 (407568) map�[0m
�[0;32mI (329) esp_image: segment 5: paddr=0x00093838 vaddr=0x40084b6c size=0x06b6c ( 27500) load�[0m
�[0;32mI (348) boot: Loaded app from partition at offset 0x10000�[0m
�[0;32mI (348) boot: Disabling RNG early entropy source...�[0m
�[0;32mI (348) cpu_start: Pro cpu up.�[0m
�[0;32mI (352) cpu_start: Application information:�[0m
�[0;32mI (356) cpu_start: Project name: pppos_client�[0m
�[0;32mI (362) cpu_start: App version: 1�[0m
�[0;32mI (366) cpu_start: Compile time: Aug 11 2021 17:01:58�[0m
�[0;32mI (372) cpu_start: ELF file SHA256: af7ac3fa0b39003a...�[0m
�[0;32mI (378) cpu_start: ESP-IDF: v4.2-dirty�[0m
�[0;32mI (384) cpu_start: Starting app cpu, entry point is 0x40081268�[0m
�[0;32mI (376) cpu_start: App cpu up.�[0m
�[0;32mI (394) heap_init: Initializing. RAM available for dynamic allocation:�[0m
�[0;32mI (401) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM�[0m
�[0;32mI (407) heap_init: At 3FFB39B0 len 0002C650 (177 KiB): DRAM�[0m
�[0;32mI (413) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM�[0m
�[0;32mI (420) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM�[0m
�[0;32mI (426) heap_init: At 4008B6D8 len 00014928 (82 KiB): IRAM�[0m
�[0;32mI (432) cpu_start: Pro cpu start user code�[0m
�[0;32mI (451) spi_flash: detected chip: generic�[0m
�[0;32mI (451) spi_flash: flash io: dio�[0m
�[0;32mI (452) cpu_start: Starting scheduler on PRO CPU.�[0m
�[0;32mI (0) cpu_start: Starting scheduler on APP CPU.�[0m
�[0;32mI (26056) uart: queue free spaces: 30�[0m
�[0;32mI (26056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (27556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (27556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (27556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (28056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (29556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (29556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (29556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (30056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (31556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (31556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (31556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (32056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (33556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (33556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (33556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (34056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (35556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (35556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (35556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (36056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (37556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (37556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (37556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (38056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (39556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (39556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (39556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (40056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (41556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (41556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (41556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (42056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (43556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (43556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (43556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (44056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (45556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (45556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (45556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (46056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (47556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (47556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (47556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (48056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (49556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (49556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (49556) bg96: bg96_init(539): sync failed�[0m
�[0;32mI (50056) pppos_example: Trying to initialize modem on GPIO TX: 26 / RX: 25�[0m
�[0;31mE (51556) esp-modem: esp_modem_dte_send_cmd(417): process command timeout�[0m
�[0;31mE (51556) dce_service: esp_modem_dce_sync(67): send command failed�[0m
�[0;31mE (51556) bg96: bg96_init(539): sync failed�[0m

Can you help some way resolve this, when I send SMS it is received, so i don't think it is a communication error between esp32 & sim7600, actually i thought earlier may be sim7600 is getting in sleep mode but that is not the case, somewhere pppos library is getting stuck,

�[0;33mW (434356) pppos_example: Unknow line received:
0m
�[0;31mE (434406) esp-modem: esp_dte_handle_line(138): handle line failed�[0m
�[0;33mW (434406) pppos_example: Unknow line received: +CMTI: "SM",15

is there a way to debug ? and find the root of the problem?

BG96 compatibility

Hi, I'm trying to run this code on a BG96. After setting everything to it I flash the code and here is the ouput log:

I (12) boot: ESP-IDF v4.2.1 2nd stage bootloader
I (12) boot: compile time 17:29:12
I (12) boot: chip revision: 1
I (14) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (21) boot.esp32: SPI Speed      : 40MHz
I (26) boot.esp32: SPI Mode       : DIO
I (30) boot.esp32: SPI Flash Size : 16MB
I (35) boot: Enabling RNG early entropy source...
I (40) boot: Partition Table:
I (44) boot: ## Label            Usage          Type ST Offset   Length
I (51) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (59) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (66) boot:  2 factory          factory app      00 00 00010000 00100000
I (74) boot: End of partition table
I (78) boot_comm: chip revision: 1, min. application chip revision: 0
I (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x17f3c ( 98108) map
I (131) esp_image: segment 1: paddr=0x00027f64 vaddr=0x3ffb0000 size=0x02160 (  8544) load
I (135) esp_image: segment 2: paddr=0x0002a0cc vaddr=0x40080000 size=0x00404 (  1028) load
0x40080000: _WindowOverflow4 at /home/pablo/esp/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730

I (138) esp_image: segment 3: paddr=0x0002a4d8 vaddr=0x40080404 size=0x05b40 ( 23360) load
I (157) esp_image: segment 4: paddr=0x00030020 vaddr=0x400d0020 size=0x6475c (411484) map
0x400d0020: _stext at ??:?

I (314) esp_image: segment 5: paddr=0x00094784 vaddr=0x40085f44 size=0x05840 ( 22592) load
0x40085f44: prvCheckTasksWaitingTermination at /home/pablo/esp/esp-idf/components/freertos/tasks.c:3632

I (331) boot: Loaded app from partition at offset 0x10000
I (331) boot: Disabling RNG early entropy source...
I (331) cpu_start: Pro cpu up.
I (335) cpu_start: Application information:
I (340) cpu_start: Project name:     pppos_client
I (345) cpu_start: App version:      7964ebd-dirty
I (351) cpu_start: Compile time:     Jun  2 2021 17:29:04
I (357) cpu_start: ELF file SHA256:  5b88b8300bc17c5c...
I (363) cpu_start: ESP-IDF:          v4.2.1
I (368) cpu_start: Starting app cpu, entry point is 0x400818e0
0x400818e0: call_start_cpu1 at /home/pablo/esp/esp-idf/components/esp32/cpu_start.c:287

I (0) cpu_start: App cpu up.
I (378) heap_init: Initializing. RAM available for dynamic allocation:
I (385) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (391) heap_init: At 3FFB3A30 len 0002C5D0 (177 KiB): DRAM
I (397) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (403) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (410) heap_init: At 4008B784 len 0001487C (82 KiB): IRAM
I (416) cpu_start: Pro cpu start user code
I (435) spi_flash: detected chip: gd
I (435) spi_flash: flash io: dio
I (435) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (443) uart: queue free spaces: 30
I (453) pppos_example: Trying to initialize modem on GPIO TX: 23 / RX: 22
E (1953) esp-modem: esp_modem_dte_send_cmd(417): process command timeout
E (1953) dce_service: esp_modem_dce_sync(67): send command failed
E (1953) bg96: bg96_init(539): sync failed
I (2453) pppos_example: Trying to initialize modem on GPIO TX: 23 / RX: 22
I (2503) bg96: CMUX setup
I (2903) bg96: PIN ASK response: +CPIN: READY

I (3003) bg96: PIN ASK response: OK

I (4153) bg96: CMUX command success
I (4153) bg96: enter CMUX mode ok
Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x00000000  PS      : 0x00060c30  A0      : 0x800d6924  A1      : 0x3ffb5750  
A2      : 0x00000000  A3      : 0x00000002  A4      : 0x3ffb4470  A5      : 0x00000000  
A6      : 0x3f404514  A7      : 0x00000001  A8      : 0x800d60bc  A9      : 0x3ffb5730  
A10     : 0x3ffb4470  A11     : 0x00000000  A12     : 0x3ffb0114  A13     : 0x00060823  
A14     : 0x00000001  A15     : 0x00000001  SAR     : 0x00000004  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffe  

Backtrace:0xfffffffd:0x3ffb5750 0x400d6921:0x3ffb5780 0x400d5775:0x3ffb57b0 0x400d3e2a:0x3ffb58f0 0x400856cd:0x3ffb5920
0x400d6921: esp_modem_start_cmux at /home/pablo/ESP32_projects/esp_lte_modem/build/../components/modem/src/esp_modem.c:832 (discriminator 2)

0x400d5775: app_main at /home/pablo/ESP32_projects/esp_lte_modem/build/../main/pppos_client_main.c:271

0x400d3e2a: main_task at /home/pablo/esp/esp-idf/components/esp32/cpu_start.c:609 (discriminator 2)

0x400856cd: vPortTaskWrapper at /home/pablo/esp/esp-idf/components/freertos/xtensa/port.c:143



ELF file SHA256: 5b88b8300bc17c5c

Rebooting...

It seems that the start_cmux function isn't working but I don't understand which instruction is prohibited, Any idea of what could be wrong?

Best regards,
P

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.