Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing 802.11n MCS #2

Open
niksak opened this issue Nov 22, 2017 · 0 comments
Open

Parsing 802.11n MCS #2

niksak opened this issue Nov 22, 2017 · 0 comments

Comments

@niksak
Copy link

niksak commented Nov 22, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant