nl80211: Failed to set channel: -22 (Invalid argument)

-1

i am trying to setup a wifi hotspot using hostapd with the following configuration:

interface=wlan0
ssid=My_AP
hw_mode=g
channel=2
auth_algs=1
wmm_enabled=0
ieee80211n=1

and i am getting this error once I have started the deamon:

Completing interface initialization
Mode: IEEE 802.11g  Channel: 2  Frequency: 2417 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2417 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2417 MHz, cf2=0 MHz)
nl80211: Failed to set channel (freq=2417): -22 (Invalid argument)
Could not set channel for kernel driver
Interface initialization failed

what can be the issue here? Thanks

laplasz

Posted 2017-05-13T11:31:28.477

Reputation: 149

Answers

0

check your wifi adapter/dongle capabilites with iwconfig - it might not supporting n mode.

wlan0     IEEE 802.11  ESSID:off/any  
      Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:on

if no mentioning n mode the remove ieee80211n=1 from hostapd config file

laplasz

Posted 2017-05-13T11:31:28.477

Reputation: 149