Replies: 12 comments 16 replies
-
You can install a simple mqtt library from import mip
mip.install("mqtt.simple") There is also a variant called "mqtt.robust" - read the docs to see which is right for you. These libraries assume the device is network connected and don't try to re-establish a wifi connection if network connectivity is lost (as Peter's excellent libraries do). |
Beta Was this translation helpful? Give feedback.
-
Hi @tadejales, I had a similar issue, I need to leave a node in an isolate area. I found a USB dongle which is LTE capable. I created a WIFI router with a Raspberry PI 4 I was holding around. If you go this way, you have to double check the dongle is compatible with the bands you plan to use. Another option is to go with an LTE/WIFI router. |
Beta Was this translation helpful? Give feedback.
-
@glenn20 Any idea what might be the problem with gprs and mqtt.simple? I even dont have idea where to look at. |
Beta Was this translation helpful? Give feedback.
-
mqtt.robust is an excellent library if you have wifi access or can get a stable ppp connection. Considering the SIM800 module has inbuilt support for MQTT I would suggest trying this. https://microchip.ua/simcom/2G/Application%20Notes/SIM800%20Series_MQTT_Application%20Note_V1.03.pdf |
Beta Was this translation helpful? Give feedback.
-
@Pawelinode , @ThinkTransit I am sorry but I have no idea what ppp connection is. I am new to any operation with GSM module. I am using library mentioned above and that is what I am working with(I followed the example in the repo and it works: https://github.com/pythings/Drivers). I would love to use mqtt.robust if possible. Can you give me an example what I would need to do to make it work? |
Beta Was this translation helpful? Give feedback.
-
You have two options:
|
Beta Was this translation helpful? Give feedback.
-
How did you try to connect via PPP ? |
Beta Was this translation helpful? Give feedback.
-
After induction: time.sleep(5) import network |
Beta Was this translation helpful? Give feedback.
-
After issuing the gsm.write('ATD*99#\r\n') command, another AT command cannot be sent. I don't know if it's enough to call print(gsm.readline()) twice for each AT command. |
Beta Was this translation helpful? Give feedback.
-
You set a low UART speed and did not define the RTS/CTS line in the modem. There will be a problem with downloading more than ~1.5kB of data (TCP MTU). PPP does not provide flow control. Micropython may lose data sent from the modem. |
Beta Was this translation helpful? Give feedback.
-
Modify this line of code: |
Beta Was this translation helpful? Give feedback.
-
The problem that occurred may result from the use of requests and async. See the board schematic. Modems are usually connected using 4 lines RxD, TxD, RTS, CTS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use TTGO T-Call board as MQTT client. I will have this board positioned in remote location where WiFi access is not possible. Is there a known existng MQTT library which I could use. I was searching for it but only found https://github.com/peterhinch/micropython-mqtt/tree/master which to my knowlage is only avaliable with WiFi interface.
I tought it was worth asking if there is a library in the wild or if @peterhinch work can be customized for this need/used with GSM module instead of Wifi.
Thank you upfront!
Beta Was this translation helpful? Give feedback.
All reactions