advice for debugging LoRa

Hi

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:

  • Is it my code?
  • Is it the LoRa library I'm using?
  • Is it the hardware I'm using?

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.

Thanks

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

sbaratheon:
Occasionally and unpredictably, one of the devices seems to receive a bad packet:

Yes that can happen.

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 ?

srnet:
Yes that can happen.

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.

sbaratheon:
Occasionally and unpredictably, one of the devices seems to receive a bad packet:

If its 'Occasionally', say once a year or so, then why is that a problem ?

Of course, it could be your code, but the forum has not seen that.

Did you notice that the 'bad message' contained the 'valid message' with little bit of the original message at the start.

Maybe your just not printing the messages correctly.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.