I think I might be seeing any issue where one node's data is stepping on a second node's data when the Pi Hat is sending the data to the Pi.
The first node is a temperature sensing node that reports the temperature and battery voltage every ~1min or so. A typical transmission it sends is:
[2] BAT:381 F:80 [RSSI:-81]
The second node has a network of 1-wire sensors connected to it and also sends an update every ~1min or so. It's typical transmission is as follows:
[8] BSMT:78 FRZR:3 HVAC:79 OUTT:77 FRST:77 [RSSI:-31]
Occasionally, (about 1/day) I see the following in the log:
[8] BSMT:78 FRZR:0 HVAC:75`BAT:382 F:82 [RSSI:-80]
This looks to me like the second (5 sensor) node is sending the data, but near the end of the transfer to the Pi, the first node (Bat and Temp) is sending it's data which is clobbering the end of the transmission of the first.
Any thoughts?
Thanks.
Never seen that happen in my case.
Do you use a MightyHat?
What is your Hat-Pi serial baud rate?
What sketch do you use on the Hat?
I use a MightyHat. The baud is set to 19200. I use the stock sketch with minimal changes for node ID, encryption, etc.
Ok, is there a pattern of the corrupted data? Or is it random?
I see that tick in your example, what are other corrupted lines looking like?
Thus far it only seems to be a 2 sensor node overstepping the 5 sensor node. The data that is corrupted is the data that is always corrupted.
The two that I have from the console logs are:
[8] BSMT:78 FRZR:0 HVAC:79`BAT:514 F:73 [RSSI:-80]
The Tic actually has more data in it; it does not copy. The hex values are 0x0F, 0x01, 0x03, 0x60. Only the 0x60 shows up as '`'.
The second one is:
[8] BSMT:78 FRZR:0 HVAC:75`BAT:382 F:82 [RSSI:-80]
Again, the full hex values between C:75 and BAT are 0x0F, 0x01, 0x04, 0x60. The 0x60 shows up as '`'.
So it would seem as though an extra 0x0F, 0x01 and the node numbers are sneaking in.
Node 3's battery voltage is 514 righe before this error, and node 4's battery voltage is 382 just before this error.
Does this make sense?
Here is a fuller picture of one of the logs. I start with the correct report from node 3, and end just after the corrupted reading:
[09-14-16_14:36:25.820] [LOG] >: [3] BAT:514 F:73 [RSSI:-78]
[09-14-16_14:36:25.823] [LOG] post: /home/pi/gateway/data/db/0003_F.bin[1473881785,73]
[09-14-16_14:36:25.832] [LOG] [3] DB-Updates:1
[09-14-16_14:36:56.449] [LOG] >: [7] BAT:382 F:77 [RSSI:-80]
[09-14-16_14:36:56.452] [LOG] post: /home/pi/gateway/data/db/0007_F.bin[1473881816,77]
[09-14-16_14:36:56.460] [LOG] [7] DB-Updates:1
[09-14-16_14:36:59.827] [LOG] >: [2] BAT:381 F:78 [RSSI:-81]
[09-14-16_14:36:59.831] [LOG] post: /home/pi/gateway/data/db/0002_F.bin[1473881819,78]
[09-14-16_14:36:59.838] [LOG] [2] DB-Updates:1
[09-14-16_14:37:29.541] [LOG] >: [4] BAT:382 F:76 [RSSI:-80]
[09-14-16_14:37:29.544] [LOG] post: /home/pi/gateway/data/db/0004_F.bin[1473881849,76]
[09-14-16_14:37:29.556] [LOG] [4] DB-Updates:1
[09-14-16_14:37:36.127] [LOG] >: [8] BSMT:78 FRZR:0 HVAC:79 OUTT:74 FRST:75 [RSSI:-41]
[09-14-16_14:37:36.131] [LOG] post: /home/pi/gateway/data/db/0008_Basement.bin[1473881856,78]
[09-14-16_14:37:36.133] [LOG] post: /home/pi/gateway/data/db/0008_Freezer.bin[1473881856,0]
[09-14-16_14:37:36.135] [LOG] post: /home/pi/gateway/data/db/0008_HVAC.bin[1473881856,79]
[09-14-16_14:37:36.138] [LOG] post: /home/pi/gateway/data/db/0008_Outside.bin[1473881856,74]
[09-14-16_14:37:36.140] [LOG] post: /home/pi/gateway/data/db/0008_First Floor.bin[1473881856,75]
[09-14-16_14:37:36.149] [LOG] [8] DB-Updates:1
[09-14-16_14:38:03.462] [LOG] >: [7] BAT:382 F:77 [RSSI:-80]
[09-14-16_14:38:03.465] [LOG] post: /home/pi/gateway/data/db/0007_F.bin[1473881883,77]
[09-14-16_14:38:03.473] [LOG] [7] DB-Updates:1
[09-14-16_14:38:10.854] [LOG] >: [2] BAT:381 F:78 [RSSI:-78]
[09-14-16_14:38:10.859] [LOG] post: /home/pi/gateway/data/db/0002_F.bin[1473881890,78]
[09-14-16_14:38:10.867] [LOG] [2] DB-Updates:1
[09-14-16_14:38:37.558] [LOG] >: [4] BAT:382 F:76 [RSSI:-80]
[09-14-16_14:38:37.563] [LOG] post: /home/pi/gateway/data/db/0004_F.bin[1473881917,76]
[09-14-16_14:38:37.575] [LOG] [4] DB-Updates:1
[09-14-16_14:38:45.465] [LOG] >: [8] BSMT:78 FRZR:0 HVAC:79`BAT:514 F:73 [RSSI:-80]
[09-14-16_14:38:45.468] [LOG] post: /home/pi/gateway/data/db/0008_Basement.bin[1473881925,78]
[09-14-16_14:38:45.471] [LOG] post: /home/pi/gateway/data/db/0008_Freezer.bin[1473881925,0]
[09-14-16_14:38:45.473] [LOG] post: /home/pi/gateway/data/db/0008_HVAC.bin[1473881925,79]
[09-14-16_14:38:45.476] [LOG] post: /home/pi/gateway/data/db/0008_F.bin[1473881925,73]
[09-14-16_14:38:45.487] [LOG] [8] DB-Updates:1
[09-14-16_14:38:48.820] [LOG] >: [6] BAT:378 F:73 [RSSI:-88]
[09-14-16_14:38:48.827] [LOG] post: /home/pi/gateway/data/db/0006_F.bin[1473881928,73]
Thanks.
First I would make sure the libs are the latest.
Then I would find out exactly what characters are coming in. BUT there's a pattern which tells me something is wrong in software. I would totally expect garbled data if the serial data is corrupted, not the same char in the same place.
The next thing is to sniff the serial TX to Pi with a logic analyzer and see if the characters on the wire match what you receive.