Eu tenho um problema com o programa wpa_supplicant
.
Meu problema é sobre o uso de wpa_cli
, que precisa de wpa_supplicant
. Erro ao executar sudo wpa_cli
:
Could not connect to wpa_supplicant
O início manual de wpa_supplicant
me dá alguns erros:
sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0 ### NEW!!!
Config dhcp
## /etc/dhcp/dhcpd.conf
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.2 192.168.2.9;
option domain-name-servers 192.168.1.1;
option domain-name "home";
option routers 192.168.2.1;
}
Config wpa_supplicant
## /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# network={
# ssid="__SSID__"
# key_mgmt=WPA-PSK
# psk="__PASS__"
# id_str="home"
# }
Config hostapd
## /etc/hostapd/hostapd.conf
interface=wlan0
driver=rtl871xdrv
ieee80211n=1
ssid=__SSID__
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=__PASS__
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
# EDIT
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
Resultados de ifconfig
/ iwconfig
wlan0 Link encap:Ethernet HWaddr c0:4a:00:17:40:fd
inet adr:192.168.2.1 Bcast:192.168.2.255 Masque:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 IEEE 802.11bgn ESSID:"__SSID__" Nickname:"<WIFI@REALTEK>"
Mode:Master Frequency:2.412 GHz Access Point: C0:4A:00:17:40:FD
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Como posso iniciar wpa_supplicant
sem erros e ter wpa_cli
connect?