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

    Not able to receive downlink data on LoPy

    Scheduled Pinned Locked Moved Firmware
    lopylora
    6 Posts 3 Posters 1.5k 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.
    • S Offline
      SameerChouksey
      last edited by

      Hello,

      I am using LoPy module to send and receive data over LoRa. I am able to send data successfully but can not receive the LoRa data. Below is the code I am using to receive data. Please check.

      s.setblocking(False)

      while(1):
      data = s.recv(64)
      if(data):
      print("Received data: "+str(data))

      Regards
      Sameer

      robert-hhR R 3 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @SameerChouksey
        last edited by

        @sameerchouksey Some questions:

        • are you using it with TTN or with some other software?
        • is the node set to LORA raw mode or to LoRa WAN mode?
        • What is thr revision of your firmware?
        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @SameerChouksey
          last edited by robert-hh

          @sameerchouksey Just a hint:
          start a script with Lora always after a full reset. Soft reset does not reset the Lora device properly.
          Full reset is done by pushing the reset button or calling machine.reset()

          1 Reply Last reply Reply Quote 0
          • S Offline
            SameerChouksey
            last edited by

            • I am using it with an established LoRa infrastructure and I am able to send data successfully.

            • The node is set to LoRa WAN mode and Device is operating in class C mode.

            • The version info: (sysname='LoPy', nodename='LoPy', release='1.16.0.b1', version='v1.8.6-849-055728a on 2018-02-13', machine='LoPy with ESP32', lorawan='1.0.0')

            P.S. I tried hard resetting the device but it doesn't help.

            Regards,
            Sameer

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @SameerChouksey
              last edited by robert-hh

              @sameerchouksey Did you try to send an uplink message before waiting for a downlink message, according to the LoRa spec?
              You can also try arw LoRa mode, which does not require an uplink message before a downlink message.

              1 Reply Last reply Reply Quote 0
              • R Offline
                rskoniec @SameerChouksey
                last edited by rskoniec

                @sameerchouksey Did you try this example https://docs.pycom.io/chapter/tutorials/lora/lorawan-otaa.html ?

                Especially:

                # make the socket blocking
                # (waits for the data to be sent and for the 2 receive windows to expire)
                s.setblocking(True)
                
                # send some data
                s.send(bytes([0x01, 0x02, 0x03]))
                
                # make the socket non-blocking
                # (because if there's no data received it will block forever...)
                s.setblocking(False)
                
                # get any data received (if any...)
                data = s.recv(64)
                print(data)
                

                Also try to upgrade FW to 1.17.x (lorawan have changed to 1.0.2 spec).

                The machine is working as good as it's code.

                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