Multi-Wifi-Interface scan and connect "Wifi-Scanner-2"
This is my main wifi ap connection tool. It is now faster than previously. There are also un-stated options; for example closing the gui using the 'x' in the top right corner causes immediate rescan and gui display reopen. Using 'close' ends all scanning. Using 'ok' with a selected ap causes connection, without selected ap causes immediate rescan. Leaving alone cause timed close and rescan.
I had not been able to connect to an android wpa-psk secure hotspot until today!
I spent hours searching for the reason. Finally using wpa_supplicant without the -B but option revealed a list of errors which I researched online. Finally I found that the command without the -D driver specification is the only one that works... eureka!
is all that is required having first generated the .conf using
So I see just how frustrating using my Wifi-Scanner-2 must have been for anything other than open networks and those with 2nd stage security protocols such as eduroam.
one problem solved!
EDIT: Actually the reason seems more to do with the broadcom chipset or driver! As using all plugin cards work fine with wext.
I spent hours searching for the reason. Finally using wpa_supplicant without the -B but option revealed a list of errors which I researched online. Finally I found that the command without the -D driver specification is the only one that works... eureka!
Code: Select all
wpa_supplicant -B -i $int -c /tmp/netsel.conf
is all that is required having first generated the .conf using
Code: Select all
wpa_passphrase "$ssid" "$password" > /tmp/netsel.conf
one problem solved!
EDIT: Actually the reason seems more to do with the broadcom chipset or driver! As using all plugin cards work fine with wext.
Last edited by stemsee on Tue 14 Nov 2017, 20:14, edited 1 time in total.
Update provides: psk correctly implemented.
used interface eliminated from continued scan option.
while loops have sleep to stop uncontrolled cpu use.
a pop-up gui input box which lets the user specify driver + options for wpa_supplicant connection.
It is an extended password and id box which greys out unused selections.
It is much faster now too. The fastest wifi and wired connection utility on the planet!!!
Still to do: remove sed commands. add wps. add auto connect. add use saved profiles.
used interface eliminated from continued scan option.
while loops have sleep to stop uncontrolled cpu use.
a pop-up gui input box which lets the user specify driver + options for wpa_supplicant connection.
It is an extended password and id box which greys out unused selections.
It is much faster now too. The fastest wifi and wired connection utility on the planet!!!
Still to do: remove sed commands. add wps. add auto connect. add use saved profiles.
- Attachments
-
- Wifi-Scanner-2.fake.gz
- (24.73 KiB) Downloaded 127 times
-
- xscreenshot-20171114T193453.png
- (26.08 KiB) Downloaded 336 times
-
- xscreenshot-20171114T193733.png
- (24.85 KiB) Downloaded 338 times
Last edited by stemsee on Mon 20 Nov 2017, 22:20, edited 1 time in total.
I have tidied up the formatting within the script - no more long lines!
wpa_cli option in menu with interface selection available. So wps is available for those who know how to
see further on for script
wpa_cli option in menu with interface selection available. So wps is available for those who know how to
Code: Select all
wpa_pin/wpa_pbs
Last edited by stemsee on Mon 20 Nov 2017, 21:43, edited 1 time in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Code: Select all
#make sure associate interface variables
int1=${int1}
int2=${int2}
int3=${int3}
int4=${int4}
int5=${int5}
int6=${int6}
int7=${int7}
int8=${int8}
@MochiMoppel
The purpose was at one point to make sure that after $int was used in a connection the other wireless interfaces '$inters' selected for scanning would fully occupy the variables with '$int' removed from scanning interfaces, as it should be connected. For me it was a temporary measure that I forgot about even though it no longer made any difference. Now removed.
Sed statements have also been reduced.
now I cannot yet get the saved profilesfn selected profile to connect.
The purpose was at one point to make sure that after $int was used in a connection the other wireless interfaces '$inters' selected for scanning would fully occupy the variables with '$int' removed from scanning interfaces, as it should be connected. For me it was a temporary measure that I forgot about even though it no longer made any difference. Now removed.
Sed statements have also been reduced.
now I cannot yet get the saved profilesfn selected profile to connect.
Last edited by stemsee on Wed 22 Nov 2017, 14:42, edited 1 time in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Not much. All these piped seds cost you performance.stemsee wrote:Sed statements have also been reduced.
Instead of 12 seds per scan ...
Code: Select all
[[ ! -z "${int1}" ]] && ecann1=`iwlist ${int1} scan | grep -e 'ESSID' \
-e 'Quality' -e 'Address' -e 'key' | sed -e 's/ \+/ /g' | sed 's/Quality=/ /g' | sed 's/level=/ /g' | sed 's/ESSID://g' | \
sed 's/key:on/~on~/g' | sed 's/key:off/~off~/g' | sed 's/Encryption//g' | sed 's/ Signal//g' | \
sed 's/- Address: / /g' | sed 's|Cell ...|\n|g' | sed 's/ - //g' | sed "s/^[ \t]*//" | tac
.
.
.
[[ ! -z "${int2}" ]] && ecann2=`iwlist ${int2} scan | grep -e 'ESSID' \
-e 'Quality' -e 'Address' -e 'key' | sed -e's/ */ /g' | sed 's/Quality=/ /g' | sed 's/level=/ /g' | sed 's/ESSID://g' | \
sed 's/key:on/~on~/g' | sed 's/key:off/~off~/g' | sed 's/Encryption//g' | sed 's/ Signal//g' | \
sed 's/- Address: / /g' | sed 's|Cell ...|\n|g' | sed 's/ - //g' | sed "s/^[ \t]*//" | tac
Code: Select all
PATTERN='
s/^.*Address: ([0-9A-Z:]*)/\n\1/p
s/^.*Quality=([^ ]*).*Signal level=(.*)/\1 \2/p
s/^.*key:([onf]*)/~\1~/p
s/^.*ESSID://p'
[[ $int1 ]] && ecann1=`iwlist ${int1} scan | sed -rn "$PATTERN" | tac
.
.
.
[[ $int2 ]] && ecann2=`iwlist ${int2} scan | sed -rn "$PATTERN" | tac
With your previous sample data the result looks like this:
Code: Select all
"BTWifi-X"
~on~
35/70 -75 dBm
52:8A:AE:8C:5E:7E
"BTWifi-with-FON"
~off~
31/70 -79 dBm
32:8A:AE:8C:5E:7E
Added gpl 3.0 license notice and an about option in menu.
Disconnect interface function added to the menu.
Saved Profiles now connect.
Disconnect interface function added to the menu.
Saved Profiles now connect.
- Attachments
-
- Wifi-Scanner-2.fake.gz
- (20.74 KiB) Downloaded 152 times
Added basic HotSpot to menu. Depends on Create_ap-master, dnsmasq, masquerade, nat, hostapd.
Added ssid editor section in password dialogue in case of hidden ssid.
Added ssid editor section in password dialogue in case of hidden ssid.
- Attachments
-
- Wifi-Scanner-2.fake.gz
- (25.37 KiB) Downloaded 156 times
HA! I realised that --config /etc/create_ap.conf is the only option needed.
So HotSpot has more options.
Main gui and yad notifications, now have --no-focus set.
So HotSpot has more options.
Main gui and yad notifications, now have --no-focus set.
- Attachments
-
- xscreenshot-20171206T122853.png
- (50.97 KiB) Downloaded 218 times
-
- Wifi-Scanner-2.fake.gz
- (28.97 KiB) Downloaded 154 times
Added check box for saving AP.
Added option to connect with saved profile if available at entering password gui.
Added option to connect with saved profile if available at entering password gui.
- Attachments
-
- xscreenshot-20180108T224236.png
- (23.42 KiB) Downloaded 171 times
-
- xscreenshot-20180108T224304.png
- (23.77 KiB) Downloaded 163 times
-
- xscreenshot-20180108T224442.png
- (23.76 KiB) Downloaded 162 times
Ok here is the latest iteration. The hotspot function is not the full featured one, just the simpler one.
Work in progress.
Work in progress.
- Attachments
-
- Wifi-Scanner-2.fake.gz
- (27.21 KiB) Downloaded 151 times