Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    lte firmware 41065 Vs 43818

    Scheduled Pinned Locked Moved Issues & Bugs
    1 Posts 1 Posters 143 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kjm
      last edited by

      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_FAIL
      

      it always crashes way sooner.

      1. Does anyone have a 43818 GPY to confirm this behaviour please?
      2. Can someone PLEASE tell me what I have to do to make this program reliable with 43818 modem firmware?
      1 Reply Last reply Reply Quote 0

      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
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom