Guest Posted February 16, 2020 Posted February 16, 2020 Armbianmonitor: http://ix.io/2c0b I have two NanoPi R1s, both with Armbian Buster. I want to use both as wireless access points, however the wifi seems to be problematic. It always works at first, but not anymore after updating, changing the config and rebooting. My hostapd config is the following: # # armbian hostapd configuration example # # nl80211 mode # ssid=[myssid, contains some numbers] interface=wlan0 hw_mode=g channel=6 [11 on the other one] #bridge=br0 driver=nl80211 logger_syslog=0 logger_syslog_level=0 wmm_enabled=1 wpa=2 preamble=1 wpa_psk=[random thing armbian-config generated] wpa_passphrase=[secret] wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=CCMP wpa_strict_rekey=1 wpa_disable_eapol_key_retries=1 ieee80211w=2 auth_algs=1 macaddr_acl=0 noscan=1 ## IEEE 802.11n ieee80211n=1 ht_capab=[DSSS_CK-40][HT20+] country_code=DE ieee80211d=1 ## IEEE 802.11n ### IEEE 802.11a #hw_mode=a ### IEEE 802.11a ### IEEE 802.11ac #ieee80211ac=1 #vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3] #vht_oper_chwidth=1 #vht_oper_centr_freq_seg0_idx=42 ### IEEE 802.11ac # controlling enabled ctrl_interface=/var/run/hostapd ctrl_interface_group=0 Systemd says hostapd is loaded, active and exited. The wifi is not detectable by any of my devices. If I try to start hostapd manually via hostapd /etc/resolv.conf , it says Configuration file: /etc/hostapd.conf wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE wlan0: Could not connect to kernel driver Using interface wlan0 with hwaddr 18:93:7f:73:4a:ec and ssid "[SSID from config file]" random: Only 18/20 bytes of strong random data available from /dev/random random: Not enough entropy pool available for secure operations WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects wlan0: Could not connect to kernel driver Interface initialization failed wlan0: interface state COUNTRY_UPDATE->DISABLED wlan0: AP-DISABLED wlan0: Unable to setup interface. wlan0: interface state DISABLED->DISABLED wlan0: AP-DISABLED wlan0: CTRL-EVENT-TERMINATING hostapd_free_hapd_data: Interface wlan0 wasn't started nl80211: deinit ifname=wlan0 disabled_11b_rates=0 Not sure whether this is a bug or an error on my side. It used to work with OpenWrt, however the problem there is the only images for it are provided by FriendlyArm (there are no official images by the OpenWrt team), and that image is still on version 18.01, which doesn't get any security updates anymore. EDIT: I maybe also should have mentioned the WiFi and hotspot options disappear in `armbian-config`. `ip addr` or `ip link` still show the wlan0 interface however. Maybe a recent update broke the driver or so? Still not sure whether I should move this to H3 bug reports. EDIT 2: I now tried to connect to a different WiFi with `wpa_supplicant`. Works with both `wext` and `nl80211` drivers (the former returns some `IOCTL` errors, but isn't used by hostapd anyway, and it still seems to work nevertheless). So the issue is probably more related to hostapd than to the driver. EDIT 3: `iw list` said it only supported CMAC-128 ciphers, so I removed any config that would use 256 bit ciphers. Also various sources suggested this was an old bug, and I needed to run `nmcli radio wifi off` and `rfkill unblock wlan` before starting hostapd, however that didn't change anything.
Guest Posted February 18, 2020 Posted February 18, 2020 I already asked in the community forum (https://forum.armbian.com/topic/13072-problems-with-wifihostapd-on-nanopi-r1/), however, as I didn't get any answer there, I suppose this might be a bug (in hostapd (?)). All the relevant details are there, I guess. Note the armbianmonitor output is only for one of the NanoPis, however they're both configured very similarly.
Igor Posted February 18, 2020 Posted February 18, 2020 7 hours ago, FantasyCookie17 said: as I didn't get any answer there This is expected. We are millions of dollars short to provide support on professional levels you might wish to have - there are a lot more people that wants something then people that knows something and care to spent their time for a problem you have - with a software you got for free. This is community best effort support. The harsh reality is that I can focus into this problem fastest in a couple of weeks, if I don't forget about or if something more urgent doesn't steps in. Perhaps someone else will check, perhaps nobody. Open a question and wait. Do a research why this is happening (you did, good!), contribute to the project in best effort manner and you will certainly attract more people - to help you. Anyway, welcome!
Guest Posted February 18, 2020 Posted February 18, 2020 6 hours ago, Igor said: This is expected. We are millions of dollars short to provide support on professional levels you might wish to have - there are a lot more people that wants something then people that knows something and care to spent their time for a problem you have - with a software you got for free. This is community best effort support. The harsh reality is that I can focus into this problem fastest in a couple of weeks, if I don't forget about or if something more urgent doesn't steps in. Perhaps someone else will check, perhaps nobody. Open a question and wait. Do a research why this is happening (you did, good!), contribute to the project in best effort manner and you will certainly attract more people - to help you. Anyway, welcome! I know this is a small project and everything, but as as this is still rather popular, I supposed someone in the community would be able to help (lots of other questions in the P2P forum were answered, so if nobody from the community is able to help, it might as well be a bug and thus more a issue for the developers (if one considers them separate from the community, which they probably aren't)). I've benn using Linux for maybe two or three years now, so sure I don't expect any professional support... Whatever. As this problem may be caused by a specific version of hostapd or one of its dependencies, I guess I'll try Armbian 9 just to see whether it works there, though of course it still would be nice to have more recent software available, so it would still be nice if you or someone else maybe gets this working in some weeks or months, so thank you. Have also already been looking at the BSDs and the like (perhaps I can copy the DTB from some distro and put it into the appropriate place, BSD ARM kernels apparently support using any DTB), but it seems like the WiFi chipset is not supported for using it as an access point in most BSD versions, so I guess I'll have to find some still maintained version of some Linux distro after all that supports the NanoPi R1...
Igor Posted February 18, 2020 Posted February 18, 2020 3 hours ago, FantasyCookie17 said: some still maintained version of some Linux distro Currently you have by far best support. Ain't perfect, agree.
lanefu Posted February 18, 2020 Posted February 18, 2020 @FantasyCookie17 You may want to try the distro-provided hostapd rather than the armbian one.. it lacks some features, but maybe it'll work out for you.
Guest Posted February 18, 2020 Posted February 18, 2020 3 hours ago, lanefu said: @FantasyCookie17 You may want to try the distro-provided hostapd rather than the armbian one.. it lacks some features, but maybe it'll work out for you. Which distro-provided hostapd? Afaict it just uses the one from the default Debian repositories.
lanefu Posted February 18, 2020 Posted February 18, 2020 52 minutes ago, FantasyCookie17 said: Which distro-provided hostapd? Afaict it just uses the one from the default Debian repositories. Okay were providing our own updated stable build with armbian. If you're using the standard debian one. It's probably an issue with the upstream wireless driver
Guest Posted February 21, 2020 Posted February 21, 2020 I found the issue now. This is not a bug, but rather a configuration mistake on my side. Really sorry for any trouble I caused. If you're having the same or similar issues: This WiFi chipset does not support IEEE 80.211W, I needed to disable that (generally different IEEE 80.211 standards may not be implemented with different chipsets, simply try disabling those). I actually had already tried disabling different config options, but apparently I forgot this one. Also you may need using a different service than the default one for starting hostapd. I created and shared one; see https://gitlab.com/FantasyCookie17/hostapd-start. Note it assumes you don't use NetworkManager or similar (though the defaullt service does as well). Also maybe wpa_disable_eapol_key_retries should be enabled by default by armbian-config when creating a hotspot to prevent KRACK attacks? It makes connecting to a WiFi slightly less reliable, however in return it will be much more secure.
Recommended Posts