Saturday, July 30, 2016

can not start hostapd on lenovo thinkpad

when start hostapd it show message like below

$ sudo hostapd /etc/hostapd/wpa-ap.conf
Configuration file: /etc/hostapd/wpa-ap.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started

1- Fix this problem use the following command
$ sudo nmcli radio wifi off

$ sudo rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: yes
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
$ sudo rfkill unblock 2

2- then you can run the hostapd normally as before
$ hostapd /etc/hostapd/myap-ap.conf
Configuration file: /etc/hostapd/wpa-ap.conf
Using interface wlan0 with hwaddr d8:fc:93:00:1f:55 and ssid "myssid"
wlan0: interface state UNINITIALIZED->ENABLED

No comments:

Post a Comment