Adding a vendor Information Element to beacon / probe response frames

Etan Kissling kissling at oberon.ch
Tue Sep 6 08:04:13 PDT 2016


Thanks again and sorry for taking so long to respond :-) Your comment helped pushing one step further – seems like brcmfmac doesn't like short IEs.

Checking dmesg reveals:
[  162.001873] brcmfmac: brcmf_parse_vndr_ies: invalid vndr ie. length is too small 4

Seems like there is an issue when the IE has the minimal length.
With length larger than 4, this goes away. The IE still doesn't show up, though.

http://lxr.free-electrons.com/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c#L4165

I don't see the additional message that you referenced in my log.

At least another line should be printed, though:
http://lxr.free-electrons.com/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c#L4247
But I also don't see that one.

Seems like I don't quite get yet how to enable debugging.

What I tried so far is 
$ sudo reboot
$ sudo ifdown wlan0
$ sudo modprobe -r brcmfmac
$ sudo modprobe brcmfmac debug=6      //< doesn't matter 0xFFFFFF or 6 or whatever, everyone uses different levels.
$ sudo dmesg -n 7
$ sudo hostapd -dd /etc/hostapd/hostapd.conf
$ dmesg

I'm new to the kernel world, and finding info on enabling brcmfmac debugging is difficult.
Maybe I used the wrong search terms – would appreciate it if one could assist with this.
Do I need to set the flag in source and recompile?

Thanks

Etan



> On 18 Jun 2016, at 07:22, Arend van Spriel <arend.vanspriel at broadcom.com> wrote:
> 
> 
> 
> On 17-06-16 22:53, Etan Kissling wrote:
>> Thanks for the response.
>> 
>> Good to hear that there are no known issues about this topic from the hostap front.
>> 
>> The Raspberry 3 chip is Broadcom BCM43438.
>> The chip I've used with Raspberry 1 in the dongle is Broadcom BCM43143.
>> 
>> I'll check the driver. Can't imagine that the hardware doesn't support it,
>> as appending static data to a packet shouldn't be a difficult to implement feature.
> 
> Difficulty is hardly ever a reason for not implementing a feature. The
> firmware for these broadcom chips is running a 802.11 stack and as such
> it determines most part of the beacon, proberesp, etc.
> 
> That being said there is a firmware api to add vendor IEs. You can check
> the function brcmf_vif_set_mgmt_ie() which you find in cfg80211.c of the
> brcmfmac driver. Loading the driver with debug=6 should make the
> following debug print show up:
> 
> 	brcmf_dbg(TRACE, "ADDED ID : %d, Len: %d, OUI:%02x:%02x:%02x\n",
> 		  vndrie_info->vndrie.id,
> 		  vndrie_info->vndrie.len,
> 		  vndrie_info->vndrie.oui[0],
> 		  vndrie_info->vndrie.oui[1],
> 		  vndrie_info->vndrie.oui[2]);
> 
> There are also a couple of error prints, but those would show up anyway.
> Hope this helps.
> 
> Regards,
> Arend
>> Etan
>> 
>>> On 17 Jun 2016, at 22:40, Jouni Malinen <j at w1.fi> wrote:
>>> 
>>> On Wed, Jun 15, 2016 at 02:13:14PM +0000, Etan Kissling wrote:
>>>> I've retried with the latest hostapd release, but same result: The vendor IE is not being broadcast, although it is specified in hostapd.conf.
>>> 
>>>> These were my complete steps, from a clean Raspbian Jessie Lite 2016-05-27 installation on a Raspberry Pi 3 Model B.
>>> 
>>> It sounds like the driver used on that device does not support this.
>>> hostapd is requesting it to be added, as shown here:
>>> 
>>>> +  vendor_elements=DD0401020300
>>> 
>>>> nl80211: Set beacon (beacon_set=0)
>>>> nl80211: Beacon tail - hexdump(len=15): 2a 01 04 32 04 30 48 60 6c dd 04 01 02 03 00
>>> 
>>> The extra element is there at the end of the Beacon tail..
>>> 
>>>> nl80211: beacon_ies - hexdump(len=6): dd 04 01 02 03 00
>>>> nl80211: proberesp_ies - hexdump(len=6): dd 04 01 02 03 00
>>> 
>>> And also in the specific IE lists for Beacon and Probe Response frames..
>>> 
>>> In other words, this question should be directed to whoever supports the
>>> specific Wi-Fi hardware/driver.
>>> 
>>> -- 
>>> Jouni Malinen                                            PGP id EFC895FA
>> 
>> 
>> _______________________________________________
>> Hostap mailing list
>> Hostap at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/hostap



More information about the Hostap mailing list