[Linux] Obtain the Wireless Access Point Encryption
#1
Hi all,

I've already started a thread related with access points and the Dialog Window to offer them to the user. However, I think this is different enough as to start a new thread. Let me get to the point.

I am currently offering the wireless access points to the user obtained using the SCAN ioctl ( NetworkLinux.cpp). However, the current implementation of the CNetworkInterfaceLinux::GetAccessPoints function is lacking of the Encryption used in the wireless networks. It does search for the WPA/WPA2/WEP, but I can't figure out with this function how to retrieve the information regarding the encryption type (TKIP/AES). I've been looking for this for over two days, but I am afraid my knowledge regarding ioctl's and wireless extensions is pretty limited.

So, is there anybody who knows how to retrieve this info?

Thank you in advance
Reply
#2
tmacreturns Wrote:Hi all,

I've already started a thread related with access points and the Dialog Window to offer them to the user. However, I think this is different enough as to start a new thread. Let me get to the point.

I am currently offering the wireless access points to the user obtained using the SCAN ioctl ( NetworkLinux.cpp). However, the current implementation of the CNetworkInterfaceLinux::GetAccessPoints function is lacking of the Encryption used in the wireless networks. It does search for the WPA/WPA2/WEP, but I can't figure out with this function how to retrieve the information regarding the encryption type (TKIP/AES). I've been looking for this for over two days, but I am afraid my knowledge regarding ioctl's and wireless extensions is pretty limited.

So, is there anybody who knows how to retrieve this info?

Thank you in advance

I'd say the most significant problem with Linux wireless is that the cards don't all the same API.

I'm not entirely sure what your trying to accomplish, but what I'd suggest is looking at Wicd (written in Python). Wicd relies on external wireless utilities to gather up the wireless information and then parses that and returns that to the user interfaces. If you could do this all in Python, you may end up with a much more robust solution. Actually, if you make Wicd a dependency for your code, you'll be able to use wicd's daemon to handle all of the root access stuff, and all you'll have to do is write client (user interface) code. BTW, if you use the wicd daemon, you'll be able to write user interface code with any language because you'll be calling the daemon through dbus. That would certainly work great for me, since I use Wicd exclusively for wireless access.

I've got a repo, since Wicd's "official" maintainers are up in the air.

git://github.com/cbxbiker61/wicd.git
Reply
#3
cbxbiker61, thank you for your reply, but I am more interested on developing in the C++/C code rather than using Python.

Anyway, I´ve based my solution on the code from the wireless tools for Linux, and more precisely in the code of iwlist, which returns the Authentication method and the Encryption Algorithm by parsing the info obtain after calling the right ioctl. On the networks I´ve tried so far it is working just OK, so I´ve added it to my github repository. If anyone is interested, let me know and feel 100% to give advice/suggestions/corrections Smile.

Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] Obtain the Wireless Access Point Encryption0