Beacon frames changed from initial debug output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to get Time Advertisement working, but I'm running into some strangeness. I'd be grateful for any guidance.

I added the two important lines to /etc/hostapd/hostapd.conf:

time_advertisement=2
time_zone=PST8PDT7,M3.2.0/02:00,M11.1.0/02:00

I did have to add a couple lines to hostapd_eid_ext_capab to get the time_advertisement bit set in the Extended Capabilities element. I've recompiled, and I've also added various wpa_printf debugs.

        if (len < 4 && hapd->conf->time_advertisement)  /* MAH time_adv */
                        len = 4;

I stopped the hostapd service and ran from the command line, with -d turned on.

I see reasonable beacon and probe response elements in the debug output, shown below. beacon_tail contains the Extended Capabilities and Time Advertisement elements, and proberesp_ies has both the time and time zone. (I've bracketed Extended Capabilities (7f), Time Advertisement (45), and Time Zone (62) below to make it easier to read - the mailing list won't let me colorize.)

nl80211: Beacon head - hexdump(len=57): 80 00 00 00 ff ff ff ff ff ff b8 27 eb 5a 7e 96 b8 27 eb 5a 7e 96 00 00 00 00 00 00 00 00 00 00 64 00 01 04 00 06 42 75 73 74 65 72 01 08 82 84 8b 96 0c 12 18 24 03 01 07 nl80211: Beacon tail - hexdump(len=60): 2a 01 04 32 04 30 48 60 6c [ 7f 04 00 00 00 08 ][ 45 11 02 e3 07 0a 11 17 32 36 00 00 00 00 00 00 00 00 00 ][ dd 18 00 50 f2 02 01 01 01 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
(snip)
nl80211: beacon_ies - hexdump(len=25): [ 45 11 02 e3 07 0a 11 17 32 36 00 00 00 00 00 00 00 00 00 ][ 7f 04 00 00 00 08 ] nl80211: proberesp_ies - hexdump(len=62): [ 45 11 02 e3 07 0a 11 17 32 36 00 00 00 00 00 00 00 00 00 ] [ 62 23 50 53 54 38 50 44 54 37 2c 4d 33 2e 32 2e 30 2f 30 32 3a 30 30 2c 4d 31 31 2e 31 2e 30 2f 30 32 3a 30 30 ] [ 7f 04 00 00 00 08 ]
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 08

Then I listened on the channel with Wireshark from my Linux workstation. Beacons appear in Wireshark, and they all look similar.

Wireshark, for some reason, sees a completely different beacon. Elements are added and deleted. In particular, in Extended Capabilities, the length is changed from 4 to 8 and octet 4, which should have the UTC TSF Offset bit set, is zero, and the Time Advertisement element is missing. When I've captured a Probe Response I don't see any of these fields either.

Here is a a condensed beacon from Wireshark. I bracketed the Extended Capabilities bytes.

No.     Time           Source Destination           Protocol Length Info
      1 0.000000000    Raspberr_a5:66:ff     Broadcast 802.11   227    Beacon frame, SN=527, FN=0, Flags=........C, BI=100, SSID=Stretch

Frame 1: 227 bytes on wire (1816 bits), 227 bytes captured (1816 bits) on interface 0
    (snip)
IEEE 802.11 Beacon frame, Flags: ........C
    Type/Subtype: Beacon frame (0x0008)
    (snip)
    [FCS Status: Good]
IEEE 802.11 wireless LAN
    Fixed parameters (12 bytes)
        Timestamp: 0x0000000000e29275
        Beacon Interval: 0.102400 [Seconds]
        Capabilities Information: 0x1511
    Tagged parameters (163 bytes)
        Tag: SSID parameter set: Stretch
        Tag: Supported Rates 1(B), 2(B), 5.5(B), 11(B), 18, 24, 36, 54, [Mbit/sec]
        Tag: DS Parameter set: Current Channel: 7
        Tag: Traffic Indication Map (TIM): DTIM 1 of 0 bitmap
        Tag: Country Information: Country Code US, Environment Any
        Tag: Power Constraint: 0
        Tag: TPC Report Transmit Power: 18, Link Margin: 0
        Tag: ERP Information
        Tag: Extended Supported Rates 6, 9, 12, 48, [Mbit/sec]
        Tag: RSN Information
        Tag: HT Capabilities (802.11n D1.10)
        Tag: HT Information (802.11n D1.10)
        Tag: Overlapping BSS Scan Parameters
        Tag: Extended Capabilities (8 octets)
            Tag Number: Extended Capabilities (127)
            Tag length: 8
            Extended Capabilities: 0x05 (octet 1)
            Extended Capabilities: 0x00 (octet 2)
            Extended Capabilities: 0x08 (octet 3)
            Extended Capabilities: 0x00 (octet 4)
                .... ...0 = Channel Usage: Not supported
                .... ..0. = SSID List: Not supported
                .... .0.. = DMS: Not supported
                .... 0... = UTC TSF Offset: Not supported [SHOULD BE 1]
                ...0 .... = TPU Buffer STA Support: Not supported
                ..0. .... = TDLS Peer PSM Support: Not supported
                .0.. .... = TDLS channel switching: Not supported
                0... .... = Interworking: Not supported
            Extended Capabilities: 0x00 (octet 5)
            Extended Capabilities: 0x00 (octet 6)
            Extended Capabilities: 0x00 (octet 7)
            Extended Capabilities: 0x40 (octet 8)
        Tag: Vendor Specific: Broadcom
            Tag Number: Vendor Specific (221)
            Tag length: 9
            OUI: 00:10:18 (Broadcom)
            Vendor Specific OUI Type: 2
            Vendor Specific Data: 0200001c0000
0000   00 00 18 00 2e 40 00 a0 20 08 00 00 10 02 8a 09   .....@. .......
0010   a0 00 e5 00 00 00 e5 00 80 00 00 00 ff ff ff ff  ...............
0020   ff ff b8 27 eb a5 66 ff b8 27 eb a5 66 ff f0 20 ..¸'....¸'.....
0030   75 92 e2 00 00 00 00 00 64 00 11 15 00 07 53 74 u.......d.....St
0040   72 65 74 63 68 01 08 82 84 8b 96 24 30 48 6c 03 retch......$0Hl.
0050   01 07 05 04 01 02 00 00 07 06 55 53 20 01 0b 1e ..........US ...
0060   20 01 00 23 02 12 00 2a 01 00 32 04 0c 12 18 60 ..#...*..2....`
0070   30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 0...............
0080   00 0f ac 02 00 00 2d 1a 21 00 17 ff 00 00 00 00 ......-.!.......
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00a0   00 00 3d 16 07 08 00 00 00 00 00 00 00 00 00 00 ..=.............
00b0   00 00 00 00 00 00 00 00 00 00 4a 0e 14 00 0a 00 ..........J.....
00c0   2c 01 c8 00 14 00 05 00 19 00[7f 08 05 00 08 00 ,...............
00d0   00 00 00 40]dd 09 00 10 18 02 00 00 1c 00 00 a5 ...@............
00e0   b5 a1 dd

I've confirmed that when i change hostapd.conf (changing the SSID, for example) the new SSID shows up in Wireshark, and I'm using Channel 7 which is pretty quiet (except when I run hostapd).

What in the world is going on? Is something else rewriting the beacons? I can understand if the timestamps are changed, but the tail?

This is on a Raspberry Pi 3B. I installed the latest Raspbian Buster, tried it with the hostapd 2.8 it comes with, and then recompiled from the 2.8-devel hostapd git source. The connection to the Pi is wired, so the wlan0 is only used by hostapd.

I'm also puzzled that wpa_printf debug shuts off after initialization. It makes sense that it would be excessively verbose while running, but how can I capture debug when it's actually sending out a beacon?

Thanks for any help,

    Mary Ann



_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux