atc1441 / E-Paper_Pricetags

GNU General Public License v3.0
219 stars 38 forks source link

Command 0x1b (RfStats) #4

Open xsrf opened 3 years ago

xsrf commented 3 years ago

_Originally posted by @atc1441 in https://github.com/atc1441/E-Paper_Pricetags/issues/2#issuecomment-808908580_

RfStats contain these for example, but unknown of the order till now: public sbyte? rssi; public byte? lqi; public ushort? packetErrors; public ushort? transFailure; public ushort? missedSyncPackets; public ushort? numberOfResyncs; public ushort? numberOfUpdates;

I did some tests on this with my Chroma29, maybe it will help ;)

Responses to 0x1b:
NetID: 1 freq: 0 display: 124 7477153 = 9B:0D:D0:00:00:06:00:EC:00:32:00:00:D0:80:80 # offset 30
NetID: 1 freq: 0 display: 124 7505753 = 9B:0D:D0:00:00:06:00:EC:00:32:00:00:D0:80:80 # offset 30
NetID: 1 freq: 0 display: 124 7595953 = 9B:0D:CF:00:00:08:00:EC:00:32:00:00:D0:80:80 # after skipping 2 syncs, offset 30
NetID: 1 freq: 0 display: 124 7646553 = 9B:0D:D0:00:00:09:00:EC:00:31:00:00:D0:80:80 # after skipping 1 sync, offset 30
NetID: 1 freq: 0 display: 124 7714753 = 9B:0D:D0:00:00:0A:00:EC:00:32:00:00:D0:80:80 # after skipping 1 sync, offset 30
NetID: 1 freq: 0 display: 124 7782953 = 9B:0D:D0:00:00:0C:00:EC:00:32:00:00:D0:80:80 # after skipping 2 syncs, offset 30
NetID: 1 freq: 0 display: 124 7928153 = 9B:0D:D0:00:00:0E:00:EC:00:32:00:00:D0:80:80 # after skipping 2 syncs, offset 30
NetID: 1 freq: 0 display: 124 8075553 = 9B:0D:CE:00:00:0E:00:EC:00:6B:00:00:D0:80:80 # offset 45
NetID: 1 freq: 0 display: 124 8086619 = 9B:0D:CE:00:00:0E:00:EC:00:7F:00:00:D0:80:80 # offset 46
NetID: 1 freq: 0 display: 124 8353370 = 9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:9B:0D:D0:00:00:0F:00:EC:00:6C:00:00:D0:80:80 # offset 47, transmit failed / retransmit
NetID: 1 freq: 0 display: 124 8363753 = 9B:0D:D0:0F:00:0F:00:EC:00:6C:00:00:D0:80:80 # offset 45 with previous retransmit error
NetID: 1 freq: 0 display: 124 8574953 = 9B:0D:CF:00:00:11:00:EC:00:32:00:00:D0:80:80 # offset 10

I've intentionally skipped some syncs by changing the frequency for a short moment and also reduced signal quality by getting the frequency offset to the edge.

The 3rd and 10th byte seem to correlate with signal quality. 4th byte may be an error counter but I'm not sure what it caused to reset. 6th byte indeed counts the missed syncs, which is easy to verify.

xsrf commented 3 years ago
NetID: 1 freq: 0 display: 124 146753 = 9B:0D:CF:00:00:27:00:F1:00:32:00:00:D0:80:80 # after reactivation on wu (which failed)
NetID: 1 freq: 0 display: 124 222653 = 9B:0D:CC:00:00:2C:00:F2:00:32:00:00:CB:80:80 # after reactivation on wu (which failed)
NetID: 1 freq: 0 display: 124 284254 = 9B:0D:CC:00:00:31:00:F3:00:33:00:00:CC:80:80 # after reactivation on wu (which failed)
NetID: 1 freq: 0 display: 124 361254 = 9B:0D:CA:00:00:00:00:F4:00:32:00:00:C6:80:80 # after reset (power-cycle)
NetID: 1 freq: 0 display: 124 438254 = 9B:0D:CA:00:00:00:00:F5:00:32:00:00:CA:80:80 # after reset (power-cycle)

Looks like the 8th Byte counts something that happens when I power-cycle the label OR force it into wake-up mode (by forcing missed syncs) and trying to reactivate