AlterX Posted June 14, 2018 Posted June 14, 2018 Hi, I just migrated to armbian freom bananian using exactly the same hardware components (that were working well with bananian) and now after let armbian auto configure the wifi AP with armbian-config, I can see many problems in starting hostad: Spoiler hostapd v2.5 for Realtek rtl871xdrv root@bananapi:~# hostapd -d /etc/hostapd.conf random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd.conf ctrl_interface_group=0 drv->ifindex=4 l2_sock_recv==l2_sock_xmit=0x0x16e1ae8 BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits) Completing interface initialization Mode: IEEE 802.11g Channel: 5 Frequency: 2432 MHz DFS 0 channels required radar detection RATE[0] rate=10 flags=0x1 RATE[1] rate=20 flags=0x1 RATE[2] rate=55 flags=0x1 RATE[3] rate=110 flags=0x1 RATE[4] rate=60 flags=0x0 RATE[5] rate=90 flags=0x0 RATE[6] rate=120 flags=0x0 RATE[7] rate=180 flags=0x0 RATE[8] rate=240 flags=0x0 RATE[9] rate=360 flags=0x0 RATE[10] rate=480 flags=0x0 RATE[11] rate=540 flags=0x0 hostapd_setup_bss(hapd=0x16e2170 (wlxe8de279f1eae), first=1) wlxe8de279f1eae: Flushing old station entries ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported wlxe8de279f1eae: Could not connect to kernel driver wlxe8de279f1eae: Deauthenticate all stations +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2 rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=0) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=1) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=2) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=3) Using interface wlxe8de279f1eae with hwaddr e8:de:27:9f:1e:ae and ssid "ARMBIAN" Deriving WPA PSK based on passphrase SSID - hexdump_ascii(len=7): 41 52 4d 42 49 41 4e ARMBIAN PSK (ASCII passphrase) - hexdump_ascii(len=11): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] rtl871x_set_wps_assoc_resp_ie ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported random: Got 20/20 bytes from /dev/random GMK - hexdump(len=32): [REMOVED] Key Counter - hexdump(len=32): [REMOVED] WPA: Delay group state machine start until Beacon frames have been configured rtl871x_set_beacon_ops rtl871x_set_hidden_ssid_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set beacon parameters wlxe8de279f1eae: Flushing old station entries ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported wlxe8de279f1eae: Could not connect to kernel driver wlxe8de279f1eae: Deauthenticate all stations +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=3 rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=0) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=1) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=2) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=3) hostapd_free_hapd_data(wlxe8de279f1eae) rtl871x_set_wps_assoc_resp_ie ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Interface initialization failed wlxe8de279f1eae: interface state UNINITIALIZED->DISABLED wlxe8de279f1eae: AP-DISABLED wlxe8de279f1eae: Unable to setup interface. hostapd_interface_deinit_free(0x16e1550) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x16e1550) wlxe8de279f1eae: interface state DISABLED->DISABLED hostapd_bss_deinit: deinit bss wlxe8de279f1eae wlxe8de279f1eae: Flushing old station entries ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported wlxe8de279f1eae: Could not connect to kernel driver wlxe8de279f1eae: Deauthenticate all stations +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=3 rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=0) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=1) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=2) rtl871x_set_key_ops ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported Failed to set encryption. Failed to clear default encryption keys (ifname=wlxe8de279f1eae keyidx=3) wlxe8de279f1eae: AP-DISABLED hostapd_cleanup(hapd=0x16e2170 (wlxe8de279f1eae)) hostapd_free_hapd_data: Interface wlxe8de279f1eae wasn't started hostapd_interface_deinit_free: driver=0x48cac0 drv_priv=0x16e1a70 -> hapd_deinit hostapd_interface_free(0x16e1550) hostapd_interface_free: free hapd 0x16e2170 hostapd_cleanup_iface(0x16e1550) hostapd_cleanup_iface_partial(0x16e1550) hostapd_cleanup_iface: free iface=0x16e1550 ELOOP: remaining socket: sock=6 eloop_data=0x16e1b78 user_data=(nil) handler=0x447df5 Can someone give me a hint? Thanks Gio
Igor Posted June 14, 2018 Posted June 14, 2018 1 hour ago, Gianni Romano said: I just migrated to armbian freom bananian using exactly the same hardware components And why do you hide information about your hardware and ask for help? Provide full logs with: armbianmonitor -u and hope that someone will see what is the problem. Bananian had two kernels, Armbian has three ... Edit: i havent notice before. Armbian-config way of setting AP sometimes doesn't succedd. In that case you are on your own. Like you were on Bananian. Manual way ...
AlterX Posted June 14, 2018 Author Posted June 14, 2018 I am sorry, but I don't know really the system. This is the output: armbianmonitor -u I have recompiled the latest hostapd 2.6 and applied the realtek patch; the result is the same. dnsmasq is working well. What I have noted is: wlxe8de279f1eae: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.24.1.1 netmask 255.255.255.0 broadcast 172.24.1.255 ether e8:de:27:9f:1e:ae txqueuelen 1000 (Ethernet) RX packets 1 bytes 0 (0.0 B) RX errors 0 dropped 6 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 As you can see the wifi device is UP but not RUNNING and I don't know how to fix this...on bananian it was "easy" nevertheless I performed everything on my own.
Igor Posted June 14, 2018 Posted June 14, 2018 10 minutes ago, Gianni Romano said: I am sorry, but I don't know really the system. This is the output: armbianmonitor -u The link is invalid. Most likely you only need to add wireless interface name to the Network manager exceptions and restart it. Check and add here: /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
AlterX Posted June 14, 2018 Author Posted June 14, 2018 17 minutes ago, Igor said: The link is invalid. Most likely you only need to add wireless interface name to the Network manager exceptions and restart it. Check and add here: /etc/NetworkManager/conf.d/10-ignore-interfaces.conf I set it in that file unfortunately same result link for monitor: http://ix.io/1dnw
Igor Posted June 14, 2018 Posted June 14, 2018 21 minutes ago, Gianni Romano said: I set it in that file unfortunately same result Then "Armbian support team" can't help. 3rd party hardware and applications have no place in a technical support section. Moved elsewhere. It's not related to our work, but most likely to upstream kernel drivers ... I can only wish you luck with finding better drivers.
AlterX Posted June 15, 2018 Author Posted June 15, 2018 In my humble understand, after I compiled also the realtek driver and always got the same error, is that the armbian kernel has a a glitch somewhere that is preventing rtl8188eu driver from working well... This is not a configuration problem on hostapd or other software, it is really something that is preventing the wifi dongle from being loaded correctly.
Igor Posted June 17, 2018 Posted June 17, 2018 On 6/15/2018 at 1:29 PM, Gianni Romano said: after I compiled also the realtek driver and always got the same error, is that the armbian kernel has a a glitch Most wireless drivers code is of low quality and it needs fixing that it's possible to build, than sometimes you need to fix it that it works ... Have you ever asked why certain drivers are not already a part of the mainstream kernel? Some drivers are. Because the code is good and compilation works. Even there, problems/regression is possible. There are extremely slim options that something is wrong with the kernel. You can switch to the beta repository and try two other kernels. First updated 4.14.y and 4.17.y and see if you get the same results. If none works ... you still can use old kernel (not recommended) or buy a well working and supported wifi dongle ... or dig into this driver issue on your own.
AlterX Posted June 18, 2018 Author Posted June 18, 2018 Ok, which dongle wifi you think if well supported?
Tido Posted June 18, 2018 Posted June 18, 2018 Ciao Gianni, At the bottom of this website you find some products, just click on it https://www.armbian.com/banana-pi-plus/
AlterX Posted June 18, 2018 Author Posted June 18, 2018 3 hours ago, Tido said: Ciao Gianni, At the bottom of this website you find some products, just click on it https://www.armbian.com/banana-pi-plus/ Ok thank you so much... I Will opt for this one although it is a bit too much: Edimax EW-7811UTC Strange that I cannot make my dongles work since I specifically bought those after searching for linux support...
Igor Posted June 19, 2018 Posted June 19, 2018 16 hours ago, Gianni Romano said: Strange that I cannot make my dongles work since I specifically bought those after searching for linux support... Linux support ... all those development boards are sold with "Linux support", while most of them are somewhere from usable, barely usable to not usable at all without extensive development and/or fixing such as we and other specialized groups do. Even those wireless adapters, which we have on the list as tested/supported, needs maintaining which costs us perhaps 30-50h per year. Each, well, not exactly each, kernel upgrade, breaks driver compilation and some code adjustment is needed. Usually, it's minor, but sometimes it can get messy. For example, I found out today, that our 8188EU patch breaks when compiling 4.17.2 / aarch64, this way: Spoiler CC [M] drivers/net/wireless/rtl8814au/hal/phydm/phydm_dfs.o CC [M] drivers/net/wireless/rtl8814au/hal/phydm/txbf/halcomtxbf.o CC [M] drivers/net/wireless/rtl8814au/hal/phydm/txbf/haltxbfinterface.o CC [M] drivers/net/wireless/rtl8814au/hal/phydm/txbf/phydm_hal_txbf_api.o CC [M] drivers/net/wireless/rtl8812au/hal/phydm/halphyrf_ce.o drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7814:3: error: ‘struct iw_handler_def’ has no member named ‘private’ .private = rtw_private_handler, ^~~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7814:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .private = rtw_private_handler, ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7814:13: note: (near initialization for ‘rtw_handlers_def.get_wireless_stats’) drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7815:3: error: ‘struct iw_handler_def’ has no member named ‘private_args’ .private_args = (struct iw_priv_args *)rtw_private_args, ^~~~~~~~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7815:18: warning: excess elements in struct initializer .private_args = (struct iw_priv_args *)rtw_private_args, ^ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7815:18: note: (near initialization for ‘rtw_handlers_def’) drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7816:3: error: ‘struct iw_handler_def’ has no member named ‘num_private’ .num_private = sizeof(rtw_private_handler) / sizeof(iw_handler), ^~~~~~~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7816:17: warning: excess elements in struct initializer .num_private = sizeof(rtw_private_handler) / sizeof(iw_handler), ^~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7816:17: note: (near initialization for ‘rtw_handlers_def’) drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7817:3: error: ‘struct iw_handler_def’ has no member named ‘num_private_args’ .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args), ^~~~~~~~~~~~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7817:22: warning: excess elements in struct initializer .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args), ^~~~~~ drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.c:7817:22: note: (near initialization for ‘rtw_handlers_def’) cc1: some warnings being treated as errors scripts/Makefile.build:312: recipe for target 'drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.o' failed make[4]: *** [drivers/net/wireless/rtl8188eu/os_dep/ioctl_linux.o] Error 1 make[4]: *** Waiting for unfinished jobs.... CC [M] drivers/net/wireless/rtl8814au/hal/phydm/phydm_kfree.o Sure it's fixable, but somebody has to donate his time and fix it. I hope you get a picture now. It's kernel version dependent as well.
AlterX Posted June 19, 2018 Author Posted June 19, 2018 Hi sure...I had already the picture of this. I know that steady efforts are always asked when other changes or improvements are coming in. I was just speaking about wifi dongles by the way. Anyway it might be that those wifi dongles I have are well supported as "standard" use of wifi (as client) and it might be that are not well supported to be APs. Anyway thanks for the support. I will first test it with a startech.com wifi dongle that seems to use the same realtek chip of Edimax one to see if it is working and how stable it is. Thanks so far Gianni
AlterX Posted June 19, 2018 Author Posted June 19, 2018 Ok I have reinstalled armbian and the dongle wifi at this point is UP and RUNNING...I configured the wifi to be AP I can connect thru wifi to the bananapi but no internet connection is available so it is not routing to the eth0 interface... I checked all, ip_forward is 1, rules in iptables are set and the default gateway is the one of the main router.
AlterX Posted June 19, 2018 Author Posted June 19, 2018 4 minutes ago, arox said: Does your router know it should send to bananapi ? What do you mean? Bananapi goes to internet thru eth0 over the main router. The wifi on bananapi is the AP and is not actually routing from wifi dongle to eth0 and thus to internet (thru the main router)
arox Posted June 19, 2018 Posted June 19, 2018 I suppose you have a host B that want to join Internet through A (bananapi) and Router R. In that case, B send packets to A, A forward packet to R, R forward to Internet. But the reverse path should be OK : R send packet to A when Internet reply to B. The normal, basic configuration should be that A - is configured as router (ip_forward = 1) - present 2 different neworks on etho and wlan0 - forward traffic by default to R (default route) But B should have default route to A and Router should have a route to B or network of B threw A. But this is just basic configuration, you can also bridge or subnet/proxy or nat or ... If you use bridging, wlxx interface should not have an address but be associated (with eth0) to a bridge (install bridge-utils) and forget about ip_forward or iptables
AlterX Posted June 20, 2018 Author Posted June 20, 2018 Yes that is done over NAT with iptables so bananapi has a wifi AP that is redirecting or should the traffic towards eth0 that is connected to the main router that provides internet access. Anyway I used armbian-config to automatically set the wifi AP and it seems to not work well, because after this problem of connectivity now I get problem with dnsmasq: systemctl status dnsmasq.service ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2018-06-19 22:05:19 CEST; 11h ago Process: 805 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2) Process: 786 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) Jun 19 22:05:19 bananapi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Jun 19 22:05:19 bananapi dnsmasq[786]: dnsmasq: syntax check OK. Jun 19 22:05:19 bananapi dnsmasq[805]: dnsmasq: failed to create listening socket for 172.24.1.1: Cannot assign requested address Jun 19 22:05:19 bananapi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2 Jun 19 22:05:19 bananapi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. Jun 19 22:05:19 bananapi systemd[1]: dnsmasq.service: Unit entered failed state. Jun 19 22:05:19 bananapi systemd[1]: dnsmasq.service: Failed with result 'exit-code'. and surprisingly the content of /etc/network/interfaces.d/armbian.ap.nat disappeared
Igor Posted June 20, 2018 Posted June 20, 2018 13 minutes ago, Gianni Romano said: Anyway I used armbian-config to automatically set the wifi AP and it seems to not work well This tool is and will probably remain in the beta state unless there will be extensive help with maintaining. It's a complex task to secure that this wizard operate stabile. I know it has many weaknesses ... and I have some ongoing plans on how to expand the tool and make it stronger. But life has other plans 13 minutes ago, Gianni Romano said: and surprisingly the content of /etc/network/interfaces.d/armbian.ap.nat disappeared If you disable AP with a tool, this is removed. Somehow expected behaviour.
AlterX Posted June 20, 2018 Author Posted June 20, 2018 Ok so now I am trapped because I have have enbled it again, but file is not there... Another issue comes: the dongle randomly switch off and is no more available! EDIT: I used again armbian-config to disable the AP (when this voice is popping up!) and I reinstalled the AP again; now it seems everything is working properly and also internet access is valid... I will now test the stability of the dongle and of the AP
AlterX Posted July 6, 2018 Author Posted July 6, 2018 So everything seems to work, but... I can only see the AP from smartphone or laptop but not from a PC either using an external dongle or the integrated one.
AlterX Posted July 30, 2018 Author Posted July 30, 2018 Sometimes it get stuck...it happend the first time after 2 weeks and now really often every second day...could it be the warm?
dony71 Posted February 5, 2019 Posted February 5, 2019 hotspot also no internet on BPI M2+ it should have on board ap6212 wifi any solution on this?
Tido Posted February 5, 2019 Posted February 5, 2019 11 minutes ago, dony71 said: no internet on BPI M2+ armbianmonitor -u tells the reader all the details about your Installation, like Kernel-Version and much more
Igor Posted February 5, 2019 Posted February 5, 2019 I hope you are using powered USB hub? Move to most recent kernel and try to use wireless without anything connected to the board. Then proceed with adding things ...
Recommended Posts