You are not logged in.

#1 2008-04-20 20:26:24

Dregel
Member
Registered: 2007-01-28
Posts: 32

reset ssid for wlan0 att boot

Hi, i have a small but annoying  problem.
i cant figure out how to reset the ssid for my wlan0 interface when my computer starts.
in my rc.conf my interface section looks like this:

lo="lo 127.0.0.1"
wlan0="dhcp"
INTERFACES=(lo wlan0)

but the wlan0 interface cant get an ip from the dhcp server because it don't know the ssid of the network so at boot it just sits there for a long time trying until it outputs an error and just takes a random ip.
So every time i reboot i have to do a:

dhcpcd wlan0

to find out the pid of the interface and then kill it, then do a:

iwconfig wlan0 essid myssid

and then do another:

dhcpcd wlan0

to connect to my network, so does anybody know of a way to make the wlan0 interface remember the last ssid used so it can get an ip from my dhcp server at boot?

Offline

#2 2008-04-21 11:35:52

calef13
Member
Registered: 2007-06-10
Posts: 142

Re: reset ssid for wlan0 att boot

you could just use netcfg2, this will setup your interface and automagically connect to the network, also if you configure it with a static ip bootup will be faster because you don't have to wait for the dhcp server, or you could just background it tongue This would be simplest, but if you really don't want to use netcfg2 for some reason, you could put the commands into /etc/rc.local so remove the wlan0 interface line and replace it with a static ip, this is to make sure the interface is brought up as I don't think it will be created on boot if it isn't in rc.conf, and then put your iwconfig essid line and the dhcpcd line in rc.local and they will be executed when the computer starts and you should be connected by the time you log in. But really you would be better off with netcfg2 check out the wiki page for instructions on how to set it up

Offline

#3 2008-04-21 16:24:45

Dregel
Member
Registered: 2007-01-28
Posts: 32

Re: reset ssid for wlan0 att boot

Thanks allot for the help! netcfg2 sure helped me get it right lol

Offline

Board footer

Powered by FluxBB