lte firmware 41065 Vs 43818
-
I can run
import time, machine, network, socket, pycom, sys lte=network.LTE(); pycom.heartbeat(False) red=0x7f0000; orange=0xff5100; yellow=0x7f5100; green=0x007f00; blue=0x00007f; cyan=0x007f7f; magenta=0x7f007f; off=0x000000; white=0x7f7f7f def _led(color): pycom.rgbled(color); time.sleep(.5); pycom.rgbled(off); time.sleep(.5); print('.', end=' ') def _lte(): print('lte attach', end=' '); lte.attach() while not lte.isattached(): _led(orange) print('lte connect', end=' '); lte.connect() while not lte.isconnected(): _led(yellow) try: lte=network.LTE() if lte.isconnected(): lte.disconnect() r=lte.send_at_cmd('ati1'); r=r.split('\r\n'); print('lte firmware', r[2]) _lte(); cycle=0 while 1: print(); print('cycle', cycle) print('modem still connected?', lte.isconnected()); s=0; path=''; host='detectportal.firefox.com' t1=time.time(); addr=socket.getaddrinfo(host, 80)[0][-1]; t=time.time()-t1; print('dns in', t, 'sec,', addr) t1=time.time(); s=socket.socket()#; s.settimeout(9) s.connect(addr); s.send(bytes('GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n' % (path, host), 'utf8')) l=s.readline(); t=time.time()-t1; s.close() l=l.split(None, 2); status = int(l[1]); print('srvr reply in', t, 'sec,', 'status code', status) for i in range (57): _led(green) cycle+=1 except Exception as e: sys.print_exception(e) if s: s.close()on a gpy with CAT-M1 41065 modem firmware & it will go for thousands of cycles before ending in an OSError, but when I try it on a gpy with CAT-M1 43818 modem firmware
lte firmware LR5.1.1.0-43818 lte attach lte connect cycle 0 modem still connected? True dns in 0 sec, ('23.192.108.91', 80) srvr reply in 0 sec, status code 200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cycle 1 modem still connected? True dns in 1 sec, ('23.192.108.91', 80) srvr reply in 0 sec, status code 200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cycle 2 modem still connected? True dns in 0 sec, ('23.192.108.91', 80) srvr reply in 0 sec, status code 200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cycle 3 modem still connected? True dns in 1 sec, ('23.192.108.97', 80) srvr reply in 0 sec, status code 200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cycle 4 modem still connected? True Traceback (most recent call last): File "<stdin>", line 23, in <module> OSError: [Errno 202] EAI_FAILit always crashes way sooner.
- Does anyone have a 43818 GPY to confirm this behaviour please?
- Can someone PLEASE tell me what I have to do to make this program reliable with 43818 modem firmware?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login