Wifi-TrayNet and Wifi-Scanner

Message
Author
stemsee

#76 Post by stemsee »

So I see the problem, as i said I could not test on wpa. The script searches for 'IEEE' first then greps for WPA WPA2 WEP 802.1X EAP, but IEEE does not exist for WPA version 1, I see, so it goes through the case via *) .

So basically need more code and might as well get group cipher, pairwise cipher and authentication suites ... at the same time. I have a list of network blocks (32) covering most possible combinations of suites and ciphers, ssid and psk, ascii, numeric passwords. I want to add on an 'expert' panel to the gui allowing drag'n'drop of the network blocks with editing to cover a lot of the possibilities, at least 32 of them anyway! Really this is partly catered for in the gui by having the option to edit config with geany, * etc ... but having drag'n'drop network blocks with variables auto-filled should be a good and easy thing to implement. Especially if they are selected as svg icons .... :wink:

WPA network block for WPA should be generated after pasword gui closes with something like

Code: Select all

	ssid=`echo $details | cut -f3 -d'|' | cut -f2 -d'"'`
	sect=`wpa_passphrase "$ssid" "$password" | grep -v '#' | grep -v -e '}' -e 'network={'`

Code: Select all

network={
$sect
	 proto=WPA
	key_mgmt=WPA-PSK
	pairwise=CCMP TKIP
	group=CCMP TKIP WEP104 WEP40
}

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#77 Post by fredx181 »

Hi stemsee, you have much more knowledge about these matters than I have, but...
Wouldn't it be better to keep things simple, since the 3.4.version works ok (well, at least for wpa), by making it like that with clearly mentioning that the ID field should be empty for wpa ?
Just my 2c

Fred

stemsee

#78 Post by stemsee »

I run on minimum knowledge ... I like options.

Actually I wanted to get the id field greyed out, it is better that way, and helps make the app idiot proof!! But I am not ready to give up yet. So I have added a second case filter, which should catch WPA. So if you are willing to check this next update on your WPA networks, that would be great. If they don't work I will revert to 3.4, if they do work I will progress, but only add network block templates that open when config editor is opened .. for manual copy and paste and edit.

cheers
stemsee
Last edited by stemsee on Wed 04 Jul 2018, 08:50, edited 1 time in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#79 Post by fredx181 »

Hi Stemsee, yes, works now, created profile and connected :)
Profile "UPC44685":

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1

network={
		ssid="UPC44685"
	psk=2d11be1fba88e6509bbe0cffbbed025796b776b3bde9ffd455a9c57e2b079bbd
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=CCMP TKIP
	group=CCMP TKIP WEP104 WEP40
}
Also created profile from the other (wpa) network "Sterrenburg" (just to see if that works):

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1

network={
		ssid="Sterrenburg"
	psk=80cd386b994d7c676dbb1e7f0a1d2feff0f8a835a581aab074c82aa0f3226f85
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=CCMP TKIP
	group=CCMP TKIP WEP104 WEP40
}
And when I did that, wifi was disconnected of course (filled in wrong password), but a strange thing happened when I again clicked on "UPC44685" (and re-created profile, I think) it did connect fine (to UPC44685), but showing "Sterrenburg" from the tooltip, see screenshot.

EDIT: Can you add also "iw" as dependency in the package?, then it would work also in Stretch.
(Bionic Dog has it already installed by default, but if it was not, the script would fail)

Fred
Attachments
2018-06-28-121820_408x323_scrot.png
Connected to "UPC44685" but showing conected to "Sterrenburg"
(184.02 KiB) Downloaded 402 times

stemsee

#80 Post by stemsee »

Great! Thanks Fred ... your merciless testing and feedback paid-off :twisted: :lol:

The reason your previous connected AP ssid showed was that profile was used to connect after gui closed and variables were not output to */apid which testcon2fn reads. So it read apid from previous connection because it still existed. (fixed)

iw added to deps in control file

Added network blocks list for advanced use when editing/customising saved profiles.

Now that select interface is only available on multi-card setups, I thought it more useful to move profiles to mainmenu and select interface to extrasmenu.

The code is now universal ... same experience on BionicDog, FD, BionicPup, Lighthouse etc!

There is an additional line of code that if dhcpcd5 is installed and dhcpcd is not then it is linked.

Completed!

cheers
stemsee

EDIT: previously the id field in the gui was used to input special commands, but now that is moved over to ssid field: unbreak breakall removedef
breakall simply exports brk=break, this variable is nested in various loops. removedef removes autosconnect features, including default profile and restores peasywifi_auto in ~/Startup
Attachments
2018-06-22-000540_668x351_scrot.png
(52.84 KiB) Downloaded 377 times
2018-06-28-150132_504x910_scrot.png
(80.4 KiB) Downloaded 389 times
2018-06-28-151449_360x623_scrot.png
(63.71 KiB) Downloaded 385 times
2018-06-28-151502_302x333_scrot.png
(35.75 KiB) Downloaded 378 times
Last edited by stemsee on Wed 04 Jul 2018, 08:51, edited 1 time in total.

stemsee

#81 Post by stemsee »

i found a problem in scan'n'join openap function. Easy to fix. And while I was at it added an improvement, using the svg icons.
Attachments
2018-06-29-125738_488x309_scrot.png
(46.14 KiB) Downloaded 349 times
2018-06-29-125830_639x468_scrot.png
(91.34 KiB) Downloaded 357 times
2018-06-29-125759_488x309_scrot.png
(46.08 KiB) Downloaded 351 times
Last edited by stemsee on Wed 04 Jul 2018, 08:51, edited 1 time in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#82 Post by fredx181 »

Hi Stemsee, I keep chasing you, if you don't mind :lol:

Now, on 3.9, I connected to wlan0 fine, then disconnected eth0, how can I reconnect to eth0 again ?, couldn't find.
Also, why is there eth0 in the dropdown box at the profile dialog, no way eth0 can be for wireless, I think ?

Fred

stemsee

#83 Post by stemsee »

Hi Fred

As long as you got the energy and time to chase me up ... please continue to do so :lol: It's improving my efforts!

So, my wifi apps usually show all interfaces because of reports I have read in which some usb wifi cards appear as eth0, and usb0 ... I can not test the new code on much hardware, so that is why I tend to give access to all interfaces...

To re-connect to eth0 having joined and disconnected, simply click on ethernet 1 connect in mainmenu ... i on't have ethernet connection at home so not so easy to test ... but the university is near by so should go there and plug it in ( lazy because we have a heatwave ). These days I test hardware like this

Code: Select all

ls /sys/class/net/wlan0 | grep wireless
but I do not know how reliable that is for identifying wifi versus wired networks interfaces (I should do more research) ...

Also 'initiate connection, you can select eht0, but also select driver>wired ... and possibly static settings ... empty other fields. Wpasupplicant handles wired interfaes too ... I coded that in, but not tested thoroughly yet.

So, that is why I don't generally filter out wired interfaces because , actually, we can not be sure! Wicd on FD has its interfaces mixed up in the wired and wireless sections, peasywifi has hardcoded eth0 and eth1 even if they don't physically exist! Such is the nature of linux hardware and software .... my method allows for all those possibilities and makes fewer assumptions, I hope! That is why I wrote it!!! And I also have 5 wireless interfaces I want to control from one interface easily and successfully....eventually I want to surpass the common network tools for features, intuitive operation, and flexibility.

cheers
stemsee

stemsee

#84 Post by stemsee »

Closed-AP Open-AP scan'n'join improved.

Changed the logic in testing connection. Connection will be tested every 15 seconds, to update tray icon. Testing stops for scanning and connection then resumes so that if lost or reduced user will have visual feedback in the form of the tray icon.

stemsee

stemsee

#85 Post by stemsee »

Messed up the last package, by not testing on a pristine installation.

Ok, Wifi-Scanner improvements include, now uses static settings of AP if found in $HOME/.wifi-connect/static (created by TrayNet).

Wifi-TrayNet, improvements include, frequent polling on connection status.
AP config building streamlined with a case statement.
improved dhc usage, for fatdog, and puppies, and BD. DHCPCD self regulates to limit to only one instance ever. On fatdog I found just issuing dhcpcd was better for acquiring an ip address than specifying hook scripts.
use of iw 'interface' info to grab hwether hardware mac address.
Now stores all unique APs found as ssid+bssid.svg in new dir $HOME/.wifi-connect/apsvg for archive/history of scannings (would be nice to link to gps/ip location). These are not profiles just ssid AP name, key on or off, power level, and net mac address.
Last edited by stemsee on Thu 05 Jul 2018, 22:31, edited 1 time in total.

stemsee

#86 Post by stemsee »

Now that all the important basic functions are reliably coded, I want to implement a gui that previews the 32 extra network blocks, as a wpa_supplicant.conf file ... Probably use 'yad --paned' top pane to scroll through blocks and bottom pane to preview (svg) with substituted variables, then upon selection of a block either connect directly, or simply create and save a profile for future use, or both!

stemsee

#87 Post by stemsee »

Bumped the version number.
Last edited by stemsee on Tue 17 Jul 2018, 00:01, edited 1 time in total.

stemsee

#88 Post by stemsee »

This is a significant update

1) NetworkBlock manager is now working thanks to misko_2083
One can now build very customised network connection configs easily.

2) Profiles preview is now editable and will save to a new profile, with the suffix' -$$'

3) Airplane mode stopped showing the icon, now fixed and reworked.
Attachments
2018-07-08-145943_809x574_scrot.png
(89.82 KiB) Downloaded 114 times
Last edited by stemsee on Tue 17 Jul 2018, 00:01, edited 1 time in total.

stemsee

#89 Post by stemsee »

Added to Wifi-TrayNet when connecting with usb0 (android phone) or eth0/1 now offers to create auto-connection for that interface - needs testing.

Added alternative command for determining ip address. Also similar ip test for part of interface cleaning.

Fixed 'Connect AP' button popping up when no profile for found APs.
Last edited by stemsee on Mon 31 Dec 2018, 15:18, edited 1 time in total.

stemsee

#90 Post by stemsee »

Wifi-Scanner-Manual

The latest edition - is a simple 100 line Wifi-Connection app that has fewer options exposed to the user, and has a stay open results gui with buttons.

Manual scan button, manual configure and connect button. It's quite nice.
Attachments
Screenshot(1).jpg
(61.85 KiB) Downloaded 209 times
2018-07-20-233222_587x234_scrot.png
(34.21 KiB) Downloaded 224 times

stemsee

#91 Post by stemsee »

This update provides a beta of Wifi-ScannerM. The simplest of the three.
Last edited by stemsee on Mon 31 Dec 2018, 15:14, edited 1 time in total.

stemsee

#92 Post by stemsee »

Wifi-TrayNet-4.8 fixes and improvements.
1) When randommac is called that is applied and quickreconnect is invoked.
2) Autoconnect functions work properly with variables defined before writing the autoconnect script, instead of within (backtic operations left empty spaces).
3) mac address editor in passwordgui.
4) static ip applied more effectively. I found myself connecting to a router which allowed internet to ip addresses above 100, but allowed lan connection to ips above and below 100. I also found that second attempt to connect to such network with new mac address resulted in correct ip assignment and internet connectivity. First connection would be 192.168.0.105 (no internet) static ip new mac (random mac) gave 192.168.1.105 internet connection.
5) Saved profile connection uses saved static settings.
Last edited by stemsee on Mon 31 Dec 2018, 15:14, edited 1 time in total.

stemsee

#93 Post by stemsee »

For the last three days I worked on Wifi-TrayNet function by function. I found some problems and changed things.

Saved profiles function overhauled and much improved. Using yad list and buttons to preview delete edit and customise profiles.

here is the Wifi-TrayNet script only copy yo /usr/sbin/Wifi-TrayNet.
Last edited by stemsee on Mon 31 Dec 2018, 15:15, edited 1 time in total.

stemsee

#94 Post by stemsee »

apsvg
Attachments
xscreenshot-20181020T234613.png
balloons
(153.52 KiB) Downloaded 264 times

stemsee

#95 Post by stemsee »

I could not connect with eduroam on fatdog using wifi-traynet this addresses the issue. But alas there are other issues.
Last edited by stemsee on Wed 26 Dec 2018, 16:00, edited 1 time in total.

Post Reply