how to send frames in ad-hoc mode?
jkmaline at cc.hut.fi
Fri Dec 31 17:37:44 EST 2004
On Mon, Dec 20, 2004 at 04:37:27PM +0100, Leonardo Maccari wrote:
> I'm trying to make WPA work in ad-hoc mode, hacking the code, but I'm
> going reeeally slow.. and need some help.
I would assume you mean IEEE 802.11i for IBSS, not the minimal,
unsupported WPA-None mode mentioned in WPA spec.
> does this work in ad-hoc mode?
> if (wpa_driver_wext_set_bssid(drv->wext, params->bssid) < 0)
> ret = -1;
No, standard ad-hoc/IBSS does not allow BSSID to be set. A random BSSID
will be generated by the station creating the IBSS network. Anyway, I do
not understand why this command would be needed in the first place for
ad hoc networks..
> if I understood well, the hostap_send_eapol function of hostapd (which
> works in master mode) formats the whole packet, with headers, then passes
> it to the card. wpa_eapol_send in wpa_supplicant otherwise, just formats
> a normal ethernet frame, then passes it to the socket, which means that
> the firmware iself adds 802.11 headers, according to configurations done.
> but if I put the card in ad-hoc (pseudo_ibss) mode the
> wpa_driver_wext_set_bssid() function doesn't seem to work, and the packet
> is sent withouth bssid. which function should I use to set it?
There is indeed difference between hostapd (for Host AP driver) and
wpa_supplicant in how the packets are sent. However, other driver
interfaces (e.g., madwifi) for hostapd are also sending EAPOL packets
with just an ethernet header.
pseudo_ibss mode is not a standard mode and I would prefer to see
development done using the standard mode. Anyway, the implementation
should mostly ignore BSSID in case of ad hoc networks, so this should
not be much of an issue. If I remember correctly, pseudo IBSS mode is
using all zeroes address for BSSID anyway.
The combined supplicant/authenticator for IBSS should probably use just
Ethernet frames for EAPOL packets in the same way as wpa_supplicant is
doing it now. It will need some support from the driver in order to be
able to get WPA IE from either Beacon frames or preferably Probe
Jouni Malinen PGP id EFC895FA
More information about the HostAP