LTE and Zigbee integration issues

mati_dev
Posts: 2
Joined: Mon Jul 12, 2021 4:04 pm

LTE and Zigbee integration issues

Postby mati_dev » Mon Jul 12, 2021 4:30 pm

Hello,
I am using the ESP32 in a custom board with an LTE module (SIMCom SIM7600A) and a Zigbee module (Silicon Labs EFR32MG1 Zigbee SoC), communicating with both of them through UART.
If I only use the LTE module, I am able to successfully connect to the Internet and perform HTTP/MQTT calls, using a modified version of the official example.
If I only use the Zigbee module, with ESP32 built-in WiFi (instead of LTE), it also works correctly (I can create the Zigbee network, different devices can join the network, and the WiFi connection always remains stable).

However, using the LTE module and doing Zigbee transmissions at the same time, breaks the LTE connections. The steps would be the following:
  1. Enable LTE connection (sending the corresponding AT commands to the SIM7600 module) and wait for the connection to be established. Successful HTTP/MQTT calls are seen on the logs.
  2. Create the Zigbee network and allow devices to join (sending the corresponding serial commands to the Zigbee module.
  3. Make a new device join the network. After repeating this a few times, the HTTP/MQTT calls start to fail.
The connection is lost because of “LCP terminated by peer”, which ends up tearing down the PPPoS link between the ESP32 and the LTE module. In order for the ESP32 to have internet access using the LTE module, a PPPoS (Point to Point Protocol over Serial) is established between them (the LTE module is the server and the ESP32 is the client). Link Control Protocol (LCP) is a process of negotiation that occurs between 2 routers when they establish a connection through PPP. Somehow, the zigbee transmissions are causing the LCP connection to be terminated (and the server/LTE module requests to do so, without specifying a reason).
A fragment of the relevant output can be seen here (the first line is the last successful HTTP connection):

Code: Select all

HTTP GET Status = 200, content_length = 271                                                                                                                                                                                                         
I (00:03:39.185) http: HTTP_EVENT_DISCONNECTED 

pppos_netif_output[1]: proto=0x21, len = 40
pppos_input[1]: got 17 bytes
LCP terminated by peer
ppp phase changed[1]: phase=9
D (00:03:39.301) esp-netif_lwip-ppp: Phase Network
sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0
sifdown[1]: err_code=0
ccp_set[1]: is_open=0, is_up=0, receive_method=0, transmit_method=0
ppp phase changed[1]: phase=6
D (00:03:39.317) esp-netif_lwip-ppp: Phase Establish
pppos_send_config[1]: out_accm=FF FF FF FF
ppp_send_config[1]
pppos_recv_config[1]: in_accm=0 0 0 0
ppp_recv_config[1]
pppos_write[1]: len=8
pppos_input[1]: got 14 bytes
pppos_input[1]: got 16 bytes
I (00:03:41.199) user: Request times 55
D (00:03:41.201) HTTP_CLIENT: Begin connect to: http://httpbin.org:80
D (00:03:41.204) TRANS_TCP: [sock=54],connecting to server IP:52.201.75.114,Port:80...
E (00:03:41.217) HTTP_CLIENT: Connection failed, sock < 0
E (00:03:41.218) http: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
I (00:03:41.230) http: HTTP_EVENT_DISCONNECTED 
I (00:03:43.229) user: Request times 56
D (00:03:43.231) HTTP_CLIENT: Begin connect to: http://httpbin.org:80
D (00:03:43.233) TRANS_TCP: [sock=54],connecting to server IP:52.201.75.114,Port:80...
E (00:03:43.246) HTTP_CLIENT: Connection failed, sock < 0
E (00:03:43.248) http: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
I (00:03:43.259) http: HTTP_EVENT_DISCONNECTED 

I (00:03:45.259) user: Request times 57
D (00:03:45.261) HTTP_CLIENT: Begin connect to: http://httpbin.org:80
D (00:03:45.263) TRANS_TCP: [sock=54],connecting to server IP:52.201.75.114,Port:80...
E (00:03:45.276) HTTP_CLIENT: Connection failed, sock < 0
E (00:03:45.277) http: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
I (00:03:45.289) http: HTTP_EVENT_DISCONNECTED 

ppp phase changed[1]: phase=12
D (00:03:45.339) esp-netif_lwip-ppp: Phase Disconnect
Connection terminated.
ppp_link_terminated[1]
ppp_link_end[1]
ppp phase changed[1]: phase=0
D (00:03:45.352) esp-netif_lwip-ppp: Phase Dead
I (00:03:45.353) esp-netif_lwip-ppp: Connection lost
ppp_link_terminated[1]: finished.
D (00:03:45.355) event: running post IP_EVENT:6 with handler 0x400d5244 on loop 0x3ffb5108
0x400d5244: on_ip_event at /home/mbrignone/stack_care/code/esp41/lte_poc_vesta/main/lte_ppp.c:70

D (00:03:45.367) LTE_PPP: IP event! 6
I (00:03:45.378) LTE_PPP: Modem Disconnect from PPP Server
Different modifications were attempted to debug and try to fix the problem, without success:
  1. It doesn't seem to be a UART conflict issue. Constantly sending commands back and forth between the ESP32 and the Zigbee module that doesn’t trigger an actual Zigbee transmission (i.e. request module version or network parameters), doesn’t break the LTE connection. But a new device joining the network does break the connection.
  2. Running LTE and Zigbee on different cores didn’t solve the issue.
  3. Creating the Zigbee network and allowing to join devices before enabling LTE didn’t solve the issue.
  4. The latest ESP-IDF versions (v4.2 and v4.3) have many changes related to PPP. I am using all those latest versions and the issue is still present.

Any ideas or hints related to what could be happening are very welcomed.

Thanks!

ESP_Sprite
Posts: 4938
Joined: Thu Nov 26, 2015 4:08 am

Re: LTE and Zigbee integration issues

Postby ESP_Sprite » Tue Jul 13, 2021 3:58 am

Hard to say, but have you looked at the power supply? Could be that the spiky transmits from both modules are causing a brownout somewhere.

mati_dev
Posts: 2
Joined: Mon Jul 12, 2021 4:04 pm

Re: LTE and Zigbee integration issues

Postby mati_dev » Mon Aug 02, 2021 3:03 pm

Thanks for your response (and sorry for my very late response). Just to give some closure to this, at the end it was a hardware issue on the board. There was a problematic connection between the Zigbee module and the LTE module pin used for power down, so there were undesired reboots on the LTE module which of course broke the previously established PPP connection.

Return to “Report Bugs”

Who is online

Users browsing this forum: No registered users and 4 guests