Wifi-Connect 2017B beta (Deprecated)

Message
Author
Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#41 Post by Atle »

Wow... That looks like a great start... I think maybe even I might be able to figure that one out. Or at least try :-)

I even found a "Puppy", that is not really a puppy, but still somewhat called that...

http://www.authpuppy.org/

stemsee

#42 Post by stemsee »

Well, Atle, that is for Windows!

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

#43 Post by corvus »

stemsee wrote:@corvus
What do you think of the idea that wifiprofi only offers for selection profiles that have an Access Point available? Or leave it as it is to show all saved configs?
I think the best choice is to offer the selection of only the profiles that have an available Access Point, provided the selection is dynamically updated with a scanning routine before the selection otherwise it is better to leave it as it is.
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

#44 Post by corvus »

Tried the corrected version, works well but choosing the network to connect to I have selected, saved and setted as default the wrong Access Point when I realised the error I repeated the selections with the right one but after reboot wifi-connect does not connect automatically. I have to start wifiprofi and choose the right one to connect but I get two icons in the tray and on reboot the problem persist. How can I delete the wrong Access Point ?
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

stemsee

#45 Post by stemsee »

So, run 'wifi-connect' and select AP, check 'default' box and 'save' box enter ok.

If that doesn't work then

Code: Select all

rm -f /root/.wifivars
rm -f /root/.wifivars2
rm -f /root/.wifivarsdef
rm -f /root/Startup/defaultwifi

stemsee

#46 Post by stemsee »

More info improvements.

I didn't do the limited profiles function because in the case where you want to join an invisible AP ... But i may add it as an option.
Attachments
desktopinfo.png
(7.25 KiB) Downloaded 332 times
desktopinfo2.png
(21.38 KiB) Downloaded 333 times
desktopinfo3.png
(33.59 KiB) Downloaded 323 times
Last edited by stemsee on Tue 21 Nov 2017, 07:39, edited 1 time in total.

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

#47 Post by corvus »

stemsee wrote:So, run 'wifi-connect' and select AP, check 'default' box and 'save' box enter ok.
Doesn't work.
stemsee wrote:

Code: Select all

rm -f /root/.wifivars
rm -f /root/.wifivars2
rm -f /root/.wifivarsdef
rm -f /root/Startup/defaultwifi
Deleting the files and run again wifi-connect has solved my issue now everything works as expected. :D

Thanks.
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#48 Post by Scooby »

Tried it out on alphaOS using Wifi-Connect-6.pet

got a few errors

0. I am seeing

Code: Select all

SIOCSIFHWADDR: Device or resource busy - you may need to down the interface
1.

Code: Select all

mkfifo -m MODE $PIPE9
I get mkfifo: invalid mode

should be something like mkfifo -m 0600 $PIPE9

maybe you meant

Code: Select all

MODE="0600"
mkfifo -m $MODE $PIPE9
There are two such mkfifo in script.

2. I am trying to connect to a open network with SSID ATF_OPEN
(Obs linenumbers probably wrong since I had to replce yaf-splash with Xdialog on my system)

/usr/bin/wifi-connect: line 139: ATF_OPEN||||TRUE|FALSE|FALSE|FALSE||TRUE|: command not found

from

Code: Select all

function selectfn () {
$choose
....
where the $choose is what bombs

Maybe you do alot of parsing of output from commands and it is not
the same on alphaOS?

I get no connection

I like the interface though


Also after running apllication a few times already annoyed with the
"can be empty" of User-id.

stemsee

#49 Post by stemsee »

Scooby wrote: Also after running apllication a few times already annoyed with the
"can be empty" of User-id.
I echo that sentiment!!

Next iteration that field will be empty! I just didn't want some people to get confused thinking it needed to be filled!! On the other hand it doesn't matter, just left alone does not affect usage!

I will experiment and research fifo pipe formatting, I am new to it.

$choose is defined in 'buildnetworkselectorfn', Then I have simply stated the variable and that is the entire gui, a bit like 'export gtkdialog'. Actually I was surprised when it worked!

Code: Select all

buildnetworkselectorfn () {
cat /tmp/scansr2 | tr '\n' ' ' >> /tmp/scansr3 
sed -i 's|^|choose=$(yad --window-icon=/usr/share/pixmaps/wifi.png --image "/usr/share/pixmaps/wifi.png" --columns=1 --title "$mytext16: $int" --item-separator="," --form --field="$mytext15":CBE "|' /tmp/scansr3
sed -i 's/$/" --field=$mytext20 --field=$mytext18:H --field=$mytext17:H --field=wlan0-default:CHK --field=wlan1:CHK --field="$mytext27":CHK --field="$mytext26":CHK --field="$mytext25" --field="$mytext24":CHK --button="gtk-ok:0" --button="gtk-close:1" --text "$mytext5" "$mytext21" "" "" "TRUE" "" "" "" "$mytext22" "TRUE")\n/' /tmp/scansr3
sed -i 's/, "/"/g' /tmp/scansr3
sed -i 's/, /,/g' /tmp/scansr3
sed -i 's/=""/=","/g' /tmp/scansr3
[[ /tmp/scansr ]] && . /tmp/scansr
[[ /tmp/scansr3 ]] && . /tmp/scansr3

}

selectfn () {
$choose
ret=$?

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#50 Post by Scooby »

stemsee wrote: $choose is defined in 'buildnetworkselectorfn', Then I have simply stated the variable and that is the entire gui, a bit like 'export gtkdialog'. Actually I was surprised when it worked!

Code: Select all

buildnetworkselectorfn () {
cat /tmp/scansr2 | tr '\n' ' ' >> /tmp/scansr3 
sed -i 's|^|choose=$(yad --window-icon=/usr/share/pixmaps/wifi.png --image "/usr/share/pixmaps/wifi.png" --columns=1 --title "$mytext16: $int" --item-separator="," --form --field="$mytext15":CBE "|' /tmp/scansr3
sed -i 's/$/" --field=$mytext20 --field=$mytext18:H --field=$mytext17:H --field=wlan0-default:CHK --field=wlan1:CHK --field="$mytext27":CHK --field="$mytext26":CHK --field="$mytext25" --field="$mytext24":CHK --button="gtk-ok:0" --button="gtk-close:1" --text "$mytext5" "$mytext21" "" "" "TRUE" "" "" "" "$mytext22" "TRUE")\n/' /tmp/scansr3
sed -i 's/, "/"/g' /tmp/scansr3
sed -i 's/, /,/g' /tmp/scansr3
sed -i 's/=""/=","/g' /tmp/scansr3
[[ /tmp/scansr ]] && . /tmp/scansr
[[ /tmp/scansr3 ]] && . /tmp/scansr3

}

selectfn () {
$choose
ret=$?
I don't get it
[[ /tmp/scansr3 ]] && . /tmp/scansr3 in buildnetworkselectorfn is where you start the gui and in /tmp/scansr3 is where you assign to choose the
result of the yad dialog

from scnansr3

Code: Select all

choose=$(yad --window ...
then in selectfn you are running that reply as if it is a command
When I tried to connect this was the case that choose="ATF_OPEN||||TRUE|FALSE|FALSE|FALSE||TRUE|"

It is not a command
?

You can verify that by going to tmp folder and do

Code: Select all

. scansr3

stemsee

#51 Post by stemsee »

Which version of yad do you have?

You are right, it isn't a command ... that is wy I was surprised that it worked!!
But it works for us on puppy linux!

I build the variables for the network AP names in /tmp/scansr/2/3
3 s the final version. First I split the results from iwlist wlan0 scan to scansr then insert net1= to each AP name > scansr2 then insert using sed the choose=$(yad and append the rest of the gui using sed to scansr3. Then I import that variable . /tmp/scansr3 then I state or call it in the next function and up pops the gui with all data as I had hoped! I can't explain it. I just follow my intuition.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#52 Post by Scooby »

stemsee wrote:Which version of yad do you have?
yad --version
0.29.0 (GTK+ 3.16.6)
stemsee wrote: You are right, it isn't a command ... that is wy I was surprised that it worked!!
But it works for us on puppy linux!

I build the variables for the network AP names in /tmp/scansr/2/3
3 s the final version. First I split the results from iwlist wlan0 scan to scansr then insert net1= to each AP name > scansr2 then insert using sed the choose=$(yad and append the rest of the gui using sed to scansr3. Then I import that variable . /tmp/scansr3 then I state or call it in the next function and up pops the gui with all data as I had hoped! I can't explain it. I just follow my intuition.
Yep that is a good way to learn coding.

It will be error-prone code though

I'll see if I can get something to work for me

Are you saying that if you run wifi-connect in terminal you don't get
any errors at all?

stemsee

#53 Post by stemsee »

It is extremely difficult to find a cear explanation of fifo pipes and modes except that default is a=rw

which means I don't need to state MODE, I guess.

This is typical of linux - you have to drudge through tons of crap to find one iota of value!!!

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#54 Post by Scooby »

I think you can just scratch $choose at all you don't need it

as in

Code: Select all

# $choose
ret=$?
[[ $ret -eq 1 ]] && exit 0
[[ $ret -eq 2 ]] && startinfn
BTW How do you get ret value 2 there?
Its from selectfn()
Last edited by Scooby on Sat 16 Apr 2016, 19:37, edited 1 time in total.

stemsee

#55 Post by stemsee »

Oh that is an artefact from a button since removed!

if $choose is scrapped I think there will be no gui!!! Have you tried it?

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#56 Post by Scooby »

yes try doing in a terminal window

Code: Select all

cd /tmp
. scansr3
You see that it will work without $choose

Pelo

delete network wizard, not a good idea

#57 Post by Pelo »

"Pelo... what do you tink of Network Wizard, it was absent from your post. I find it very useful, and I don't really need SNS or Frisbee."
Be careful...Connecting wireless is a little bit hazardous... At home perhaps no, but really outside, performance change depending the tool used.
A -network wizard Easy to connect but not stable. connect with it first time.
B then connect Frisbee (frisbee will shut down current connection but keep the settings done before.
C PeasyWifi is nice too (same process as Frisbee)
D Wifi-connect topic discovered to day.
Networkwizard must be kept. Our french Toutou 4.3.6 is equipped with Frisbee, well, but esmourguit has deleted network wizard, not a good idea (Sorry Toutou 4.3.6 :? )
That is true for me, perhaps not for you. Do your own configuration. Peasy Wifi and Frisbee are available as pets. Wifi-connect too. (Peasyconnect too)
If everything works without don't install them. Remove builtin ? Is it the pain to remove, there are small applis.
SNS ? sometimes SNS is the one that will work, the only one. How to explain ??? :wink: (SNS my last card)
I would like to add that i succeed to connect wireless quite all 'old' puppies in my new laptop (new=2012) with a dongle CSL RTL8192CU (only if needed) thanks to rscsn51 drivers
And if you are on public spot, you share the spot. Inactivity will stop the connection, to many people on the spot, less connectivity for each one, harder to connect)

stemsee

#58 Post by stemsee »

Yeah I tried it but I am not going to change it!

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#59 Post by Scooby »

stemsee wrote:Yeah I tried it but I am not going to change it!
??
That is of course your prerogative but keeping code that works
but is logically wrong is not a good recipe as far as I'm concerned.

I take my leave then and leave you to it.

Good luck with the project!

stemsee

#60 Post by stemsee »

Well I didn't mean anything adversitive, but the gui was incomplete using your suggestion!

But thanks anyway!

Post Reply