Code: Select all
ppp = network.PPP(simcom.simcom)
Code: Select all
ppp = network.PPP(simcom.simcom)
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.')
Hi, I got same issue, did you find any solution?
I find the reason: