Dan,<br>
Thank you for your reply. <br>
<br>
I also found out that reading RID FD40 (PortStatus) from the prism card provides current link status. :<br>
1 = Disabled<br>
2 = Search for initial connection<br>
4 = Connected to access point<br>
5 = Out of range<br>
<br>
I wonder why this information is not being provided by the hostap
driver in the 'status' field of /proc/net/wireless. That would
allow wireless tools to retrieve and display this information.<br>
<br>
Madwifi driver (on my laptop) does update the status field with its values of current link status. <br>
<br>
- Sriram<br>
<br><br><div><span class="gmail_quote">On 6/14/06, <b class="gmail_sendername">Dan Williams</b> <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2006-06-14 at 15:00 -0500, Sriram Chadalavada wrote:<br>> Hi everyone,<br>> We are trying to create a GUI application that reports status of<br>> a prism wireless card (station/client/managed mode) on our embedded
<br>> device that runs 2.4.26 kernel and hostap V2.6. We are using the older<br>> versions due to legacy issues.<br>><br>> How can we obtain the following information from the hostap driver<br>> (ioctl calls??) :-
<br>> 1. If the card has been taken out of range of an access point i.e.<br>> current linkstatus.<br><br>Use the wireless extensions SIOCGIWAP call, and check for a valid BSSID<br>address using standard ethernet address validation functions.
i.e., if<br>the BSSID returned there is not all 4s, all 1s, or all 0s, then you are<br>associated and connected to the AP.<br><br>> 2. If the card can 'see' an access point but cannot connect to it (due<br>> to authentication mismatch or wrong WEP key, for example)
<br><br>You can't do this. You can tell whether or not the AP requires<br>encryption, and you can tell whether it's WPA or WEP, but you _cannot_<br>tell without trying to connect, whether your key is correct. That's<br>
just the way wireless is, that's the same on Linux, Windows, and Mac OS<br>X.<br><br>You also cannot ever tell if your WEP key is wrong unless the card fails<br>to complete association with the AP. If you enable Shared Key mode on
<br>the AP, you can't authenticate unless your WEP key is correct. But<br>Shared Key mode is quite an insecure joke and should never be used.<br>With the alternative, Open System authentication, you never know whether<br>
your WEP key is wrong, period. So you're out of luck here.<br><br>With WPA, it's a lot easier, but you still have to start authentication<br>to figure out if the key is wrong of course. The driver should notify<br>your application by sending a wireless rtnetlink event of SIOGSIWAP. If
<br>the BSSID passed in that message is valid, association has completed<br>successfully. If the BSSID passed is invalid, association has failed<br>for some reason, or the connection to the access point has been lost.<br>
<br>> I understand that linkstatus information is communicated by the card<br>> firmware as an Unsolicited MAC Mgmt frame. So, the driver itself is<br>> aware when the card goes out of range. My question is how can I obtain
<br>> this information at the application level? The 'status' field in<br>> the /proc/net/wireless file does not seem to indicate this<br>> information.<br><br>Use wireless extensions instead. Search for 'wireless-tools'.
<br><br>Dan<br><br><br></blockquote></div><br>