How to get RT2561/RT61 to connect to the correct AP

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5061

briggers

30-10-2008 10:16:25

How do I get a RT2561/RT61 in a desktop to connect to the correct wifi network on boot?

We have a small network, 1 Centos5 server providing NIS & NFS services, 4 wired (ethernet) connected PC and 2 wifi connected laptops. The problem is with a desktop on which I have installed Centos 5.2. It has a RALINK 2561 wifi card. I have installed the Serialmonkey RT61 driver from rt61-cvs-2008102111 (following the Serialmonkey instructions), the card is detected, works fine and will connect to the network. The connection is defined in /etc/sysconfig/network-scripts/ifcfg-wlan0 as
# RaLink RT2561/RT61 802.11g PCI
DEVICE=wlan0
ONBOOT=yes
BOOTPROTO=none
HWADDR=001f1f0184e5
NETMASK=255.255.255.0
DHCP_HOSTNAME=
IPADDR=192.168.1.15
DOMAIN=
GATEWAY=192.168.1.250
TYPE=Wireless
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
ESSID=xxxxxxxxx
KEY=yyyyyyyyyyyyyyyyyyyyyy
CHANNEL=6
MODE=Managed
RATE=Auto

The problem is that when booting the screen shows wlan0 to start, it seems to try to connect to any one at random of 4 wifi networks that cover the area (only 1 is mine). Then later in the boot sequence when it tries to start NIS and NFS it says that it cannot locate the relevant servers. (If I plug in an ethernet cable and enable eth0 it boots correctly and connects to the server so I know that is set up correctly.)

If I log in as local root I can see that the card has latched onto a neighbouring wifi network - It cannot communicate with it because the SSID and Key is wrong.

If I then do "ifdown wlan0" and "ifup wlan0" it connects to the right network (the one whose SSID is in the config file) but of course NIS & NFS are not working.

WPA_Supplicant is not running and neither is NetworkManager so I think it ought to only try to connect to the correct network.

So the question is "How do I make it connect to the right network at boot time and before it tries to start NIS & NFS clients?"

I have posted this question in the Centos forums, but the only solution suggested is to install and run WPA_supplicant. I am not keen to do that and as this PC is never going to move it does not need the ability to locate alternative networks.

Many thanks for any ideas.

Spy84464

30-10-2008 18:38:11

Hello,
How to configure the card on boot is different on every distribution, so you will most likely get the best support on the CentOS forums.
If you cannot get things to work the way they are supposed to on CentOS, then you still have the option to call iwconfig and friends in a script of your own, and have that script executed on boot.

Regards,
Romain