Wifi-TrayNet and Wifi-Scanner

Message
Author
stemsee

#21 Post by stemsee »

Added some polish.

TrayNet/NetMenu, Wifi-Scanner-2 both handle non-ESSID APs.

refined resolv.conf creation. Manage wether resolv.conf.head applies, when dns=0.0.0.0 (allows auto-create by hook scripts)

refined functions flow, so fewer animated try icons, no overlaps.

tidied up hotspot function.

tidied up wpa_cli monitor function.

removed curl line for external ip.

allotted credits to coders; Misko_2083, MochiMoppel, Fredx181, Rcrsn51, Victor Ananjesky. from whom I borrowed snippets. Cheers guys!

Seems to be final.

To Do ... err??
Provide more interesting icon sets.

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

User avatar
nilsonmorales
Posts: 972
Joined: Fri 15 Apr 2011, 14:39
Location: El Salvador

#22 Post by nilsonmorales »

Hi stemsee, how many icons is the set?, what size and format, see around 37 icons in /usr/share/pixmaps and two directories. want to understand
-Wired
-Wireless
-Plane mode
-Phone or tethering
I'm right?
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]

stemsee

#23 Post by stemsee »

/usr/share/pixmaps/{icons1,icons2} these are the changeable sets for displaying signal strength and password on/off. 18 icons in each set (36. 9 for encrypted and 9 for non-emcrypted AP. Then in /usr/share/pixmaps there are 13 used icons and 24 spare, which may be used at a later revision. So 49 icons, plus 3 gtk icons, so 52 all together.

Icons in the menus can be any size but I use 24px png. 1 svg (connected.svg) size 100 for tray notification icon when connected.

I want to change all to svg icons so that text and shape and colours can be added in the form of variables....eventually.

Modes of operation
Wired - usb (android usb phone tether (will add iphone)), ethernets 1 - 8
Wireless - any selected interface/s can be changed anytime for scanning/connection etc
Hotspot - with one wireless interface or two - from any source to wireless (yes even same interface).

Airplane mode - turns on/off usb, eth, wifi and bluetooth
WPA_CLI - interactive mode - wps on commandline.
Monitor Mode - to observe/sniff wireless traffic/packets.

Change mac address anytime!

Here is an update.

Added Continuous scanning of APs shown only in tooltip.
Changed qrc (quick re-connect feature) to use existing function.
Re-arranged items in both menus.
Re-added curl for external ip address.
Updated interface names handling.
Fixed a couple bugs.
Attachments
netmenu.png
(38.68 KiB) Downloaded 321 times
Last edited by stemsee on Wed 04 Jul 2018, 08:53, edited 1 time in total.

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

#24 Post by zagreb999 »

REGARDS

IS IT POSSIBLE TO CONNECT
WITH USB T-MOBILE ?

CAN YOU simplify GUI
TO BE AS NM GNOME, OR WICD,
OR FRISBEE?

ONE SCHOOL GIRL CAN NOT
UNDERSTAND YOU GUI!

stemsee

#25 Post by stemsee »

Hello zagreb999

When you say 'gui' do you mean the menu in the tray? Or the actual gui which opens when you select an AP in the top half of the menu?

1) To scan for Wifi Access Points (APs) left click (single finger tap) on the netmenu tray icon. The icon will be animated. Leave the mouse pointer hovering over the icon to see APs found in a tooltip box. To connect to a wifi AP (access point), simply right click on the tray icon, and then on the AP name in the top half of the menu.

2) A gui will open (pic1). If the AP needs a password and/or id then in the top left field just enter the password (or if eduroam enter password then your university email address (id)) in the id field and click ok. If no password is needed those fields will be read only and will not accept any input, just click ok. For normal simple use just leave default settings.

However this gui has other options for advanced users,, which may be ignored, such as using another driver (wext/nl80211 for wifi, wired for ethernet/usb with wpa_supplicant), Interface lets you select another wifi card (if available), or eth0/1/2/3/4 (enp*) if using wired driver.

The editor field is if you want to edit the config file before connecting with it to an AP.

Then there is the Static field where you have to know network config options (advanced/administrtor function).

Profiles field lists any saved profiles of APs that you have connected to before. If you select a profile then click ok, no need to enter password etc ... the profile already has all details needed to connect to the AP.

Then the 'Dhcpc editor' lets you choose and customise the dhcpcd or udhcpc configuration options. Dhcpcd will need to be installed. Udhcpcd is builtin to busybox, both use their own hook scripts, which should be on your system. For normal use just leave default settings.

Also there is the 'Change Ap' field; this lists all the APs found during the scan and if you select another one, because you changed your mind which one to join, then just click ok and the gui will close and re-open with the new AP selected. If password is needed then enter it and click ok, or just click ok.

Several of these operations are supported at a time, they are prioritised, which for normal simple operation just leave extra fields blank.

USB *T-mobile* - dongle connection, I believe is ppp. You can use 'wvdial', depending on which pup you use. I could have netmenu invoke it, or simply add the necessary heuristic code myself. But at the moment it is not possible except your dongle behaves like a wifi or android usb connection, then just select 'Mobile USB Internet' from the menu, and try it.

I hope your english is good enough to understand my explanation.

As regards imitating Frisbee or Wicd, the best I can do is to advise you to install those apps, they are their own best imitations. My app does not imitate any other wifi app on the planet ... it is as original as I need it to be, to address the short comings I have found when using those apps!

Kind regards
stemsee
Attachments
capture11574.png
pic1
(31.19 KiB) Downloaded 296 times
Last edited by stemsee on Fri 20 Apr 2018, 13:21, edited 1 time in total.

stemsee

#26 Post by stemsee »

Some things yet to do include

1) Add code to auto-connect to saved profile APs when found during continuous scanning mode.

2) Add code to connect to iphone usb tether.

3) Add code to connect with gprs/3/4/5G usb modems/dongles.

4) Add a help file.

5) Add gettext.

6) Global icon sets.
Last edited by stemsee on Tue 01 May 2018, 09:42, edited 1 time in total.

stemsee

#27 Post by stemsee »

changed the script name to TrayNet

some other small stuff! including added open profiles dir checkbox, for profiles function.

Changed default menu icon.
Last edited by stemsee on Wed 04 Jul 2018, 08:54, edited 1 time in total.

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

debiandog

#28 Post by zagreb999 »

on debiandog wifi-tray does not work...

is there latest kernel 32 bit?

regards.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#29 Post by bigpup »

stemsee,

Thanks for this program!!

Is the one posted above the latest version of Traynet or the one posted in the first post of this topic?

Normally if you make a new version of a program, you update the first post of the topic.
Put the new version in that first post.

It is easy for someone to get the newest version if all they have to do is look in this first post.
A version number would also help to make sure it is the latest version.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

stemsee

#30 Post by stemsee »

Thanks Bigpup

I will update the first post.

stemsee

stemsee

#31 Post by stemsee »

I have refined the autocon function which adds a system startup AP connection in /etc/xdg/Startup. This can be removed in two ways
1) Select an AP from menu, then when input gui opens type 'removedef' in id field and click ok (be sure password field is empty). The other way is to leave gui fields empty and click ok then again select Make Startup Ap in menu, this removes autocon from ~/Startup or /etc/xdg/Startup and default profile from /root/.wifi-connect/profiles.

There is also AutoStart on/off (toggle) in extrasmenu for starting TrayNet when X starts. It will be in /etc/xdg/Startup.
Last edited by stemsee on Thu 24 May 2018, 11:45, edited 3 times in total.

stemsee

#32 Post by stemsee »

zagreb999

I missed your post for some reason! I will test it on debiandog, but for full functionality you will need to install;

dhcpcd
dnsmasq
hostapd
wireless-tools
wpasupplicant
yad
inotifywait
ifconfig

Probably your install is missing inotifywait!

stemsee

#33 Post by stemsee »

I have added a dependency checker.

Also for some distros, yad --notification needs to take place befre first scan. So changed the order.

I have also included 'ipheth' for iphone tethering along with rules. I don't have an iphone so not tested by me.

will post later.

stemsee

EDIT: Just configurng a new kernel and found iPhone usb tether support!

stemsee

#34 Post by stemsee »

Adding openvpn might be useful.

stemsee

#35 Post by stemsee »

Added routine that connects to first AP that has a saved profile, after scan. This is not ideal, but suffices for now. What should happen is that after a scan, all AP ssids are compared against saved profiles and those found would then be prioritised according to either signal strengh or user preference, then connection attempts be made for each AP until successful.
Last edited by stemsee on Thu 24 May 2018, 11:45, edited 1 time in total.

stemsee

#36 Post by stemsee »

Two new routines have been added/refined ...

On scanning and finding APs with saved profiles, each one is used to create a connection, in sequence, after connecting to an AP, an info box opens askng the user if they wish to accept/use that connection, if ok then that connection persists, if cancel then the next found AP profile is connected. This happens until all found AP profiles have been used, and the last one stays connected.

A manual connection can be made anytime during that process.

Another routine is available in the menu Scan'n'Join OpenAPs. This extracts from the scan results all open/unencryted APs found and attempts to connect each one in sequence. After connecting an info box opens providing the user the option to keep that connection or to continue to the next in the list (/tmp/XTOFF).

A manual connection can be made anytime during that process.

Both are working well, according to my tests.

I had too many yad info boxes opening up and forming an annoying distraction, this was because test connection function was included in the animated icon function, which is called for nearly every operation. Now removed and much improved for it.

To Do: I want to use svg icons with text to add more info (channel, encryption type, data width, manufacturer).

User avatar
josejp2424
Posts: 556
Joined: Sun 01 Aug 2010, 22:35
Contact:

Wifi-TrayNet

#37 Post by josejp2424 »

Wifi-TrayNet doesn't start with the system to me

stemsee

#38 Post by stemsee »

Make sure you are using the latest version from the start of this post .. v1.3

Does your system have /etc/xdg/Startup?

This is the autostart function,

Code: Select all

function autostart (){
	if [[ -d /etc/xdg/Startup ]]; then
		path=/etc/xdg/Startup
	elif [[ -d /root/Startup && ! -d /etc/xdg/Startup ]]; then
		path=/root/Startup
	else
		exit
	fi
	export path
	if [[ ! -f "$path"/TrayNet ]]; then
		ln -s /usr/sbin/TrayNet "$path"/TrayNet
	else
		rm -f "$path"/TrayNet
	fi
}
export -f autostart

stemsee

#39 Post by stemsee »

Make sure you use this the following version
Last edited by stemsee on Mon 21 May 2018, 08:28, edited 1 time in total.

stemsee

#40 Post by stemsee »

I found two big errors (systemic).
I was not using the necessary dhcpcd switch '-c' this is needed to force use of the hook scripts in /lib64/dhcpcd/dhcpcd-run-hooks

Seems to be working more reliably now.

Post Reply