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.isattached() is always false

    Scheduled Pinned Locked Moved Issues & Bugs
    ltetelstra
    1 Posts 1 Posters 344 Views 4 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.
    • M Offline
      misterlisty
      last edited by

      Anyone suggest why lte.isattached() is always false..we are using telstra nework if that helps. Has the latest dev firmware 1.20... using the fipy

      import time
      import machine
      from network import LTE

      wait_time = 1

      def wait():
      print("Waiting {}".format(wait_time))
      time.sleep(wait_time)

      lte = LTE()

      print("Resetting ... ", end='')
      reply = lte.send_at_cmd('AT^RESET')
      print("DONE: {}".format(reply))
      wait()

      carrier = 'Telstra Mobile'

      def status():
      print("")
      print("Status")
      print(lte.send_at_cmd("ATI"))
      print(lte.send_at_cmd('AT!="showphy"'))
      print(lte.send_at_cmd('AT!="fsm"'))
      print("
      ")

      def do(command, sleep_time):
      print("Sending: {}.".format(command))
      response = lte.send_at_cmd(command)
      print("Response: {}".format(response))
      wait()
      return response

      def getLTE():
      if lte.isconnected(): return lte
      if not lte.isattached():
      print('attaching ', end=''); lte.attach()
      while not lte.isattached(): print('.', end=''); time.sleep(1)
      if not lte.isconnected():
      print('connnecting ', end=''); lte.connect()
      while not lte.isconnected(): print('.', end=''); time.sleep(1)
      return lte

      do('AT+CGDCONT=1,"IP","telstra.m2m"', 1)

      do('AT!="addscanfreq band=28 dl-earfcn=9410"', 1) # in place of: lte.attach(band=28)

      do('AT+CFUN=1', 1)

      getLTE()

      do('AT+COPS=?', 1)
      result = do('ATI', 1)

      r=requests.get('http://micropython.org/ks/test.html'); print(r.text)
      lte.disconnect()

      1 Reply Last reply Reply Quote 1

      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