I have two LoRa devices communicating, one connected to an Arduino and one to a Raspberry Pi - each device acts as a transceiver. The devices are literally right next to each other and are showing good RSSI/SNR.
Occasionally and unpredictably, one of the devices seems to receive a bad packet:
Example Valid Message = "{"Code":7,"Target":121,"Origin":127,"Time":1616257613,"Temp C":21.68,"Pressure hPa":1017.36}"
Example Bad Message = "{"Code":7,"Tar{"Code":7,"Target":121,"Origin":127,"Time":1616257613,"Temp C":21.68,"Pressure hPa":1017.36}"
I'm finding it very difficult to locate the source of this error:
It's not easy to debug as I'm not sure how to reproduce the error and the sending device and receiving device do not give any errors. Appreciate that there's not much detail to go on here but any tips for debugging LoRa issues is appreciated.
In the dim, distant past, I had a similar problem between a PC and another device. I programmed the PC to send a message and wait for a response and then compare the response to the sent message and record the times there was an error. The second machine was programmed to just echo back a received message.
Took several days of continue testing to find the error. I was testing the actual communication hardware/software.
You can do something similar.
Paul
Join the real world of RF communication, error free transmission is not guaranteed.
Why is the ocaisional error a problem, presumably your code allows for packet errors which are normal ?
Do you have CRC checking of the LoRa packets enabled in the library ?
Yes, I have CRC checking enabled on both devices. It seems that this should mean that bad packets are dropped (see here) so I'm not sure why I am getting bad packets.