M
@Gijs
I have not tried to update the firmware, but it seems like my problem has been fixed.
I have successfully established LTE connection and publish the data to a server over MQTT. For the very first time that the chip trying to connect to the internet, it takes a long time (5 min) from scanning to connected. I guess a better antenna can make this process faster.
Now I have to face a new problem - unstable MQTT connection.
My code publishes data every two seconds. 402 runs are the most runs that I can get. Most of the time my code was errored out by the error "OSError: [Errno 104] ECONNRESET" after 20 to 100 runs.
It is also turned out that publishing a long string (e.g. "3.13, 5.75, 8.56, 98987.65464, 465.56412") usually could get more runs than publishing a short string (e.g. "3.13"), which confused me a lot.
Run 399: publish data over the LTE...
Run 400: publish data over the LTE...
Run 401: publish data over the LTE...
Run 402: publish data over the LTE...
Traceback (most recent call last):
File "main.py", line 81, in <module>
File "/flash/lib/mqtt.py", line 120, in publish
OSError: [Errno 104] ECONNRESET
Pycom MicroPython 1.20.2.r1 [v1.11-a5aa0b8] on 2020-09-09; GPy with ESP32
Type "help()" for more information.
>>>
Line 81 of my code.
client.publish(topic = MQTTtopic , msg = "3.13, 5.75, 8.56, 98987.65464, 465.56412")
Line 120 of MQTT library.
self.sock.write(pkt, i + 1)
I think I have faced the exactly the same problem when I played with my Wipy board (WiFi connection) and try to publish data through MQTT.
How could I get a more rugged and stable data-publishing process?