YunoHost-Apps / hotspot_ynh

Wifi Hotspot app for YunoHost
GNU Affero General Public License v3.0
39 stars 19 forks source link

Firmware Errors #35

Closed keomabrun closed 5 years ago

keomabrun commented 5 years ago

The access point does not start when using the repo firmware.

I ran hostapd with the -d argument to see what was happening and I got the following:

root@francitest:~# hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: TDLS supported
nl80211: TDLS external setup
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: Use separate P2P group interface (driver advertised support)
nl80211: interface wlx6cfdb9083a3b in phy phy0
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Failed to set interface 4 to mode 3: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlx6cfdb9083a3b) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xd23928
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0xd23928 match=
nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0xd23928 match=
nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0xd23928 match=
nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0xd23928 match=
nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0xd23928 match=
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0xd23928 match=
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=04
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=0501
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=0504
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=08
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=09
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=0a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=11
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xd23928 match=7f
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 7f
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlx6cfdb9083a3b disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=4)
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Failed to set interface 4 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Mode change succeeded while interface is down
nl80211: Teardown AP(wlx6cfdb9083a3b) - device_ap_sme=0 use_monitor=0
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0xd226e0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0xd226e0)
wlx6cfdb9083a3b: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlx6cfdb9083a3b
wlx6cfdb9083a3b: AP-DISABLED 
hostapd_cleanup(hapd=0xd232a0 (wlx6cfdb9083a3b))
hostapd_free_hapd_data: Interface wlx6cfdb9083a3b wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0xd226e0)
hostapd_interface_free: free hapd 0xd232a0
hostapd_cleanup_iface(0xd226e0)
hostapd_cleanup_iface_partial(0xd226e0)
hostapd_cleanup_iface: free iface=0xd226e0

I will check if there are firmware updates and will try building the firmware again.

keomabrun commented 5 years ago

Using firmware built with https://github.com/qca/open-ath9k-htc-firmware does not work either. https://github.com/keomabrun/hotspot_ynh/commit/5c6716790d9fb50597c65bcee6029eafd848ebe0

keomabrun commented 5 years ago

It seems that this error is caused by network-manager. When disabling network-manager the command works. When adding auto wlan0 to /etc/network/interfaces it also seems to work.

keomabrun commented 5 years ago

note that I also add another error:

nl80211: Could not yet enable interface 'wlx6cfdb9083a3b' due to rfkill

and rfkill unblock wlan fixed it.