Re: [dwm] OT: Wireless in dwm

From: Delta <delta.tecblog_AT_gmail.com>
Date: Mon, 20 Apr 2009 19:36:15 +0200

Hi,

I use a homemade extension I made of the Ian Daniher wifi script: http://lists.suckless.org/dwm/0901/7282.html

This wifi script parses a csv file containing the configurations of frequent networks. (example csv file attached)
It uses iwlist, iwconfig, ifconfig, dhclient and wpa_supplicant commands to manage the connections.

It can be called passing to it a "profile name" as parameter. If called without parameter a list of the profiles on the file.csv
will be presented for choosing. In this list those profiles whose networks are in range will be marked with a "*".
The last option of the list will be always "OPEN_NETWORKS", which will present another list with the Open Networks in range ordered by signal quality and allowing to connect to them in "dhclient mode".

Although the original Ian script used dmenu as interface for the selection of profiles this one uses only stdout in order to not have such dependency.
Before using it the constants of the beginning (WIFILE,WIFACE,DNS1,DNS2) must be set.

I apologize for the bad state of the code. I just wrote it for myself without the intention to publish it until I have seen this thread. It could be, for sure, arranged and refactorized (just see the "perl -e" command embedded xD).

If someone interested on the script is not able to understand or to modify it don't hesitate to contact me for help.

Kind Regards,

Delta

On 2009-04-20, 10:47
Kurt H Maier (karmaflux_AT_gmail.com) wrote:

> I wrote a script[1] that uses dmenu to present local wifi networks,
> and ask for a wep key. Shouldn't be too hard to extend to wpa etc.
>
> 1 - http://madleet.net/wifiselect.sh.html
>
> # Kurt H Maier
>
>
>
> On Mon, Apr 20, 2009 at 10:14 AM, pmarin <pacogeek_AT_gmail.com> wrote:
> > I use two naïve scripts, two files and an alias:
> >
> > #wep connect to a wep wifi
> > #! /bin/sh
> >
> > key="`grep $1 /home/pmarin/wep | cut -d' ' -f2`"
> > sudo ifconfig wlan0 up
> > sudo iwconfig wlan0 essid $1
> > sudo iwconfig wlan0 key s:$key
> > sudo dhclient wlan0
> > #end
> >
> > The wep is a plain file with to columms
> >
> > essid  key
> >
> > #wpa connect to a wpa wifi
> > #! /bin/sh
> >
> > sudo ifconfig wlan0 up
> > sudo iwconfig wlan0 essid $1
> > sudo wpa_supplicant -iwlan0 -c/home/pmarin/wpa -B
> > sudo dhclient wlan0
> > #end
> >
> > the wpa file is similar than /etc/wpa_supplicant.conf
> >
> > #wscan
> > It is an csh alias:
> > alias wscan 'sudo iwlist wlan0 scan'
> >
> >
> >
> > On Mon, Apr 20, 2009 at 3:52 PM, Preben Randhol <randhol_AT_pvv.org> wrote:
> >> Hi
> >>
> >> This is somewhat off-topic. I'm totally new to using wireless network. At
> >> home everything is wired, but i have sometimes the need to use wireless
> >> when traveling. Now I have an Asus Eee so I can connect. Only problem is
> >> that the gui tool of xfce4 (or gnome) runs like applets and there are no
> >> version that is not an applet it seems. So I was wondering if any knows
> >> any good software/resources to be used with dwm to choose and bring up a
> >> wireless network. I guess one can make some scripts using the iw tools? I
> >> have heard one can install a program called trayer to get up the applets,
> >> but I would prefer not to.
> >>
> >> At the moment I have to use xfce4 to get up the wireless.
> >>
> >> I'm asking here as I guess you have more experience with this than me and
> >> can point me in the right direction.
> >>
> >> Thanks in advance
> >>
> >> Preben
> >>
> >>
> >>
> >
> >
>

Received on Mon Apr 20 2009 - 17:36:15 UTC

This archive was generated by hypermail 2.2.0 : Mon Apr 20 2009 - 17:48:04 UTC