You are not logged in.

#51 2009-06-24 17:03:13

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

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

Sure! smile Here it is:

$ iwlist ra0 scan
ra0       Scan completed :
          Cell 01 - Address: 00:18:6E:CA:4D:BE
                    ESSID:"smith-home"
                    Mode:Managed
                    Channel:7
                    Quality:100/100  Signal level:-44 dBm  Noise level:-81 dBm
                    Encryption key:on
                    Bit Rates:22 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                       Preauthentication Supported

Offline

#52 2009-06-24 20:12:22

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

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

This new parse-iwlist.awk should work (replace the original in /usr/lib/network).
The problem is that you have "Quality:" instead of "Quality="
This should now work with both.

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

And here is a cosmetic only patch to /usr/bin/wifi-select :
(best with the new parse-iwlist.awk

--- wifi-select 2009-06-24 22:14:47.000000000 +0200
+++ /usr/bin/wifi-select        2009-06-19 23:06:34.000000000 +0200
@@ -113,7 +113,7 @@
     else
         flag="*" # profile is handmade
     fi
-    echo -e "$net=$flag $security \t ${quality}%"
+    echo -e "$net=$flag $security   ${quality}%"
 done < "$NETWORKS" > "$FLAGGED_NETS"
 
 # set IFS variable for dialog to handle spaces in ESSID correctly

Last edited by john_schaf (2009-06-24 20:18:58)

Offline

#53 2009-06-25 07:41:11

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

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

john_schaf wrote:

This new parse-iwlist.awk should work (replace the original in /usr/lib/network).
The problem is that you have "Quality:" instead of "Quality="
This should now work with both.

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

And here is a cosmetic only patch to /usr/bin/wifi-select :
(best with the new parse-iwlist.awk

--- wifi-select 2009-06-24 22:14:47.000000000 +0200
+++ /usr/bin/wifi-select        2009-06-19 23:06:34.000000000 +0200
@@ -113,7 +113,7 @@
     else
         flag="*" # profile is handmade
     fi
-    echo -e "$net=$flag $security \t ${quality}%"
+    echo -e "$net=$flag $security   ${quality}%"
 done < "$NETWORKS" > "$FLAGGED_NETS"
 
 # set IFS variable for dialog to handle spaces in ESSID correctly

Thank you john_schaf. smile The new parse-iwlist.awk and the patch for /usr/bin/wifi-select have been working flawlessly and now wifi-select is showing signal strength properly.

Offline

#54 2009-06-25 09:06:31

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)

alexmatos wrote:

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

Thank you! smile

alexmatos wrote:

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.

I'll take a look on it, should be not that hard to do, but I don't think checkbox is a good idea, I don't want to overload the interface, probably it would be nice to introduce some config file with options in it (show password, wireless interface name, sorting order, etc.)


With best regards,
Ivan N. Veselov.

Offline

#55 2009-06-25 09:07:33

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:

This new parse-iwlist.awk should work (replace the original in /usr/lib/network).
The problem is that you have "Quality:" instead of "Quality="
This should now work with both.

Thank you for the patch, I will apply it soon.


With best regards,
Ivan N. Veselov.

Offline

#56 2009-06-26 02:07:21

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

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

Hay Thank you for this app big_smile

WICD causes a Kernel panic with the new 2.6.30. So, have been looking for a nice app to replace it. I was hopping to find a super light app that would be simple to use and call but still provide access to WPA. This fits the bill perfectly. I also prefer shell app's over GUI. There just more fun and light and work even if X will not start tongue

Ya, super nice.
I just used your tool to make auto-generated profiles for my two wireless networks. Then set up net-auto in rc.conf. Now, where ever I am on the property, when I start my laptop it will auto connect to the AP. If I am on the road I can just use your tool to connect to the new AP. I even added it as a Hotkey in Openbox.

Last edited by hunterthomson (2009-06-26 02:54:26)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#57 2009-07-01 12:13:39

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)

hunterthomson wrote:

Hay Thank you for this app big_smile

You are welcome! smile

hunterthomson wrote:

I also prefer shell app's over GUI. There just more fun and light and work even if X will not start tongue

Yeah, I considered the same reasons while programming this tiny tool smile


With best regards,
Ivan N. Veselov.

Offline

#58 2009-07-12 23:59:40

mrcold
Member
Registered: 2008-01-24
Posts: 150

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

what about networks with spaces in their name?

the show up.. but when i click on them, I get something like:
the network "The" could not be found

where the network is called "The Awesome Network" or something.

I tried editing the file in /etc/network.d and adding slashes to the essid (the\ awesome\ network)
but that didn't work either

what should i do?

Offline

#59 2009-07-13 00:35:07

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)

Make sure you're using the latest version, that should be fixed as far as I remember.

Offline

#60 2009-07-13 07:46:37

davvil
Member
Registered: 2008-05-06
Posts: 165

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

The problem you are seeing with spaces is netcfg's fault, not wifi-select's. As far as I know (but I have not tested it), this should work with the latest netcfg, but I think it is still in [testing]. For version 2.1.3 (the current one in [core] if I'm not outdated) you can find a patch in the bugtracker.

Offline

#61 2009-07-13 09:47:42

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)

Just moved 2.2 from [testing] -> [core]

Offline

#62 2009-07-13 14:56:13

mrcold
Member
Registered: 2008-01-24
Posts: 150

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

i just updated and netcfg was included.. i'm not around a network to test it on currently.. but Thanks smile

Offline

#63 2009-07-18 22:28:09

heimdal
Member
Registered: 2009-06-25
Posts: 27

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

I updated my system, and now it seems that wifi-select has broken:

sudo wifi-select wlan0
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Just tell me what to post and I will

Offline

#64 2009-07-19 00:02:30

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)

davvil wrote:

The problem you are seeing with spaces is netcfg's fault, not wifi-select's. As far as I know (but I have not tested it), this should work with the latest netcfg, but I think it is still in [testing]. For version 2.1.3 (the current one in [core] if I'm not outdated) you can find a patch in the bugtracker.

Networks with spaces work fine with netcfg, was using one yesterday with 2.2.

Offline

#65 2009-07-23 00:38:33

szabo
Member
Registered: 2009-05-06
Posts: 8

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

heimdal wrote:

I updated my system, and now it seems that wifi-select has broken:

sudo wifi-select wlan0
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Just tell me what to post and I will

The name for the network functions file changed (the .subr extension was dropped).

Do the following to /usr/bin/wifi-select

#. /usr/lib/network/network.subr
. /usr/lib/network/network

(i.e. comment line 11, and source the correct file)

Offline

#66 2009-07-23 10:12:11

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

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

heimdal wrote:

I updated my system, and now it seems that wifi-select has broken:

sudo wifi-select wlan0
awk: fatal: can't open source file `/parse-iwlist.awk' for reading (No such file or directory)
 > no networks found

Just tell me what to post and I will

Re-install wireless_tools


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#67 2009-09-02 17:29:31

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

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

Is it possible to restrict the output of wifi-select. I.e. most of the time I am only interested in a list of available networks that already has a profile. Sort of a sorted wifi-select/dynamic netcfg-menu.

Thanks,
Rasmus


Arch x64 on Thinkpad X200s/W530

Offline

#68 2009-09-02 20:07:03

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)

Pank,

in looking at /usr/bin/wifi-select, changing row 122 to this:

#MENU_ROWS=$(cat $FLAGGED_NETS)
MENU_ROWS=$(grep -v '=- ' $FLAGGED_NETS)

would be the easiest way to omit from the output any networks that _don't_ have an existing profile.  however, this means you'll never see networks for which you have no existing profile... kind of defeats the purpose IMHO.

you could make copies with different greps i suppose, and call which ever binary suits the situation i guess...

Offline

#69 2009-10-17 12:44:27

akuschki
Member
Registered: 2009-10-17
Posts: 40

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

Hi all

does anybody know if netcfg2 works out of the box on ubuntu? I checked out the git source but after looking at the makefile I worry that the files will be copied to the wrong places. I don't know enough to know how to change the makefile. The reason I am interested in this is because I would like to make wifi-select use dmenu(-vertical) for network selection.

Any help appreciated
Arian

nevermind, switched to Arch...

Last edited by akuschki (2009-10-19 18:50:19)

Offline

#70 2009-10-25 06:08:41

prol
Member
Registered: 2008-03-27
Posts: 75

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

Why does it show my wpa network as wep????

Offline

#71 2009-10-25 15:26:10

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)

All this does is parse iwlist scan output. It's an issue with your card.

Offline

#72 2009-12-17 21:42:10

swiftscythe
Member
Registered: 2009-04-28
Posts: 131

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

Hi! I've tested wifi-select with netcfg 2.5 rc1 from testing, and it works great.
The only thing that doesn't work is connecting to a network which doesn't have any profiles.
Then it says: Profile "wifi-name" does not exist.

I'm not quite sure whether I should post it here...

Thanks in advance smile

Offline

#73 2010-02-24 15:39:23

vitoreiji
Member
Registered: 2009-09-04
Posts: 67

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

swiftscythe wrote:

The only thing that doesn't work is connecting to a network which doesn't have any profiles.
Then it says: Profile "wifi-name" does not exist.

Same here.

> profile for NCC1701 already exists, continue using it 
> Profile "NCC1701" does not exist 

$ ls /etc/network.d/NC*
ls: cannot access /etc/network.d/NC*: No such file or directory

$ pacman -Qs wifi-select
local/wifi-select 0.8-2
    Tool for selecting wifi networks in console

Any updates on this one?

Offline

#74 2010-03-02 02:25:48

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 seems to be calling validate_profile which doesn't exist as of commit 9c41266. I'll see if I can cobble together a patch to restore functionality.

Edit: Changing validate_profile to load_profile seems to make it work.

Last edited by Daenyth (2010-03-02 02:30:32)

Offline

#75 2010-03-02 04:15:05

vitoreiji
Member
Registered: 2009-09-04
Posts: 67

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

Daenyth wrote:

Changing validate_profile to load_profile seems to make it work.

It does. Thank you very much!

Offline

Board footer

Powered by FluxBB