Beemer 2012-07-04 20:07:45
I’m trying to query OID_802_11_BSSID in order to know if the PDA is
connected to an AP and the BSSID (or mac address) of the AP.
In MSDN :
explains that this OID must return NDIS_STATUS_ADAPTER_NOT_READY if the NIC
is not associated with an access point but I always get 0, no matter if the
NIC is associated or not.
Furthermore, the buffer must return the mac address of the AP, in this
Typedef UCHAR NDIS_802_11_MAC_ADDRESS;
But what I get is different, when connected to an AP dwBytesReturned tells
that have returned 14Bytes, not 6, and the correct MAC Address is on the
last 6 bytes, from QueryBuffer to QueryBuffer. The first Eight bytes
returned are 01.01.01.0d.xx.xx.01.00 being the ‘x’ 20.6c or 88.88 or
When not connected to an AP and there is not availables APs, dwBytesReturned
is always 0. but when the PDA is trying to connect to an AP, even if it
cannot associate, I get 14 bytes and the same format of QueryBuffer with the
BSSID that the NIC is trying to connect to.
I can`t use it to find if connected. And I don’t know if this extrange
behaviour is a problem of my PDA (X50V), or will be general, and if my code
will work only on X50 PDAs or in All WM2003 PDAs even if I imagine any other
way of diferenciate when the NIC is connected or trying to connect.
Beemer 2012-07-04 20:07:47
I was doing bad the reading of the buffer Oppps.
Now I read NDISUIO_QUERY_OID->data and works Ok.
And also have found the problem with the code returned, is only 0 when
connected or trying to connect to an AP. Otherwise is not 0
Thanks and sorry.