Author |
Message |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 09:23 Post subject:
|
|
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.
Description |
|
Filesize |
7.25 KB |
Viewed |
338 Time(s) |

|
Description |
|
Filesize |
21.38 KB |
Viewed |
339 Time(s) |

|
Description |
|
Filesize |
33.59 KB |
Viewed |
329 Time(s) |

|
Last edited by stemsee on Tue 21 Nov 2017, 03:39; edited 1 time in total
|
Back to top
|
|
 |
corvus

Joined: 12 Jun 2015 Posts: 156 Location: In the peninsula shaped like a boot.
|
Posted: Sat 16 Apr 2016, 10:30 Post subject:
|
|
stemsee wrote: | So, run 'wifi-connect' and select AP, check 'default' box and 'save' box enter ok. |
Doesn't work.
stemsee wrote: |
Code: | 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.
Thanks.
_________________ We are waves of the same sea, leaves of the same tree, flowers of the same garden.
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 10:34 Post subject:
|
|
Tried it out on alphaOS using Wifi-Connect-6.pet
got a few errors
0. I am seeing
Code: |
SIOCSIFHWADDR: Device or resource busy - you may need to down the interface |
1.
Code: | mkfifo -m MODE $PIPE9
|
I get mkfifo: invalid mode
should be something like mkfifo -m 0600 $PIPE9
maybe you meant
Code: | 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: | 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.
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 12:58 Post subject:
|
|
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: | 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=$? |
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 14:33 Post subject:
|
|
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: | 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: |
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
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 15:09 Post subject:
|
|
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.
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 15:19 Post subject:
|
|
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?
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 15:28 Post subject:
|
|
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!!!
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 15:33 Post subject:
|
|
I think you can just scratch $choose at all you don't need it
as in
Code: |
# $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, 15:37; edited 1 time in total
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 15:36 Post subject:
|
|
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?
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 15:38 Post subject:
|
|
yes try doing in a terminal window
You see that it will work without $choose
|
Back to top
|
|
 |
Pelo
Joined: 10 Sep 2011 Posts: 12591 Location: Mer méditerrannée (1 kms°)
|
Posted: Sat 16 Apr 2016, 16:01 Post subject:
delete network wizard, not a good idea Subject description: 8Geee question page 3 |
|
"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 ??? (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)
_________________ Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 17:24 Post subject:
|
|
Yeah I tried it but I am not going to change it!
|
Back to top
|
|
 |
Scooby
Joined: 03 Mar 2012 Posts: 601
|
Posted: Sat 16 Apr 2016, 18:11 Post subject:
|
|
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!
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2572 Location: In The Way
|
Posted: Sat 16 Apr 2016, 19:48 Post subject:
|
|
Well I didn't mean anything adversitive, but the gui was incomplete using your suggestion!
But thanks anyway!
|
Back to top
|
|
 |
|