You are not logged in.

#26 2009-03-08 18:55:12

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: wifi-select: for selecting wifi network from console (based on netcfg)

You're right, they're not... it's just a bit annoying, because around here in the city there's multiple networks all with the same ESSID, some open, some wep, some wpa.. but it still seems to work just fine. I've been using it happily. So should I take it on AUR and add it to community?

Offline

#27 2009-03-08 18:57:32

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Thanks dying_sphynx for this handy little tool.  I used to use wifi-radar when I took my laptop on the road but I'll be sure to try this out on my trip down south next month.  Looks good so far.  Will be much handier for me using wmii than wifi-radar was. smile


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#28 2009-03-09 00:30:06

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Daenyth wrote:

You're right, they're not... it's just a bit annoying,

Could this be emulated by putting an "ap XX-XX-XX-XX-XX-XX" in PRE_UP then parse and display based on that?  I've not looked at the script so I'm not sure if it's feasible.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#29 2009-03-09 00:54:15

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Nice tool!

Just a detail, but when security is "none", message in dialog is not clear:

Enter none
none
none security key for "ESSID"

Offline

#30 2009-03-09 09:06:25

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Yannick_LM wrote:

Nice tool!

Just a detail, but when security is "none", message in dialog is not clear:

Enter none
none
none security key for "ESSID"

I think this is bug, when security is "none" there should be no dialog for asking key at all smile
Could you please post here (or send me in e-mail or private message) "iwlist scan" results related to that ESSID with "none" security?
Thanks!


With best regards,
Ivan N. Veselov.

Offline

#31 2009-03-09 09:09:48

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Daenyth wrote:

I've been using it happily. So should I take it on AUR and add it to community?

Does this mean that you will become maintainer of the package in community, so when I fix some bugs or add new functionality -- I should let you know then and you will package it in a new version, right? And what about the package on AUR, should it continue its existing and how do they (package in AUR and in community) play together if so? Thank you!


With best regards,
Ivan N. Veselov.

Offline

#32 2009-03-24 09:10:17

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Daenyth:

I'm waiting for your answer smile


With best regards,
Ivan N. Veselov.

Offline

#33 2009-03-24 09:44:18

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: wifi-select: for selecting wifi network from console (based on netcfg)

dying_sphynx wrote:
Daenyth wrote:

I've been using it happily. So should I take it on AUR and add it to community?

Does this mean that you will become maintainer of the package in community, so when I fix some bugs or add new functionality -- I should let you know then and you will package it in a new version, right? And what about the package on AUR, should it continue its existing and how do they (package in AUR and in community) play together if so? Thank you!

Sorry for the wait, I lost the thread...
Yes, I would become the maintainer and you would forward updates to me (flagging out of date would be fine unless you need specific changes made). The package on the AUR interface would be the community one.

Offline

#34 2009-03-24 09:49:51

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Daenyth wrote:

Sorry for the wait, I lost the thread...
Yes, I would become the maintainer and you would forward updates to me (flagging out of date would be fine unless you need specific changes made). The package on the AUR interface would be the community one.

Well, sounds good, so please go ahead smile


With best regards,
Ivan N. Veselov.

Offline

#35 2009-03-24 14:14:33

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: wifi-select: for selecting wifi network from console (based on netcfg)

I uploaded wifi-select to community i686, and someone should be making 64bit version shortly. Thanks!

Offline

#36 2009-03-24 15:53:08

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Daenyth wrote:

I uploaded wifi-select to community i686, and someone should be making 64bit version shortly. Thanks!

Thanks a lot, it's great! smile
But for some reasons the package in AUR has became orphaned, should I adopt it? It seems this is sort of side effect...


With best regards,
Ivan N. Veselov.

Offline

#37 2009-03-24 15:53:51

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: wifi-select: for selecting wifi network from console (based on netcfg)

It's a side effect of the community daemon

Offline

#38 2009-06-03 12:57:52

john_schaf
Member
From: France
Registered: 2007-02-24
Posts: 104

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Very useful script indeed !!

I would like to propose a patch to add the signal strength to the menu, and sort entries by signal strength :
new content for parse-iwlist.awk :

BEGIN { FS=":"; OFS="="; }
/\<Cell/ { if (essid) print essid, security, q[2]; security="none" }
/\<ESSID:/ { essid=substr($2, 2, length($2) - 2) } # discard quotes
/\<Quality=/ { split($1,q,"[=/]") }
/\<Encryption key:on/ { security="wep" }
/\<IE:.*WPA.*/ { security="wpa" }
END { if (essid) print essid, security, q[2] }

and corresponding patch to wifi-select :

--- /usr/bin/wifi-select    2009-04-28 21:20:48.000000000 +0200
+++ wifi-select    2009-06-03 14:44:46.000000000 +0200
@@ -30,7 +30,7 @@
 
     ESSIDS=$(mktemp /tmp/essids.XXXXX)
 
-    iwlist $1 scan 2>/dev/null | awk -f $SUBR_DIR/parse-iwlist.awk > $ESSIDS
+    iwlist $1 scan 2>/dev/null | awk -f $SUBR_DIR/parse-iwlist.awk | sort -t= -k3 -nr > $ESSIDS
 
     # no networks found
     if [[ ! -s $ESSIDS ]]; then
@@ -104,7 +104,7 @@
 
 # add profile availability flags
 FLAGGED_NETS=$(mktemp /tmp/networks.XXXXX)
-while IFS="=" read net security; do
+while IFS="=" read net security quality; do
     NET_FILE=$(get_profile_by_essid "$net")
     if [ ! -e "$NET_FILE" ]; then
         flag="-" # profile is not present
@@ -113,7 +113,7 @@
     else
         flag="*" # profile is handmade
     fi
-    echo "$net=$flag $security"
+    echo -e "$net=$flag $security \t  ${quality}%"
 done < "$NETWORKS" > "$FLAGGED_NETS"
 
 # set IFS variable for dialog to handle spaces in ESSID correctly
@@ -146,7 +146,7 @@
         # we do NOT have a profile, so create it right now
 
         # at first, retrieve its security type
-        SECURITY=$(sed -n "s/^$ESSID=\(.*\)/\1/p" $NETWORKS)
+        SECURITY=$(sed -n "s/^$ESSID=\(.*\)=.*/\1/p" $NETWORKS)
 
         # then ask for the security key if needed
         if [[ ! $SECURITY = "none" ]]; then

In addition I think gawk and dialog should be added to the dependencies.

Last edited by john_schaf (2009-06-03 13:07:27)

Offline

#39 2009-06-03 16:21:16

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

It doesn't work for me, when I try to run it I get:

$ sudo wifi-select wlan0
/usr/bin/wifi-select: line 11: /usr/lib/network/network.subr: No such file or directory
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Is it broken? sad

Offline

#40 2009-06-03 16:27:57

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

john_schaf wrote:

Very useful script indeed !!

Thank you for the patch, I've replied in AUR comments!


With best regards,
Ivan N. Veselov.

Offline

#41 2009-06-03 16:30:09

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

smartboyathome wrote:

It doesn't work for me, when I try to run it I get:

$ sudo wifi-select wlan0
/usr/bin/wifi-select: line 11: /usr/lib/network/network.subr: No such file or directory
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Is it broken? sad

This file /usr/lib/network/network.subr is part of 'netcfg' package, do you have it installed?
If so, do you have this file listed while running "pacman -Ql netcfg"?


With best regards,
Ivan N. Veselov.

Offline

#42 2009-06-03 17:14:15

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

dying_sphynx wrote:
smartboyathome wrote:

It doesn't work for me, when I try to run it I get:

$ sudo wifi-select wlan0
/usr/bin/wifi-select: line 11: /usr/lib/network/network.subr: No such file or directory
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Is it broken? sad

This file /usr/lib/network/network.subr is part of 'netcfg' package, do you have it installed?
If so, do you have this file listed while running "pacman -Ql netcfg"?

I think I found the problem. I use testing and am using netcfg version 2.2.0b2. Downgrading to netcfg 2.1 makes it work. smile

Offline

#43 2009-06-04 00:55:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Sorry, the new netcfg contains a bit of reorganisation. So the functions you want are still there, just in different files.

I tried to email various netcfg script, GUI and addition developers before the release, but I must have missed you, sorry!

There's some notes here and have a look at the slightly different layout in /usr/lib/network/
http://wiki.archlinux.org/index.php/Net … evelopment

For your script, try changing /usr/lib/network/network.subr to /usr/lib/network/network. I had a quick glance and I think that should fix it.

James

Last edited by iphitus (2009-06-04 01:04:18)

Offline

#44 2009-06-18 20:51:36

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

john_schaf wrote:

I would like to propose a patch to add the signal strength to the menu, and sort entries by signal strength
.

Your patch is applied in Mercurial, thank you!
Should be included in the package by its maintainer soon.


With best regards,
Ivan N. Veselov.

Offline

#45 2009-06-18 20:53:22

dying_sphynx
Member
From: Kiev, Ukraine
Registered: 2008-03-22
Posts: 44
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

iphitus wrote:

Sorry, the new netcfg contains a bit of reorganisation. So the functions you want are still there, just in different files.

I tried to email various netcfg script, GUI and addition developers before the release, but I must have missed you, sorry!

There's some notes here and have a look at the slightly different layout in /usr/lib/network/
http://wiki.archlinux.org/index.php/Net … evelopment

For your script, try changing /usr/lib/network/network.subr to /usr/lib/network/network. I had a quick glance and I think that should fix it.

James

Oh, missed your post here... Well, thank you for the information, I will try to change network.subr to network.


With best regards,
Ivan N. Veselov.

Offline

#46 2009-06-21 23:42:02

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: wifi-select: for selecting wifi network from console (based on netcfg)

I really like this script! That was just what I was looking for!

I just have a simple feature request: would be possible to add an option to show the password (key) while typing? Could be a check-box or anything like that.

The signal strength idea was very good too; I'm looking forward to see this on a release.

Cheers,
Alex

Offline

#47 2009-06-24 13:35:56

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: wifi-select: for selecting wifi network from console (based on netcfg)

Great little scripts here. smile I just switch from wicd to netcfg and I must say wifi-select is very useful.

However, I run into a little problem with it: wifi-select doesn't show signal strength like it suppose to.

john_schaf wrote:

Very useful script indeed !!

I would like to propose a patch to add the signal strength to the menu, and sort entries by signal strength :
new content for parse-iwlist.awk :

BEGIN { FS=":"; OFS="="; }
/\<Cell/ { if (essid) print essid, security, q[2]; security="none" }
/\<ESSID:/ { essid=substr($2, 2, length($2) - 2) } # discard quotes
/\<Quality=/ { split($1,q,"[=/]") }
/\<Encryption key:on/ { security="wep" }
/\<IE:.*WPA.*/ { security="wpa" }
END { if (essid) print essid, security, q[2] }

and corresponding patch to wifi-select :

--- /usr/bin/wifi-select    2009-04-28 21:20:48.000000000 +0200
+++ wifi-select    2009-06-03 14:44:46.000000000 +0200
@@ -30,7 +30,7 @@
 
     ESSIDS=$(mktemp /tmp/essids.XXXXX)
 
-    iwlist $1 scan 2>/dev/null | awk -f $SUBR_DIR/parse-iwlist.awk > $ESSIDS
+    iwlist $1 scan 2>/dev/null | awk -f $SUBR_DIR/parse-iwlist.awk | sort -t= -k3 -nr > $ESSIDS
 
     # no networks found
     if [[ ! -s $ESSIDS ]]; then
@@ -104,7 +104,7 @@
 
 # add profile availability flags
 FLAGGED_NETS=$(mktemp /tmp/networks.XXXXX)
-while IFS="=" read net security; do
+while IFS="=" read net security quality; do
     NET_FILE=$(get_profile_by_essid "$net")
     if [ ! -e "$NET_FILE" ]; then
         flag="-" # profile is not present
@@ -113,7 +113,7 @@
     else
         flag="*" # profile is handmade
     fi
-    echo "$net=$flag $security"
+    echo -e "$net=$flag $security \t  ${quality}%"
 done < "$NETWORKS" > "$FLAGGED_NETS"
 
 # set IFS variable for dialog to handle spaces in ESSID correctly
@@ -146,7 +146,7 @@
         # we do NOT have a profile, so create it right now
 
         # at first, retrieve its security type
-        SECURITY=$(sed -n "s/^$ESSID=\(.*\)/\1/p" $NETWORKS)
+        SECURITY=$(sed -n "s/^$ESSID=\(.*\)=.*/\1/p" $NETWORKS)
 
         # then ask for the security key if needed
         if [[ ! $SECURITY = "none" ]]; then

In addition I think gawk and dialog should be added to the dependencies.

I've tried out the latest version of wifi-select that have included the above patch and the signal strength doesn't seems to work. The wireless strength is empty in the main window and I get the following:

$ iwlist ra0 scan | awk -f /usr/lib/network/parse-iwlist.awk
home-wireless=wpa=

Any idea what is wrong here guys?

Last edited by zodmaner (2009-06-24 14:05:31)

Offline

#48 2009-06-24 14:10:11

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

I'm not sure if this is a desired behavior or not, but I've noticed if connected to a network, and then pull out or disable my wireless card, then put it back in (or do a suspend and resume), the network doesn't automatically reconnect (which is fine....no daemon running), but if I do a 'sudo netcfg2 <networkname>' when it's the same network, it just tells me that <networkname> is already connected and exits without allowing me to reconnect. I have to manually do a 'sudo netcfg2 -a' before reattaching. Can or should this work differently so it's not a two-step process reconnecting to the same network?

Thanks,
Scott

Offline

#49 2009-06-24 14:17:26

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: wifi-select: for selecting wifi network from console (based on netcfg)

firecat53 wrote:

I'm not sure if this is a desired behavior or not, but I've noticed if connected to a network, and then pull out or disable my wireless card, then put it back in (or do a suspend and resume), the network doesn't automatically reconnect (which is fine....no daemon running), but if I do a 'sudo netcfg2 <networkname>' when it's the same network, it just tells me that <networkname> is already connected and exits without allowing me to reconnect. I have to manually do a 'sudo netcfg2 -a' before reattaching. Can or should this work differently so it's not a two-step process reconnecting to the same network?

Thanks,
Scott

i saw this exact behavior on my eeepc, i fixed it by adding `netcfg all-suspend`* and `netcfg all-resume`* before and after the eee's acpi suspend script.  i wouldn't know where or how to place these commands on another setup but maybe this'll get you googling in the right direction?


*i believe those are the commands, but am not at my computer (netcfg --help should tell you).

Offline

#50 2009-06-24 15:58:35

john_schaf
Member
From: France
Registered: 2007-02-24
Posts: 104

Re: wifi-select: for selecting wifi network from console (based on netcfg)

zodmaner wrote:

Great little scripts here. smile I just switch from wicd to netcfg and I must say wifi-select is very useful.

However, I run into a little problem with it: wifi-select doesn't show signal strength like it suppose to.

Could you post the result of "iwlist wlan0-or-whatever-is-your-interface-name scan" ? (One "cell" should be enough)

Offline

Board footer

Powered by FluxBB