Troubleshooting - SteveCossy/IOT GitHub Wiki

From: Andrew Hornblow Date: Tue, 25 Feb 2020 at 16:20

The serial glitching / random data failure / attack I have a few ideas to sleuth out what is happening:

  1. Echo the LoRa Data into the Pi end directly back out to the 'device'
  • This is as simple as link the Tx data pin to the Rx data pin at the Pi end
  • The UART on the 1268 / 78 is perfect for this as it buffers the Bi Di Traffic long enough for it. DO:
  • Compare what was sent with what is Rx back is 'easy pi-caxe'
  • The 'device' remote sensor end compares and notes Tx'd data with Rx'd echo data to find
  • E.g. = Did i get an echo data back at all
  • E.g. Measure and transmit as a parallel variable = What percentage of GOOD packets were seen by the Pi
  • Transmit this variable as a % of last 100 transmissions rolling total into the system for monitoring and plotting
  1. Same idea but we use the ser.write to echo the data from the brain of the Pi
  • Why ? Because there may be issues with the 2nd grade ttyS0
  • I suspect this Could be an issue...
  • We can prove this easy enough by substituting a Liam Lead ttyUSB0 that is possibly much more robust

From this we can sleuth out if stuff is going on like simply external noise / radio data is crashing in and trashing LoRa transmissions OR

  • There are issues going on in the Pi / ttyS0 OR
  • Issues with the timing / priorities level of the serial port hardware / buffer processing etc...