Friday, June 23, 2017

wireshark tips

to find binary contents

frame contains 00:40:3f
(rather than 00403f, if you're searching for a byte with the value hex 00, followed by a byte with the value hex 40, followed by a byte with the value hex 3f) will match regardless of whether the frames are Ethernet frames or not.
to find string
frame contains "string"

Wednesday, June 14, 2017

802.11ac channel segment calculation

Seg0 = center frequency channel
Seg0 = (primary channel number) + (((bandwidth / 2) - 10) / 5)
* ( bandwidth / 2 ) = look up center
* ( -10 ) = 20MHz channel center is 10Mhz above
* ( /5 ) = 1 channel width is 5Mhz

Ch36 40MHz Seg0 = 36 + (((40 / 2) - 10) / 5) = 38 (36 + 2)
Ch36 80MHz Seg0 = 36 + (((80 / 2) - 10) / 5) = 42 (36 + 6)
Ch36 160MHz Seg0 = 36 + (((160 / 2) - 10) / 5) = 50 (36 + 14)

dot11CurrentChannelWidth
Channel width. Possible values represent 20 MHz, 40 MHz,
80 MHz, 160 MHz, and 80+80 MHz channels.

dot11CurrentChannelCenterFrequencyIndex0
For a 20 MHz, 40 MHz, 80 MHz, or 160 MHz channel, denotes
the channel center frequency.
For an 80+80 MHz channel, denotes the center frequency of the
frequency segment 0, which is the frequency segment containing
the primary channel.
Valid range is 1 to 200.
See Equation (22-102).

dot11CurrentChannelCenterFrequencyIndex1
For an 80+80 MHz channel, denotes the center frequency of the
frequency segment 1, which is the frequency segment that does
not contain the primary channel.
Valid range is 1 to 200.
See Equation (22-102).
For a 20 MHz, 40 MHz, 80 MHz, or 160 MHz channel, set to 0.

dot11CurrentPrimaryChannel
Denotes the location of the primary 20 MHz channel.
Valid range is 1 to 200.
See Equation (22-103).

22-103:
Primary 20 MHz channel center frequency [MHz]
= Channel starting frequency + 5 x dot11CurrentPrimaryChannel
ex) channel 36: 5000MHz + 5 x 36 = 5180Mhz
dot11CurrentPrimaryChannel = (5180 - 5000) / 5 = 36

22-102:
VHT80 Channel 36 center frequency = 5000 + 5 x 36 = 5180Mhz
* Ch36 80MHz Seg0 = 36 + (((80 / 2) - 10) / 5) = 42 (36 + 6)
Channel center frequency [MHz]
= Channel starting frequency + 5 x dot11CurrentChannelCenterFrequencyIndex
Channel center frequency [MHz] = 5000 + 5 x 42 = 5210MHz
dot11CurrentChannelCenterFrequencyIndex = dot11CurrentChannelCenterFrequencyIndex0 = 42

dot11CurrentChannelCenterFrequencyIndex is either dot11CurrentChannelCenterFrequencyIndex0 or
dot11CurrentChannelCenterFrequencyIndex1