LoPy4 LoRa Data Corruption
-
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'
-
Hi,
You can find all the specs for the LoRa transceiver we're using on these modules here:
-
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.
-
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.
-
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?