CSIKit icon indicating copy to clipboard operation
CSIKit copied to clipboard

Decoding the CSIData section in the frame payload

Open SinGuLaRiTy2001 opened this issue 1 year ago • 0 comments

Hi, for some reason my project has to process the frame payload in format of hex string, each I extracted directly from each frame captured by Nexmon. By calculating the length of hex string and comparing with number of subcarriers, I noted that the CSI data for each subcarrier is a hex string in length of 8, such as 3715 b616. However, by examine the read_pcap.py, I didn't understand how CSIKit decode this hex string into a complex float np data. Is there some method that can help with decoding?

The harware we are using is 4366c0 (RT-AC86U), and consider this type of frame:

0000   ff ff ff ff ff ff 4e 45 58 4d 4f 4e 08 00 45 00
0010   01 2e 00 01 00 00 01 11 a4 ab 0a 0a 0a 0a ff ff
0020   ff ff 15 7c 15 7c 01 1a 00 00 11 11 cd 00 fc d9
0030   08 45 38 da 50 f1 00 00 64 d0 6a 00 f4 25 23 2d         # CSI Data start from here: f4 25 23 2d
0040   77 23 5a 14 77 5e ae 13 f7 93 46 11 b6 a6 b3 1e
0050   f6 f1 c7 17 f7 15 8f 08 f5 f9 1b 2a 77 2e 07 00
0060   37 1a 6b 24 b7 00 77 28 f6 9f f7 36 b6 28 8f 3c
0070   76 b0 ea 3e 77 12 36 30 76 63 80 3d f6 ce ac 3a
0080   f6 3e 0d 35 36 82 cd 2d 36 9d 69 26 f6 98 71 02
0090   36 00 7d 26 36 1c b5 10 76 9d 54 15 36 11 ac 16
00a0   76 85 ba 14 76 08 2b 0d f6 4e d7 02 27 08 0f 02
00b0   00 ce d1 d3 d3 00 00 00 f1 0f fa 38 f2 1f 81 24
00c0   b1 7f fd 08 30 60 0a 1c 2d 02 13 10 76 82 11 00
00d0   36 65 3d 0b 36 fa f4 13 f6 7a 3c 1a 76 2b d6 1b
00e0   b6 ba 86 1a f6 3f 3b 17 f7 db 33 0a f7 0e 83 04
00f0   f7 23 7b 20 f7 28 cb 25 37 0b eb 2a 36 c1 f7 3f
0100   77 98 de 33 f7 3c 52 36 f7 20 08 37 37 80 f4 35
0110   b7 d5 08 34 f7 1c 35 30 77 4f 25 2b 37 6f e9 25
0120   37 3d f1 0e b7 6c d5 04 f7 4d 91 09 b7 29 cd 0d
0130   77 e6 98 10 37 ac f4 12 b7 6d 9c 14

Thank you!

SinGuLaRiTy2001 avatar Nov 19 '23 09:11 SinGuLaRiTy2001