CentOS 7 USB. Connect to Wi-Fi using CLI only

1.2k Views Asked by At

I just installed CentOS 7 [Kernel 3.10.0-514] on my USB stick.
Operating system works fine but I had some problems with my Broadcom 43227 wireless card.
I downloaded driver, patched it, changed code a bit according to the instruction here: https://wiki.centos.org/HowTos/Laptops/Wireless/Broadcom and after many attempts it finally compilled and after loading the driver module into kernel led turned on.
Now I need to connect to my Wi-Fi.

What am I trying to do:
Get wireless interface name using iw dev:

phy#0
      Interface wlp2s0

Scan to find WiFi Network using iw wlp2s0 scan | grep SSID

SSID: MyNetworkName

Generate a WPA/WPA2 configuration file using wpa_passphrase MyNetworkName >> /etc/wpa_supplicant.conf

MyNetworkPassword

Connect to WPA/WPA2 WiFi network using wpa_supplicant -B -D wext -i wlp2s0 -c /etc/wpa_supplicant.conf

Successfylly initialized wpa_supplicant
[and in some cases after few minutes]
ERROR @wl_cfg80211_scan: WLC_SCAN error (-22)

Get an IP using dhclient using dhclient wlp2s0

But nohing happens

Ping command : Name or sarvice not known

If I run wpa_supplicant without -B I get some repeating errors:

Device or resource busy
wlp2s0: Failed to initiate AP scan
wlp2s0: Trying to associate with [MAC] (SSID='MyNetName' freq=2462 MHz)
Operation not supported
wlp2s0: Association request to the driver failed
....

if I add -D nl80211 to wpa_supplicant call I get same errors without "Device or resource busy"

What I am doing wrong?

0

There are 0 best solutions below