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

    Pycom fipy works fine with ABP, but not with OTAA

    Scheduled Pinned Locked Moved Discussion
    2 Posts 2 Posters 24 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.
    • D Offline
      Dale Fletcher Banned
      last edited by

      I have a Things Gateway established here with a ThingsNode connecting and communicating with it without trouble using ABP.

      My poor little Pycom fipy, on the other hand, will only connect with ABP. If I try the following example using OTAA, I receive no response from the TTN gateway and the fipy merely loops printing "Not joined yet."

      Any suggestions on how I can debug and figure out what's going on?

      from network import LoRa
      import time
      import binascii
      
      lora = LoRa(mode=LoRa.LORAWAN)
      
      app_eui = binascii.unhexlify('<app eui key here>')
      app_key = binascii.unhexlify('<app key here>')
      
      lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)
      
      # wait until the module has joined the network
      while not lora.has_joined():
          time.sleep(2.5)
          print('Not joined yet...')
      
      print('Network joined!')```
      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Dale Fletcher
        last edited by robert-hh

        @Dale-Fletcher Which firmware version do you use?

        The time window for receiving a OTAA join confirmation is small (~10 ms after 5 or 6 seconds) and the PyCom (ESP32) device have not
        You could try to join with a lower data rate or init Lora with a higher spreading factor. That will increase the time window for receive.
        Edit: Do you see the join request in the TTN gateway console?

        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