Configure Wireless USB Ethernet
I have a system that does *not* have a graphical desktop installed, nor do I ever plan to. I have its wired ethernet working just peachy. Now I want to configure a USB wireless ethernet and scratching my head. Particularly since I don’t use NetworkManager, everything is manually configured.
That said, if I enable NM, I see this in /var/log/messages:
NetworkManager[26900]:
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/ieee80211/phy0/rfkill0)
(driver rt2800usb)
NetworkManager[26900]:
(scan_capa 0x01). NetworkManager[26900]:
‘rt2800usb’ ifindex: 4)
NetworkManager[26900]:
/org/freedesktop/NetworkManager/Devices/1
NetworkManager[26900]:
2)
NetworkManager[26900]:
starting -> ready NetworkManager[26900]:
42)
Looking at ‘lsmod | grep rt’ I see:
rt2800usb 18780 0
rt2800lib 71865 1 rt2800usb crc_ccitt 1717 1 rt2800lib rt2x00usb 12696 1 rt2800usb rt2x00lib 48438 3 rt2800usb,rt2800lib,rt2x00usb mac80211 552581 3 rt2800lib,rt2x00usb,rt2x00lib cfg80211 619515 2 rt2x00lib,mac80211
And lastly ifconfig shows the interface present:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1401 errors:0 dropped:0 overruns:0 frame:0
TX packets:1401 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:177957 (173.7 KiB) TX bytes:177957 (173.7 KiB)
wlan0 Link encap:Ethernet HWaddr 00:87:35:1C:07:BF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Great … now how do I configure this sucker? When I turn NM off, that interface disappears. I’m assuming I can create an ‘ifcfg-wlan0’
configuration but what do I need to put in there so it knows to connect to my home wireless (with password) and all of that fun and exciting stuff, and continue to do that over a reboot.
9 thoughts on - Configure Wireless USB Ethernet
Using wpa_supplicant. If it is not installed, yum install wpa_supplicant and you will need to edit /etc/sysconfig/wpa_supplicant and /etc/wpa_supplicant/wpa_supplicant.conf. Examples are in
/usr/share/doc/wpa_supplicant-* or plenty of them online .. You probably also need to rename/mv the SXXwpa_supplicant in your /etc/rcX.d to start wpa_supplicant before network.
Barry
Ok, got it installed and I can get the interface to scan and I can see all of the available cells (all of my neighbors), including my own. However when I do a test connect, this is what I get back:
Trying to associate with e0:46:9a:35:fb:98 (SSID=’Nymphadora’ freq$12 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy Association request to the driver failed Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid
You don’t need NM. I don’t ever use it. I wonder if NM is causing the problem. I would stop NM and make sure you have wpa_supplicant set up right .. or at least the part in /etc/sysconfig/wpa_supplicant and then stop network and wpa_supplicant, start wpa_supplicant and try iwlist wlan0
scan.
So here’s what I did:
chkconfig NetworkManager off chkconfig network off chkconfig wpa_supplicant on
I checked /etc/sysconfig/wpa_supplicant:
INTERFACES=”-iwlan0″
DRIVERS=”-Dwext”
OTHER_ARGS=”-f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid”
For that last one, I removed the “-u” option since it said it’s required for use with NetworkManager. Since I’m not using NM, I removed it.
In /etc/wpa_supplicant/wpa_supplicant.conf I have:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel
network={
#scan_ssid=1
ssid=”Nymphadora”
key_mgmt=WPA-PSK
proto=WPA2
pairwise=TKIP
group=TKIP
pskrc2778558c782b95aa87a1b15565617bf1db09bd4880aedfba86c943f6eee50
}
That psk line was generated from wpa_passphrase.
Then I restarted the server. When it came back up, ifconfig showed:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
wlan0 Link encap:Ethernet HWaddr 00:87:35:1C:07:BF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
So, wireless didn’t connect?
Looking at /var/log/messages, I see this:
kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready
My wireless is configured as a WPA2-PSK, I’m not entirely sure if
/etc/wpa_supplicant/wpa_supplicant.conf is actually correct …
I have a page on this at http://home.roadrunner.com/~computertaijutsu/wireless.html
Thanks Scott. Following that page, when I run
wpa_supplicant -Dwext -iwlan0 -cwpa.conf
I get this output:
Trying to associate with e0:46:9a:35:fb:98 (SSID=’Nymphadora’ freq$12 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy Association request to the driver failed Associated with e0:46:9a:35:fb:98
WPA: Key negotiation completed with e0:46:9a:35:fb:98 [PTK
Hi, Ashley,
In a previous post, you’d mentioned chkconfig’ing NM off, and wpa-supplicant on. At this point, have you done service wpa-supplicant start?
mark
I did it by hand first and then completely restarted the server. In both cases the service started, but it did not bring the interface up as far as it connecting to my wireless and getting an IP from the router.
Do I have to create an ifcfg-wlan0 file for the interface? If so, what goes in it? How do I tell it what network cell and password? Or does that information only reside in wpa_supplicant.conf (where it is now.)
Ashley M. Kirchner wrote:
Please don’t top post.
at the this to start?
You might check out this thread:
<https://www.CentOS.org/forums/viewtopic.php?t