wifi-scan icon indicating copy to clipboard operation
wifi-scan copied to clipboard

How to get to the encryption mode

Open blithe2015 opened this issue 4 years ago • 5 comments

blithe2015 avatar Oct 21 '20 08:10 blithe2015

This is not supported by this library

bmegli avatar Oct 21 '20 16:10 bmegli

Well, what other libraries can do this?

blithe2015 avatar Oct 22 '20 06:10 blithe2015

I have no knowledge about such libraries.

From system tools wpa_supplicant should have capability to retrieve this information.

Example session using wpa_cli

sudo wpa_cli -iwlp1s0
wpa_cli v2.6
Copyright (c) 2004-2016, Jouni Malinen <[email protected]> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

> scan
OK
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
> scan_results
bssid / frequency / signal level / flags / ssid
xx:xx:xx:xx:xx:xx	2412	-61	[WPA2-PSK-CCMP][ESS]	Test1
xx:xx:xx:xx:xx:xx	2412	-62	[WPA2-PSK-CCMP][ESS]	WiFi-Test
<3>CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-75 noise=9999 txrate=180000
<3>CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-68 noise=9999 txrate=180000

You could examine its code. It would be rather tedious task.

iwd should be also capable of doing this.

bmegli avatar Oct 22 '20 07:10 bmegli

Hello. I would also be very interested in this capability. I want to make an interactive network scanner and seeing if a network is encrypted or not would be very useful. Is there any reason why you didn't add this?

raduprv avatar Jul 09 '23 23:07 raduprv

Is there any reason why you didn't add this?

I have no use for it.


You may investigate NL80211_BSS_CAPABILITY (currently not dumped by the library).

It may be a bit more complex than your first guess.

This stack-overflow post should give you some idea.

bmegli avatar Jul 13 '23 07:07 bmegli