SIM800L + UART + network module?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
headshaker
Posts: 8
Joined: Tue Feb 18, 2020 3:22 pm

Re: SIM800L + UART + network module?

Post by headshaker » Sat Mar 07, 2020 2:12 pm

You have very interesting part in your code:

Code: Select all

ppp = network.PPP(simcom.simcom) 
So, you have some simcom object in uart class?

kinno
Posts: 32
Joined: Mon Oct 21, 2019 2:06 pm

Re: SIM800L + UART + network module?

Post by kinno » Mon Mar 09, 2020 12:50 pm

I tried to extract just the code that would help but I think I may have led to some confusion.

The simcom.simcom that you are referring to is a module I wrote myself to handle all the functions related to simcom in my project. I didn't want to upload hundreds of lines of code so I copied the parts I thought would be important.

So,

Code: Select all


simcom = UART(1, 9600)  # Create with given baudrate
simcom.init(baudrate=9600, bits=8, parity=None, stop=1, rx=26, tx=27)  # init with given parameters check rx and tx.

AT('+CIPSHUT', success='SHUT OK')
AT('+CFUN=1,1', timeout=30, success="SMS Ready")

print("Running Modem Setup Scripts")
AT('', timeout=1)
AT('+IPR=9600')
AT('+GSN')
AT('+CPIN?')
AT('+CFUN=1')
AT('+CMNB=1')
AT('+CSTT="' + apn + '","",""')
AT('+CGDCONT=1,"IP","' + apn + '"')
AT('S7=10')

AT('+CGDATA="PPP",1', success='NO CARRIER', timeout=5)             # TODO First call often fails.... Why?
if AT('+CGDATA="PPP",1', timeout=0)[0] == 'Timeout':               	   # TODO Second Call Connects Immediately. Why?
        print('PPP Call Established.')
    else:
        print('PPP Call Failed.')
Is actually in the module I wrote titled simcom.py. That's why you see the simcom.simcom. I did not correctly edit it for the example. I missed that.

eldstado
Posts: 4
Joined: Wed Aug 26, 2020 7:59 pm

Re: SIM800L + UART + network module?

Post by eldstado » Wed Aug 26, 2020 8:01 pm

Hi, did you find out about this? I'm struggelig with similar issues, cant get IP from ppp.
Modem is working when using sockets directly, but no PPP.

using firmware 1.12 with spiram. nimbelink skywire modem on UART2

User avatar
imliubo
Posts: 3
Joined: Sun Dec 03, 2017 1:41 pm

Re: SIM800L + UART + network module?

Post by imliubo » Sun Nov 08, 2020 8:30 am

eldstado wrote:
Wed Aug 26, 2020 8:01 pm
Hi, did you find out about this? I'm struggelig with similar issues, cant get IP from ppp.
Modem is working when using sockets directly, but no PPP.

using firmware 1.12 with spiram. nimbelink skywire modem on UART2
Hi, I got same issue, did you find any solution?

User avatar
imliubo
Posts: 3
Joined: Sun Dec 03, 2017 1:41 pm

Re: SIM800L + UART + network module?

Post by imliubo » Fri Dec 11, 2020 8:59 am

imliubo wrote:
Sun Nov 08, 2020 8:30 am
eldstado wrote:
Wed Aug 26, 2020 8:01 pm
Hi, did you find out about this? I'm struggelig with similar issues, cant get IP from ppp.
Modem is working when using sockets directly, but no PPP.

using firmware 1.12 with spiram. nimbelink skywire modem on UART2
Hi, I got same issue, did you find any solution?
I find the reason:
https://github.com/micropython/micropython/pull/6453

Post Reply