Wifi-TrayNet and Wifi-Scanner

Message
Author
stemsee

#41 Post by stemsee »

Including geometry recorder = position and resize each window, leave open until geometry recorder, times-out, that's when it grabs window geometry. After all windows have been set, go to extra menu and switch off Geometry.
Last edited by stemsee on Thu 24 May 2018, 11:42, edited 1 time in total.

stemsee

#42 Post by stemsee »

Today I was trying Wifi-TrayNet on a different OS which didn't have inotifywait installed, made me realise probably most distros don't ship with inotify, so I recoded that part of the script which relied on inotifywait, so it is no longer a dependency.

The functionality is much the same.

see first post for download

stemsee

#43 Post by stemsee »

Here is a much improved release of Wifi-TrayNet and Wifi-Scanner, featuring geometry recording.
Attachments
2018-06-01-130911_397x573_scrot.png
(80.47 KiB) Downloaded 282 times
2018-06-01-130804_565x253_scrot.png
(26.48 KiB) Downloaded 273 times
2018-06-01-130815_565x314_scrot.png
(57.48 KiB) Downloaded 271 times
Last edited by stemsee on Wed 04 Jul 2018, 08:54, edited 1 time in total.

stemsee

#44 Post by stemsee »

Different distros have different compilation parameters for similar or same named apps.

On BionicDog the code I used in Wifi-traynet to get the ip does not work, and the script's functionality and flow depends heavily on such tests.

So I re-worked it with tests that seem to work across systems (for the moment)!

Not only that I removed some code, in order to rely wholly on hook scripts!

Not only that, but I added some nifty code for changing interace to scan on on the fly, so to speak, using 'yad --select-action'.

Not only that but Wifi-Scanner now continues in the case where system has only one wifi interface, which is used to connect, in which case the gui would not reopen ... that was when the unctions tab had not been fully implemented ... so that had to be changed and now works great.

Ahi esta! Wifi-TrayNet-2.4
Last edited by stemsee on Fri 08 Jun 2018, 08:36, edited 1 time in total.

stemsee

#45 Post by stemsee »

v2.6
Last edited by stemsee on Wed 04 Jul 2018, 08:55, edited 1 time in total.

stemsee

#46 Post by stemsee »

I have implemented a new feature, which I call AP-2-svg. Data identifying the AP from scan results is used to create unique svg image files. In fact I have implemented this for such situations where items can be selected from a list, such as selecting interface to use, profile to use, AP to connect to. This could and should be extended system wide. At least I may undertake to create such a distro built around this feature.

This feature has several advantages:
1) Being an image file with relevant text information and graphics a great deal of information can be represented visually, and enlarged for accessibility.

2) Any file selector or browser can be used to view/select images, and sent to a script, or have a command exectue on it. Every distro has a file manager, doesn't it?

3) It looks very attractive and neat.

4) great for touch screen operations.

Anyway, for now, this is available in Wifi-TrayNet v-2.7, along with other improvements and changes.

File selection for the svg images is done with yad --file-selection --add-preview, but rox or pcmanfm, or even viewnior could be used.

If AP-as-image Selector is activated in the main menu, then it can be used to browse and select/activate an AP found from scan data. Wifi-TrayNet will connect with the chosen AP. Also for Interface-Selection, but needs adding more info!

Wifi-TrayNet now ships with udhcpc default.script (hook script to facility successful and timely connections) and dhcpcd hook scripts in /lib/{dhcpcd,udhcpc}. Also ipinfo script, from woof-ce (modified for geometry recorder).

Iphone libs and docs are removed. Random Mac oui text moved from /opt/local/etc/oui.txt to /usr/share/ranmc/oui.txt .... thus reducing number of directories in root to /lib and /usr .

Hotspot functions have been removed from Wifi-Scanner and Wifi-TrayNet in favour of standalone Wifi-HotSpot script which now has no desktop file.

Wifi-TrayNet menu now displays icon and ssid ... so bssid (mac) has been removed and looks less cluttered/busy, to me at least. More AP information is available, with AP-as-Image Selector function.
Attachments
2018-06-15-102442_668x417_scrot.png
(72.93 KiB) Downloaded 357 times
xscreenshot-20180612T100718.png
(49.94 KiB) Downloaded 385 times
xscreenshot-20180612T100740.png
(42.31 KiB) Downloaded 370 times

stemsee

#47 Post by stemsee »

Things have taken a turn for the better!
Last edited by stemsee on Wed 04 Jul 2018, 08:55, edited 1 time in total.

stemsee

#48 Post by stemsee »

...or have they? Ha ha ....

Wifi-TrayNet starts by checking some deps then getting interfaces and deciding dhcp (udhcpc/dhcpcd). Starts menu, performs scan and presents results, offers to connect to APs with saved profiles, or waits for AP selection from menu;
a) click on menu item 'ssid' at top
b) or Initiate Connection, opens password gui and configurator > changeap > 'ok', reloads with AP data.
c) AP-as-image selector
d) 'Extras Menu' > 'Profiles'

Still not satisfied with the order of operation.
Changed ordering of functions, because I deliberately tried to make Wifi-TrayNet resemble windows 10 wifi app which sits in the tray. What's not to like? Good question! I don't like that Wifi-TrayNet, hence forth WTN, does not provide an

1) accessible menu asap after starting up (fixed)

2) it performs first scan on first wifi card found (fixed) now manual iface selection and no auto-first-scan; in case you don't want to advertise your presence, and maybe only want to connect on usb or ethernet (fixed)(fixed) keeping with the style of Wifi-Scanner and, now obsolete, Wifi-Connection the original idea. So interface as .svg image selector opens and text selector opens which can stay open and simply selecting another interface activates it for proceeding operations. It can be left open.

3) I also don't like the error checking which parses the output of the configure and connect password gui! Which auto restarts the gui under certain circumstances, seems reasonable, but I don't like it ... Get it Right or Get Lost ... should be my motto! (not fixed).

4) I don' t like that if the connection is dropped, for instance if the mobile phone hotspot is switched off, there is no auto-polling of the connection to change the tray icon to reflect that change, presently one must manually select 'Test Connection' (for connection interface) or 'Extras Menu' > 'Test Connection' (for all interfaces). I need to use code, as does conky, to poll system ip/per interface. (not fixed). I could implement a loop to poll, but not ideal.

5) I moved around the functions in the script to follow the flow of operation but starting at the end of the script.

I had trouble with all the exported variables so now mostly written to files in tmp.

6) Also previous versions the tmp dir /tmp/Wifi-TrayNet survived after closing (fixed).

7) aploop function which monitors /tmp/WTN/ap file to trigger the pasword gui seems unreliable, hence the need for the menu item 'Initiate Connection', manual invocation of the gui. But I don't want to depend on inotify (bloat).
Last edited by stemsee on Wed 04 Jul 2018, 08:55, edited 1 time in total.

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

#49 Post by fredx181 »

Hi stemsee,

Tried your latest .deb in Bionicdog and still cannot make wifi connection.
It seems to me that the profile isn't made correctly, because when I replace what's inside the profile config (in ~/wifi-connect/profiles with what's created by peasywifi it works ok.
(after restarting Wifi-Traynet and quick reconnect)
Profile created by Wifi-Traynet:

Code: Select all

network={
	ssid="UPC44685"
	bssid="UPC44685"
	identity="UPC44685"
	password="MYPASSWD"
	key_mgmt=WPA-EAP
	eap=PEAP
	#ca_cert="/root/.wifi-connect/ca.pem"
	#phase1="peaplabel=0"
	phase2="auth=MSCHAPV2"
}
Profile created by peasywifi:

Code: Select all

network={
ssid="UPC44685"
scan_ssid=1
psk="MYPASSWD"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
}
I have wpa, does your program not have an option to set to that? (couldn't find it)

EDIT: Tried also the sfs you attached above, but can't see any networks with that.

Fred

stemsee

#50 Post by stemsee »

Hi Fred

Thanks for reporting.

I am going to send you exactly the script I am using on BD.
And from the extras menu, you can preview profiles here are the profiles I have for open network (no password and no id), and wpa2-psk (password and no id, typical mobile phone hotspot), the other supported option is peap (password and id), I personally have never encountered wpa or wep so I considered them obsolete, and with WPA3 just released confirming my observation. Therefore if you enter a password and id the script builds a config for peap two phase authentication, which is what you seem to have done. Maybe I should include wpa or ':RO' id field for wpa2.

Did you also not see any networks with Wifi-Scanner?

This is the actual script i am connecting with on BionicDog to post this
Attachments
2018-06-17-215246_502x298_scrot.png
open network
(26.36 KiB) Downloaded 297 times
2018-06-17-213222_598x205_scrot.png
wpa2-psk
(25.42 KiB) Downloaded 285 times
Last edited by stemsee on Wed 04 Jul 2018, 08:56, edited 1 time in total.

stemsee

#51 Post by stemsee »

I have added rudimentary wep and 'wpa no psk' support along with the wpa2 psk. But I cannot test wep/wpa no psk.

I have also re-written the autocon features, moved autocon from /etc/xdg/Startup to $HOME/Startup ... !
Last edited by stemsee on Wed 04 Jul 2018, 08:56, edited 1 time in total.

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

#52 Post by fredx181 »

Hi Stemsee,

The wifi-traynet_2.8_i386.deb (you posted in Bionicdog thread) works for me to get connection with wpa, indeed by not filling in the ID (only password)
The 3.2 version you attached above doesnt work for me, also it doesn't show the networks from the tray menu as v2.8 does (I like that better, see pic). (did try Wifi-Scanner from v3.2 though, but could not make wifi connection).
Profile:

Code: Select all

network={
	ssid="UPC44685"
	psk=2d11be1fba88e6509bbe0cffbbed025796b776b3bde9ffd455a9c57e2b079bbd
}
Need to say that v2.8 is not bug free (strange things happening, like dialogs keep coming back, cancel doesn't help) and the timeout dialogs make me nervous :?
It can become a nice program, but basic functions need to work properly first and then think about extra or advanced functionality (just my opinion.... :wink: )

Fred
Attachments
Wifi-Traynet-menu.png
Wifi-Traynet menu
(94.47 KiB) Downloaded 271 times

stemsee

#53 Post by stemsee »

Menu AP items without bssid (mac address) appended ...
Closed AP and open AP scan'n'join, cancel now exits.
Timeout indicators removed except for scan'n'join gui.

changed some stuff.
Attachments
2018-06-19-004656_303x554_scrot.png
(49.17 KiB) Downloaded 247 times
2018-06-18-231418_598x430_scrot.png
(53.86 KiB) Downloaded 247 times
2018-06-18-232554_598x430_scrot.png
(55.45 KiB) Downloaded 246 times

stemsee

#54 Post by stemsee »

Wifi-Scanner update .... this great multi-card wifi app, now has a function update ... when only one wifi-card is used that gui stays open and scan results are updated in situ! This feature extends so that multiple-instances each with a different card work in this way, whereas multiple interfaces in one gui instance are tabbed.

Wifi-TrayNet for the moment separates into two versions, one for BionicDog, and one for BionicPup (most pups I guess). The differences are small, and both work with udhcpc on either distro.
Last edited by stemsee on Wed 04 Jul 2018, 08:57, edited 1 time in total.

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

#55 Post by fredx181 »

Hi stemsee,

Tried your newest v3.4 on Bionicdog and it took me a while to find out that I had to left-click on the tray-icon to let the networks appear in the right-click menu.
Then I could get wifi connection by choosing my network, setting up profile and filling in the password (not ID).
The only choice at the profile dialog seems to be wpa2 from dropdown box, maybe add wpa, wep, peap etc... ?
And how about a help text (as menu item maybe ?)
Although I had some criticism earlier, I must say that you did a great job how you made it with the yad menu , the icons showing the strength etc...
Are the dialogs showing "More time" useful ? Can't see why.
The dialog that appears when clicking "Change interface" is placed wrong on my desktop, see attached pic, same btw for when clicking "Disconnect interface"

Hopefully others will test also, I'm just a simple user, can't test e.g. open networks or other different options.

Fred
Attachments
bionicdog-20180621142704.jpg
Wrong geometry ?
(15.44 KiB) Downloaded 203 times

stemsee

#56 Post by stemsee »

Thanks Fred!

The geometries I included are from my laptop (1920x1080), I thought that items would be at furthest placed in the bottom right corner and not beyond the borders! I should have changed my screen resolution first to 1024x768, or set all geometries to 400x400+0+0 to start with. Simply delete ~/.wifi-connect/geometry dir to start from fresh (I will remove them from next update)! 'More Time' dialogue is the geometry recorder (with invisible timeout) for allowing more time for getting the new geometry the way you want it (the gui borders on BD are thin and difficult for me to grab and resize: JWM has an editor to thicken borders; couldn't find such option for OB; geometry is recorded at the timeout, not during or after! The method used is simple and easy to implement per script and per gui.

(Misko provided a better solution which I didn't use yet, is un-intrusive and always working, but I didn't fully understand how to use it, but probably the better solution for automatic geometry recording when a gui closes.)

Most of informatics are as tooltips when cursor hovers over the tray icon ... from the start it says 'click on tray icon to scan' ... it is probably not clear enough that for feedback it is necessary to return the cursor over the tray icon! But once the user knows how it works, then no need to read all the tooltip notifications, it becomes un-intrusive.

There used to be a helpfile open (actually the script) when clicking on 'About' now changed to 'Wifi-TrayNet infos'. I will provide a help file and or tooltips for the GUIs.

Choosing 'type' is fixed at wpa2, the 'CBE' didn't work ... wep, wpa2, wpa even placing on different lines, or different separators!Maybe should have a button to open another selector ... or buttons for each type ... So user must type in the entry field, wep or wpa, or wpa2 .... Peap is automatic when password and id are used (but 'id' could be ':RO' if I implement reading the scan results line IEEE 802.11 which shows wpa2/wep/wpa/802.11 etc @line 22 of AP details.

The Configuration-&-Connection gui operates with priorities in this order;
1) changeap ... overrides connection settings, config editor can open
2) profiles ... overrides selected 'ssid' and 'password' ie connects with saved profile ... so select empty line to re-create saved profile with different password etc
3) password ... if empty for secure AP causes gui to reopen.
4) selecting eth0/1/2/3 etc and 'wired' driver lets wpa_supplicant connect the ethernet interface without a config file.

So empty fields need not be altered, as backup settings hae already been established at startup!

Also, for selecting interface all interfaces are available because of reports of some usb wifi cards being named usb0 or usb1, or eth1, or some of the other unusual naming conventions ... so this attempts to cover all eventualities, even allowing one to select an ethernet interface, but obviously for experienced users, wont work for wifi!

thanks for testing!

stemsee

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

#57 Post by fredx181 »

Hi stemsee, I can't test now but will try later to remove ~/.wifi-connect/geometry and see how it goes then.
You know that yad supports negative values for geometry ?
Btw, what is the geometry good for ?
Another thing I don't understand what it does is the selection of the .svg, maybe there's good reason but I don't see anything changed when I select different image file.
About the help, maybe good enough to add some help-text at the top of the profile setting dialog ?

Fred

stemsee

#58 Post by stemsee »

Hi fred

The geometry is good for organising your desktop, so that any guis that open will always open in the same places and at the size last recorded. Imagine if GUIs only ever opened in the center of the screen or only where the programmer decided, giving the user no choice! What sort of experience would that be? This way you can know that after setting up the geometry of an apps guis, the user can relax knowing they will always open wherever last they recorded the geometry for, such as in the corners, or for example, the profile preview window opens alongside, or underneath the profile manager gui! Instead of forever repeating the same box dragging routine over and over again. Besides, geometry recorder can easily be switched off, then how can it bother the user? Seeing that the windows must open somewhere, might as well be where the user prefers, it is the user's desktop after all ... imho.

As for selecting AP or interface with svg files, the advantages are that an image presents more information in a readily observable image, images are colourful and decorative, they are also resizable, and are accessible by any file manager. Plus it is a nice gimmick, something different, that is also useful. However, if using only one wifi interface then why would there be any noticeable difference? Windows wifi manager in the tray shows APs for all connected cards, this gives users choice, over how they connect and utilise available hardware easily. SVG facilitates ease of use ... of course this is the first implementation I ever heard of, which makes it ground-breaking. Why would anyone object?

BTW the svg selectors only change when OK is clicked, the text box interface selector changes on selection. Again for multi card setups ... probably should only make popup, when two or more wifi interfaces are detected.

Personally I think the help would be much better at the bottom of the profile setting dialog, it makes more natural sense, like climbing a mountain, you start at the bottom, and go up! imo

Anyway, automatic network type is now implemented, 802.1X/EAP/PEAP, WEP. WPA, WPA2.

Also the id field is now greyed out except for when necessary.
Attachments
2018-06-22-000540_668x351_scrot.png
(52.84 KiB) Downloaded 184 times
2018-06-22-000355_668x351_scrot.png
(52.65 KiB) Downloaded 184 times
2018-06-22-000334_668x351_scrot.png
(52.02 KiB) Downloaded 177 times
Last edited by stemsee on Wed 04 Jul 2018, 08:57, edited 1 time in total.

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

#59 Post by fredx181 »

Thanks stemsee for the explanations, I understand now about the geometry and the choice for icon if you have more than one card (I have only one).
Shouldn't ~/.wifi-connect/geometry be empty in the package ?
Only if I remove that folder first, the placement on the screen is good, otherwise still the same wrong placed dialogs as before for me.

The change you made now with the RO fields seems good but now no profile is created.
I think this is the part of terminal output where it goes wrong:

Code: Select all

chmod: cannot access '/tmp/Wifi-TrayNet/netsel': No such file or directory
cp: cannot stat '/tmp/Wifi-TrayNet/netsel': No such file or directory
Successfully initialized wpa_supplicant
Failed to open config file '/tmp/qrc', error: No such file or directory
Failed to read or parse configuration '/tmp/qrc'.
Another thing I wanted to mention earlier, but forgot:
Always when starting Wifi-TrayNet for the first time it doesn't run, output:

Code: Select all

root@live:~# '/usr/sbin/Wifi-TrayNet' 
bash: cleanfinish: command not found
/tmp/traynetm: line 3: kill: (24205) - No such process
Wifi-TrayNet: no process found
Second try it runs OK.

Fred

stemsee

#60 Post by stemsee »

Hi Fred and thanks for the great feedback!

I didn't test with an empty profiles folder, and I forgot to empty the geometry directory again! Seems there are a few things more to straighten out!

1) creating profiles reliably for every network type.
2) start with small screen geometries.
3) one instance only mechanism needs to work with cleanfinish function properly.
4) text interface selector only open when two or more wiphy cards available
5) start with geometry recording off
6) add tooltips for guis (if possible)
7) Comprehensive and accessible helpfile

I do not know about yad negative geometry values, except starting at max res and subtracting from that, but that isn't yad that is math. How does yad do it?

stemsee

Post Reply