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

    LoPy4 LoRa Data Corruption

    Scheduled Pinned Locked Moved LoPy
    lopy4lora
    5 Posts 2 Posters 1.1k 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.
    • S Offline
      ssmith
      last edited by

      I'm trying to get raw lora data transmission going on the LoPy4's. I've been running the original LoPy's for a year with no issues but the LoPy4's seem to get scrambled data. I created a small test program to verify. Any ideas what could cause this? I'm running the same code on 2 units.

      import socket
      import machine
      import time
      
      # initialize LoRa in LORA mode
      # more params can also be given, like frequency, tx power and spreading factor
      lora = LoRa(mode=LoRa.LORA)
      lora.init(mode=LoRa.LORA, frequency=918000000, power_mode=LoRa.ALWAYS_ON, tx_power=20, bandwidth=LoRa.BW_125KHZ, sf=9,
                    preamble=8, coding_rate=LoRa.CODING_4_8, tx_iq=False, rx_iq=False)
      # create a raw LoRa socket
      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
      # send some data
      s.setblocking(True)
      s.send('Hello From COM7')
      
      while True:
      
          # get any data received...
          s.setblocking(False)
          data = s.recv(64)
          if data:
            print(data)
            time.sleep(0.5)
            s.setblocking(True)
            s.send('Hello From COM7')
      
          # wait a random amount of time
        #  time.sleep(1)
      

      Here's the console output.

      b'Hello From \xc7OM7'
      b'Hello Erom \xc7OM7'
      b'Hello From \xc5OM7'
      b'Hello From \xc5OM7'
      b'Hello From\x10\xc6OM7'
      b'Hello From COM7'
      
      1 Reply Last reply Reply Quote 0
      • sebS Offline
        seb
        last edited by

        Hi,

        Are both LoPy4's running on the latest firmware? We released a new update yesterday. Can you try updating both and let me know if the issue persists?

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

          Yes, both running 1.15. I also see it on ones running 1.13. If I run a lopy4 and a lopy I don't get any data through.

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

            This appears to be a receiver saturation issue. At what point does the LoRa receiver saturate? my rssi is at -25 on both devices. If I change the sf to 7 then I don't get errors.

            sebS 1 Reply Last reply Reply Quote 0
            • sebS Offline
              seb @ssmith
              last edited by

              @ssmith

              Hi,

              You can find all the specs for the LoRa transceiver we're using on these modules here:

              LoPy: https://www.semtech.com/uploads/documents/sx1272.pdf

              LoPy4: https://www.semtech.com/uploads/documents/sx1276.pdf

              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