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 attachment

    Scheduled Pinned Locked Moved GPy
    gpylteattachment
    4 Posts 2 Posters 408 Views 2 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

      Are there any diagnostics to be had out of the gpy re lte attachment after a deepsleep? I generally get attachment after 1 or 2 seconds but occasionally (a few times per day) it hasn't happened after 30 & I'm curious to find out why. These intervals, where there is no attachment after the 30s timeout I've allowed can persist for an hour or two so I'd like to get to the bottom of it.

      1 Reply Last reply Reply Quote 0
      • K Offline
        kjm
        last edited by kjm

        Interesting discovery should anyone stumble in here. If I reset the modem every deepsleep cycle attachments take 3-4s but if I reset the modem only after there has been a wdt event then attachment drops to 1s. NB: This requires a bit of effort. Since wdt timeouts generally prevent the disconnect/dettach/deinnit from the end of the previous deepsleep cycle, I need check if lte is in globals then setup a new lte=network.LTE() if it isn't, then send the modem the reset cmd.

        But modem reset seems a great cure all. Not only does it fix reluctance to attach (which I think happens when the modem is actually attached but thinks it's not) but it also fixes urequest OSErrors, which surprised me somewhat.

        1 Reply Last reply Reply Quote 0
        • H Offline
          hayesey
          last edited by

          I haven't tried LTE with deepsleep yet but am planning on doing. Could you share any code on your modem resetting logic?

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kjm @hayesey
            last edited by

            @hayesey

            import network, machine               
            wdt=machine.WDT(timeout 60000)                      #allow 60s per deepsleep cycle
            if 'lte' not in globals(): lte=network.lte()        #new modem instance if previous is gone
            cause=machine.reset_cause()                         #check if previous cycle ended via watchdog
            if cause==2: lte.send_at_cmd('AT^RESET')            #reset the modem if it did
            
            
            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