Page 2 of 2

Posted: Tue 05 Sep 2017, 19:07
by stemsee
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.

Posted: Fri 20 Oct 2017, 23:02
by stemsee
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!

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
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.

Posted: Thu 26 Oct 2017, 13:47
by stemsee
see update

Posted: Tue 14 Nov 2017, 20:16
by stemsee
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.

Posted: Wed 15 Nov 2017, 16:27
by stemsee
Added autoconnect/no-auto feature which starts wifi connection with a default profile. The script is /etc/xdg/Startup/autocon.

Also corrected udhcpc hook default.script location to /usr/share/udhcpc/default.script in fatdog anyhow. Dhcpcd is still available if 'busybox which udhcpc' returns empty.

Posted: Thu 16 Nov 2017, 15:10
by stemsee
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

Code: Select all

wpa_pin/wpa_pbs
see further on for script

Posted: Sat 18 Nov 2017, 12:50
by MochiMoppel

Code: Select all

	#make sure associate interface variables
	int1=${int1}
	int2=${int2} 
	int3=${int3} 
	int4=${int4} 
	int5=${int5} 
	int6=${int6} 
	int7=${int7}
	int8=${int8}
What is the purpose of this exercise?

Posted: Mon 20 Nov 2017, 14:06
by stemsee
@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.

Posted: Tue 21 Nov 2017, 11:58
by MochiMoppel
stemsee wrote:Sed statements have also been reduced.
Not much. All these piped seds cost you performance.

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
you need only 1 sed statement. If you put the pattern into a variable you also don't need to repeat the pattern for each scan:

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 
Also note that [[ ! -z "${int1}" ]] is the same as [[ -n "${int1}" ]] and [[ "${int1}" ]] and [[ "$int1" ]] and [[ $int1 ]] ..take your pick.


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 

Posted: Tue 21 Nov 2017, 14:12
by stemsee
Thank you! :D

Posted: Wed 22 Nov 2017, 14:56
by stemsee
Added gpl 3.0 license notice and an about option in menu.
Disconnect interface function added to the menu.
Saved Profiles now connect.

Posted: Thu 23 Nov 2017, 08:46
by stemsee
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.

Posted: Wed 06 Dec 2017, 12:47
by stemsee
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.

Posted: Mon 08 Jan 2018, 22:51
by stemsee
Added check box for saving AP.
Added option to connect with saved profile if available at entering password gui.

Posted: Tue 09 Jan 2018, 10:17
by step
Where's the updated script?

Posted: Wed 10 Jan 2018, 10:04
by stemsee
Ok here is the latest iteration. The hotspot function is not the full featured one, just the simpler one.

Work in progress.