Open CDeLeon94 opened 2 years ago
That's really interesting, I'll check it tomorrow :)
Do you have any pcap files you captured with the bug?
Also, you can use https://github.com/zeroby0/csi-explorer to visualise and inspect pcaps from -plus :) You can also use that as reference to check your code :) https://github.com/zeroby0/csi-explorer/blob/main/CsiExplorer.py#L54
I hit this too. I believe it is because the data structure csi_extractor.c/csi_udp_frame defines the rssi field as int16, not int8 as used elsewhere in the code. Hence the RSSI as written out occupies 2 bytes not 1 as documented in the README.md.
https://github.com/nexmonster/nexmon_csi/tree/pi-5.4.51-plus
It appears to me that the large block of 0's would correlate with the 10 bytes of reserved space. However, when counting up the data sizes to figure out the offsets, I expect the reserved space to start at index 27, but it starts at index 30 and runts to index 39.
Example (a's, b's, c's replaced 3 mac addresses)
11111111aaaaaaaaaaaabbbbbbbbbbbbcccccccccccc9400ffffe5ff474f0000000000000000000006106500
the
6500
at the end (For my 43455c0) is expected 1 byte earlier, at index 41 but is found at index 42.Between indexes 40 & 41, there is not enough space for the reported 4 bytes of
CSS
andChanSpec
For these reasons, I'm suspicious that the documentation may not be correct.
I'm trying to make some changes to the CSIKit code, but it seems like some issues I'm having are related to the structure of the data possibly not matching the documentation on the readme.
It'd be greatly appreciated if you could review the docs and either correct, or confirm that I am simply misunderstanding.