pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
196 stars 167 forks source link

LTE problems with GPY modules #581

Open Loevik737 opened 2 years ago

Loevik737 commented 2 years ago

Module: GPY Firmware: We have tested on 1.18.2.r6, 1.20.2.r4 and 1.20.3.b3 Modem: CATM1-41065 and CATM1-5.2-48829

Hello! We are currently having problems with a significant percentage of our GPY modules. We are deploying our IoT devices in remote locations where we need to have a reliable LTE connection for both data collection and OTA updates. The problems we are currently facing are related to socket stability over LTE and OTA updates failing.

Case 1:

Expected: a working socket connection What we got: [Errno 113] ECONNABORTED when using the socket Description: Some of our chips fail to maintain a socket over LTE. The error “[Errno 113] ECONNABORTED” will always show up on these devices when we try to do anything with a connected socket. From our debugging so far, it seems that the errors follow the GPY module and not the sim card/pigtail antenna or power supply. We have also tried different firmware versions: 1.18.2.r6, 1.20.2.r4 and 1.20.3.b3. And different modem firmwares: CATM1-41065 and CATM1-5.2-48829. They all show the same behavior. The devices manage to attach and connect an LTE connection and they are event able to get the correct time from our NTP server. When we try to connect to our MQTT broker using the standard MQTT liberary(https://github.com/pycom/pycom-libraries/blob/master/lib/mqtt/mqtt.py) it fails with [Error 113]. When we have connected to LTE we can provoke the error with:

mqtt_client = MQTTClient("123ABC123", "xx.xx.xx.xx", keepalive=30)
mqtt_client.connect()

and it fails on line 97 in mqtt.py with: [Error 113] ECONNABORTED. When testing in our office over WIFI we do not observe the same problem.

Case 2:

Expected: We expected that the device can download an update using OTA. What we got: The update freezes during file download. We do not get any error messages. Some of our devices fails to update over OTA. They start out with downloading files but will slow down significantly and eventually stop entirely/ freeze.

The common problem we see is that maintaining a stable socket connection over LTE is very unreliable on some devices. Are there things we can do to improve this? We are running 1.18.2.r6 and 1.20.2.r4 with modem firmware CATM1-41065. We see that devices located in the same location that at run the exact same code using the same network provider need to reconnect to LTE at very different frequencies. Some need to reconnect 100+ times a day while others only need to reconnect less that five times a day.

We also wonder if we could get some more detailed documentation on the difference between GPY versions as 1.0r and 1.2 etc. The only difference we could find online was band support. We have a variety of GPY version in use today so it would be great if we could have some more information about the differences.

DG12 commented 2 years ago

I am having a similar problem. Did you get a resolution to your problem?