Skip to content

Parsing 802.11n MCS #2

@niksak

Description

@niksak

Hi,
I think there is a problem when parsing 802.11n data rate. Although the 3 Bytes for mcs are retrieved correctly, when I call

dR2 = rtap.parse(raw2)
dR2.rate

it gives me slightly different rate than when I parse the same packets with wireshark.

I use ath10k and

iw mon0 set freq 5180 80 5210

and monitor my mobile phone traffic.

I tracked the problem to your code in mcs.py and I noticed that in your MCS_HT_RATES list you might have put the Guard Interval bits in different order.

By having a look here http://mcsindex.com/ and here http://www.radiotap.org/fields/MCS.html we know that if for example this 07 05 07 is the hex representation of MCS field, from the second Byte we get that Bandwidth is 40(2 least significant bits) and from the 3d bit we get "1" which means GI=short GI. From the third Byte we get mcs_index = 7.

Now in your mcs_rate() function the 7th element from the list is called
{20:{1:65,0:72.2},40:{1:135,0:150}}, # mcs index 7
with bandwidth 40 and guard interval 1 which points to 135 instead of 150 as the rate should be based on mcsindex.com --> Data Rate SGI = 400ns 40MHZ mcs index 7 = 150

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions