Commit 9814d2b
authored
fix(server): correct RSSI byte offset in frame parser (#332)
The server parsed rssi from buf[14] and noise_floor from buf[15], but
the firmware (csi_collector.c) packs them at buf[16] and buf[17]:
Firmware: n_subcarriers=u16(6-7) freq=u32(8-11) seq=u32(12-15) rssi=i8(16)
Server: n_subcarriers=u8(6) freq=u16(8-9) seq=u32(10-13) rssi=i8(14) ← WRONG
This caused RSSI to read the high byte of the sequence counter instead
of the actual signed RSSI value, producing positive values (e.g., +9)
instead of the correct negative values (e.g., -46 dBm).
Added inline documentation of the frame layout matching csi_collector.c.
Closes #3321 parent 7f02c87 commit 9814d2b
1 file changed
Lines changed: 17 additions & 5 deletions
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
568 | 579 | | |
569 | 580 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
575 | 587 | | |
576 | 588 | | |
577 | 589 | | |
| |||
0 commit comments