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

    LoPy ADR does not seem to work

    Scheduled Pinned Locked Moved LoPy
    lorawanlopyadr
    4 Posts 3 Posters 1.9k Views 3 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.
    • A Offline
      autodomain
      last edited by

      Hi,
      ADR seems not working right, it stays at sf12 all the time without ever changing the spread factor.
      Here is my init.

      lora = LoRa(mode=LoRa.LORAWAN, adr=True, public=True, tx_retries=3, device_class=LoRa.CLASS_C)
      
      app_eui = binascii.unhexlify('01 23 45 67 89 FF FF FF'.replace(' ',''))
      app_key = binascii.unhexlify('01 23 45 67 89 AB CD EE EE EE 45 67 89 AB CD EF'.replace(' ',''))
      
      # join a network using OTAA (Over the Air Activation)
      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(1)
      print('Joined.......')
      
      # create a LoRa socket
      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
      # set the LoRaWAN data rate
      s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5)
      # selecting confirmed type of messages
      s.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, False)
      # make the socket blocking
      s.setblocking(False)
      

      I'm using LoPy with mutitech conduit and gotthardp/lorawan-server.
      What could be wrong?

      1 Reply Last reply Reply Quote 0
      • bmarkusB Offline
        bmarkus
        last edited by

        To get ADR working or to find why it doesn't work is not straightforward, as the algorithm how to implement is not part of the LoraWAN specification and up to the Network Server if it is implemented at all. Even with a proper Network Server it may require attention on the device side to get it properly working. First I would start with LoPy ADR on a server where it works, like Loriot and after that go to another server; in this case it would need some changes still. Also would be good to make sure ADR is working on gotthardp, checking its documentation and test with a device with proven ADR operation. In your current setup I see too many uncertain part.

        1 Reply Last reply Reply Quote 0
        • A Offline
          autodomain
          last edited by

          Solved.
          I found another page on the server to set the ADR, just fill this up and it all works.

          Thanks

          1 Reply Last reply Reply Quote 0
          • D Offline
            dbrgn
            last edited by

            Did someone successfully connect to the Things Network (TTN) with ADR working?

            The TTN should have ADR enabled by default with the algorithm kicking in after 20 packets, yet even after 70 packets it's still at SF12BW125. The gateway is just next door, my packets have an RSSI of about -50 and a SNR of around 5-7. SF7 would still give plenty of margin.

            My LoPy firmware is at 1.7.3b2.

            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