Configuring Wi-Fi with usb adapter on server

Issues related to configuring your network
Post Reply
d33pcode
Posts: 3
Joined: 2015/09/22 09:41:24

Configuring Wi-Fi with usb adapter on server

Post by d33pcode » 2015/09/22 10:09:36

Hi all and thanks in advantage for your help.

I've installed a minimal CentOS 6.7 on my home server. For some reasons I need to connect to internet via wifi instead of using ethernet (obviously i'm using ethernet at the moment).
My usb wifi adapter is : TP-LINK TL-WN823N .
Driver should be installed but i don't know how to check if it's working. However, I still have a zip with the drivers ( RTL8192CU ).

Here's some informations. I apologize for any "strange output" , but I had to translate them.

Code: Select all

[root@gemini ~]# service network status
Configured devices:
lo eth0 eth1 wlan0
Currently active devices:
lo eth0

-----------------------------------------------------------

[root@gemini ~]# service wpa_supplicant status
wpa_supplicant is interrupted

Note there's no NetworkManager service.

Code: Select all

[root@gemini ~]# service NetworkManager status
NetworkManager: unknown service
Okay that's strange. An hour ago wlan0 used to be in the following output. I swear I don't even know what could I've done to make this happen.

Code: Select all

[root@gemini ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 78:E3:B5:11:39:BE  
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::7ae3:b5ff:fe11:39be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:572 errors:0 dropped:0 overruns:0 frame:0
          TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:59676 (58.2 KiB)  TX bytes:43296 (42.2 KiB)
          Interrupt:16 

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:65536  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1344 (1.3 KiB)  TX bytes:1344 (1.3 KiB)

[root@gemini ~]# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

I have to admit it: i needed to wrote my ifcfg-wlan0 by myself :(
(Also, I'll actually need to configure a static IP address...)

Code: Select all

[root@gemini ~]#  cat /etc/sysconfig/network-scripts/ifcfg-wlan0

TYPE=Wireless
DEVICE=wlan0
MODE=Managed
BOOTPROTO=dhcp
ONBOOT=yes

Proof I'm not crazy and the adapter actually exists:

Code: Select all

Segmentation fault
[root@gemini ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 006 Device 002: ID 03f0:1027 Hewlett-Packard Virtual keyboard and mouse
Any ideas?

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Configuring Wi-Fi with usb adapter on server

Post by TrevorH » 2015/09/22 10:28:49

I believe the ELRepo yum repository has packaged drivers for rtl8192cu and you should use those. If you build your own from source then they will break each and every time there is a kernel update.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

d33pcode
Posts: 3
Joined: 2015/09/22 09:41:24

Re: Configuring Wi-Fi with usb adapter on server

Post by d33pcode » 2015/09/22 10:59:59

Do I need to remove the previously installed drivers?
If yes, how can I do it?

------------------------------------------------------------------

EDIT:

Output after installation of Elrepo:

Code: Select all

[root@gemini ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 78:E3:B5:11:39:BE  
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::7ae3:b5ff:fe11:39be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2083 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1198614 (1.1 MiB)  TX bytes:317999 (310.5 KiB)
          Interrupt:16 

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:65536  Metric:1
          RX packets:27 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3024 (2.9 KiB)  TX bytes:3024 (2.9 KiB)

wlan0     Link encap:Ethernet  HWaddr C4:E9:84:D9:92:3E  
          inet6 addr: fe80::c6e9:84ff:fed9:923e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:441 overruns:0 frame:0
          TX packets:9 errors:0 dropped:9 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28518 (27.8 KiB)  TX bytes:3642 (3.5 KiB)

[root@gemini ~]# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"iPanunzio"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 14:CC:20:78:61:7D   
          Bit Rate:270 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Code: Select all

[root@gemini ~]# iw dev wlan0 scan
nl80211 not found.

Code: Select all

[root@gemini ~]# service wpa_supplicant status
wpa_supplicant (pid 21307) in esecuzione...

Code: Select all

[root@gemini ~]#  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
[root@gemini ~]#  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWAP]: Operation not permitted
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

ioctl[SIOCSIWAP]: Operation not permitted

d33pcode
Posts: 3
Joined: 2015/09/22 09:41:24

Re: Configuring Wi-Fi with usb adapter on server

Post by d33pcode » 2015/09/22 12:43:04

At least wpa_supplicant is working.
But...

Code: Select all

[root@gemini ~]#  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWAP]: Operation not permitted
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 30:91:8f:df:f2:b9 (SSID='iPanunzio' freq=2412 MHz)
Associated with 30:91:8f:df:f2:b9
WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK
WPA: Could not verify EAPOL-Key MIC - dropping packet
Authentication with 30:91:8f:df:f2:b9 timed out.
ioctl[SIOCSIWAP]: Operation not permitted
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 14:cc:20:78:61:7d (SSID='iPanunzio' freq=2412 MHz)
Associated with 14:cc:20:78:61:7d
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Associated with 14:cc:20:78:61:7d
WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK
WPA: Could not verify EAPOL-Key MIC - dropping packet
Authentication with 14:cc:20:78:61:7d timed out.
ioctl[SIOCSIWAP]: Operation not permitted
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 14:cc:20:78:61:7d (SSID='iPanunzio' freq=2412 MHz)
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Trying to associate with 30:91:8f:df:f2:b9 (SSID='iPanunzio' freq=2412 MHz)
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid=30:91:8f:df:f2:b9 reason=0
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 14:cc:20:78:61:7d (SSID='iPanunzio' freq=2412 MHz)
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 14:cc:20:78:61:7d (SSID='iPanunzio' freq=2412 MHz)
Associated with 14:cc:20:78:61:7d
WPA: 4-Way Handshake failed - pre-shared key may be incorrect
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Associated with 14:cc:20:78:61:7d
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Trying to associate with 30:91:8f:df:f2:b9 (SSID='iPanunzio' freq=2412 MHz)
Associated with 14:cc:20:78:61:7d
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Associated with 14:cc:20:78:61:7d
WPA: IE in 3/4 msg does not match with IE in Beacon/ProbeResp (src=14:cc:20:78:61:7d)
WPA: WPA IE in Beacon/ProbeResp - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: WPA IE in 3/4 msg - hexdump(len=28): dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 04 00 50 f2 02 01 00 00 50 f2 02
WPA: RSN IE in Beacon/ProbeResp - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: RSN IE in 3/4 msg - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00
ioctl[SIOCSIWAP]: Operation not permitted
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 30:91:8f:df:f2:b9 (SSID='iPanunzio' freq=2412 MHz)
CTRL-EVENT-DISCONNECTED bssid=30:91:8f:df:f2:b9 reason=0
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
Trying to associate with 14:cc:20:78:61:7d (SSID='iPanunzio' freq=2412 MHz)
Associated with 14:cc:20:78:61:7d
WPA: 4-Way Handshake failed - pre-shared key may be incorrect
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
Associated with 14:cc:20:78:61:7d
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: Could not verify EAPOL-Key MIC - dropping packet
CTRL-EVENT-DISCONNECTED bssid=14:cc:20:78:61:7d reason=0
[...]
Any ideas?

Post Reply