Jump to content

Incompatibility issues between nl80811 driver and hostapd


jdum

Recommended Posts

Armbianmonitor:

Hi,

 

I'm using an Orange PI ZERO HC2 + and usb (mt7601u) wifi dongle to create a hotspot.

The configuration is as follow

 

<HOTSPOT>WLAN0Orange PI ZERO HC2+] WLAN1 <connected to my box>

 

At startup when hostapd is launched to create the hotspot i get the following output . See below <HOSTAPD ERROR>.

 

My hostapd.conf is below.

 

Wlan0 use for xradio_wlan as physical driver

Wlan1 use for mt7601 as physical drive

 

I did some testing. I have the exact same config with a pi3.

And have no problem.

 

I tested the hostapd provided with the orange pi on the pi3, it works no problem.

 

On the orange PI, If i do it the other way round :

wlan1 to deal with hotspot, wlan0 to connect to my box.

 

<HOTSPOT>WLAN1 [  Orange PIZERO ] WLAN0 <connected to my box>

 

I get the same error.

So its does not depend on the underneath driver ( wradio_wlan, or mt7601u).

 

So it looks like something  fishy  with the driver nl80211 declared in the hostapd.conf.

 

Any help would be appreciated.

 

Note: i guess its easy to reproduce, use my hostapd.conf  below: hostapd myhostapd.conf 

 

# HOSTAPD ERROR --------------------------------------------------------------------------------------

hostapd -Kd myhostapd.conf 
random: getrandom() support available
Configuration file: nfx-hostapd.conf
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: interface wlan0 in phy phy1
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Failed to set interface 4 to mode 3: -95 (Operation not supported)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Failed to set interface 4 to mode 3: -95 (Operation not supported)
nl80211: Interface mode change to 3 from 0 failed
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x1eb0020)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x1eb0020)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED 
hostapd_cleanup(hapd=0x1eb0d80 (wlan0))
wlan0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x1eb0020)
hostapd_interface_free: free hapd 0x1eb0d80
hostapd_cleanup_iface(0x1eb0020)
hostapd_cleanup_iface_partial(0x1eb0020)
hostapd_cleanup_iface: free iface=0x1eb0020

# --------myhostapd.conf 

interface=wlan0
driver=nl80211
#ht_capab=
#driver=mt7601u
#driver=mac80211
#driver=xradio_wlan
ssid=CHEZLAUTRE
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=delautrecote
rsn_pairwise=CCMP
 

Link to comment
Share on other sites

Hi,

I did some more test using another wifi dongle.

I manage to get the hostapd to work

with a wifi dongle using a rt2800usb driver and disabled the ht_capap in hostapd.conf.

 

Configuration file: nfx-hostapd.conf
Using interface wlan0 with hwaddr 00:25:86:e7:68:35 and ssid "CHEZLAUTRE"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

 

# Works !

 

So this looks like a dudgy negociation between the nl80811 and undrelying drivers

like xradio_wlan (the onboard wlan interface) or/and mt7601 driver.

 

It's really weird

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines