Hi all, I asked this question on /librarys forum part long time ago without response. viewtopic.php?f=15&t=10001
After searching for a lib supporting cellular modem modules in latest micropython (now 1.19) and Im not finding anything but that old loboris ESP32 port freeze at 2018 that easily permit data connections from ESP32. A pity that the port didn't integrate into the main mpy branch.
Any hint for modules like sim800 or sim7600 or quectel ones? I need to connect a mqtt or blynk app in cases wifi access is not available.
M
Cellular / modem comunnications port
Re: Cellular / modem comunnications port
I have discovered that the easiest way to use modems with micropython is to use PPP. This provides a seamless network connection so you can use all the standard libraries like ntp, requests etc.. without dealing with the raw AT commands.
The trick to getting ppp working is to first put the modem in ppp mode, you shouldn't need a library for this. I use the SARA modems and all that I need to do is:
1. Wait for the modem to connect to a nework
2. Activate a GPRS connection "AT+UPSDA=0,3 " This will be different for the SIMCOM modems.
3. Create a ppp connection in micropython
I have some SIM7600 modules here that I will be using in a project soon. If I get some working code written I will share it here.
The trick to getting ppp working is to first put the modem in ppp mode, you shouldn't need a library for this. I use the SARA modems and all that I need to do is:
1. Wait for the modem to connect to a nework
2. Activate a GPRS connection "AT+UPSDA=0,3 " This will be different for the SIMCOM modems.
3. Create a ppp connection in micropython
Code: Select all
import network
qw = network.PPP(self.uart)
qw.active(True)
time.sleep(0.5)
qw.connect(authmode=qw.AUTH_PAP, username="", password="")
count = 0
while qw.isconnected == False:
time.sleep(1)
count += 1
if count > 5:
raise
logger.debug(f'PPP connected')
-
- Posts: 20
- Joined: Sun Apr 26, 2020 7:30 am
Re: Cellular / modem comunnications port
Thanks P_J. I will try that network.PPP and comment also over here. I have also SIM7600 SA also with PCIE for those Lilygo ttgo-PCIe ESP32 board. I will be trying first Quectel BG600 LTE/GPRS small factor with a ESP 32 s3 board as is what I chose for my project, if any is also aiming this modules.
-
- Posts: 20
- Joined: Sun Apr 26, 2020 7:30 am
Re: Cellular / modem comunnications port
some similar pointers here:
https://community.hiveeyes.org/t/ppp-ov ... p32/2994/2
a very old one:
viewtopic.php?t=3754
https://community.hiveeyes.org/t/ppp-ov ... p32/2994/2
a very old one:
viewtopic.php?t=3754