Dan,<br>
&nbsp;&nbsp; Thank you for your reply.&nbsp; <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.&nbsp; 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> &lt;<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>&gt; 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>&gt; Hi everyone,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We are trying to create a GUI application that reports status of<br>&gt; a prism wireless card (station/client/managed mode)&nbsp;&nbsp;on our embedded
<br>&gt; device that runs 2.4.26 kernel and hostap V2.6. We are using the older<br>&gt; versions due to legacy issues.<br>&gt;<br>&gt; How can we obtain the following information from the hostap driver<br>&gt; (ioctl calls??) :-
<br>&gt; 1. If the card has been taken out of range of an access point i.e.<br>&gt; current linkstatus.<br><br>Use the wireless extensions SIOCGIWAP call, and check for a valid BSSID<br>address using standard ethernet address validation functions.&nbsp;&nbsp;
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>&gt; 2. If the card can 'see' an access point but cannot connect to it (due<br>&gt; to authentication mismatch or wrong WEP key, for example)
<br><br>You can't do this.&nbsp;&nbsp;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.&nbsp;&nbsp;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.&nbsp;&nbsp;If you enable Shared Key mode on
<br>the AP, you can't authenticate unless your WEP key is correct.&nbsp;&nbsp;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.&nbsp;&nbsp;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.&nbsp;&nbsp;The driver should notify<br>your application by sending a wireless rtnetlink event of SIOGSIWAP.&nbsp;&nbsp;If
<br>the BSSID passed in that message is valid, association has completed<br>successfully.&nbsp;&nbsp;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>&gt; I understand that linkstatus information is communicated by the card<br>&gt; firmware as an Unsolicited MAC Mgmt frame. So, the driver itself is<br>&gt; aware when the card goes out of range. My question is how can I obtain
<br>&gt; this information at the application level? The 'status' field in<br>&gt; the /proc/net/wireless file does not seem to indicate this<br>&gt; information.<br><br>Use wireless extensions instead.&nbsp;&nbsp;Search for 'wireless-tools'.
<br><br>Dan<br><br><br></blockquote></div><br>