rednoka Posted May 22, 2019 Posted May 22, 2019 (edited) Armbianmonitor: http://ix.io/1JIM I am not experienced on the Linux networking so please tolerate my ignorance. 1.) I am trying to create an wireless access point on "Orange Pi Zero Plus 2 H3" board. And I fail... 2.) I am using Armbian image: Armbian_5.76_Orangepizeroplus2-h3_Ubuntu_xenial_next_4.19.21.img 3.) I am using nmcli for this purpose: https://gist.github.com/narate/d3f001c97e1c981a59f94cd76f041140 nmcli con add type wifi ifname wlan0 con-name MyAccessPoint autoconnect yes ssid MyAccessPoint nmcli con modify MyAccessPoint 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared nmcli con modify MyAccessPoint wifi-sec.key-mgmt wpa-psk nmcli con modify MyAccessPoint wifi-sec.psk "1234567890" nmcli con up MyAccessPoint 4.) When I look at the syslog it fails like: May 22 08:24:52 localhost NetworkManager[738]: <info> [1558513492.3757] Config: added 'key_mgmt' value 'WPA-PSK' May 22 08:24:52 localhost NetworkManager[738]: <info> [1558513492.3758] Config: added 'psk' value '<omitted>' May 22 08:24:52 localhost NetworkManager[738]: <info> [1558513492.3794] sup-iface[0x2dd8d8,wlan0]: config: set interface ap_scan to 2 May 22 08:24:53 localhost wpa_supplicant[1099]: wlan0: Failed to start AP functionality May 22 08:24:53 localhost NetworkManager[738]: <info> [1558513493.4425] device (wlan0): supplicant interface state: inactive -> disconnected 5.) Failed to start AP functionality message is coming from ap.c in wpa_supplicant code: if ( wpa_drv_associate(wpa_s, ¶ms) < 0) { wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality"); return -1; } It seems the wpa_supplicant cannot match requested parameters with a wifi driver. 6.) I have read: 7.) When I do: echo 'options dhd op_mode=2' >/etc/modprobe.d/ap6212.conf rmmod dhd && modprobe dhd modeprobe complains: modprobe: FATAL: Module dhd not found in directory /lib/modules/4.19.21-sunxi 8. Lastly; What is "dhd module"? How can I enable it? How can I create a wireless access point? Regards... Edited May 22, 2019 by rednoka
Igor Posted May 23, 2019 Posted May 23, 2019 19 hours ago, rednoka said: How can I create a wireless access point? nmcli has troubles in our world. I recommend setting up AP this way:https://twitter.com/armbian/status/932672897163890688
rednoka Posted May 23, 2019 Author Posted May 23, 2019 Thanx Igor... I will try your suggestion today... By the way, I researched more... Just for general knowledge for interested; wireless chip on Orange Pi Zero Plus 2 is AP6212 and it's kernel module on the mainline kernel is brcmfmac. The other module, dhd, is used on the sunxi-3.4 legacy kernel. For anybody interested: http://linux-sunxi.org/Wifi Another thing (to my surprise) nmcli worked on Raspberry Pi without needing any change...
Igor Posted May 23, 2019 Posted May 23, 2019 11 minutes ago, rednoka said: Thanx Igor... I will try your suggestion today... By the way, I researched more... Just for general knowledge for interested; wireless chip on Orange Pi Zero Plus 2 is AP6212 and it's kernel module on the mainline kernel is brcmfmac. The other module, dhd, is used on the sunxi-3.4 legacy kernel. For anybody interested: http://linux-sunxi.org/Wifi Another thing (to my surprise) nmcli worked on Raspberry Pi without needing any change... Each kernel has its own version of the driver. Some needs special handling for AP mode and on some its (temporally?) broken. RPi is different hardware, has different kernel but by coincidence similar chip. One can not conclude anything from this mess. 22 hours ago, rednoka said: I am not experienced on the Linux networking so please tolerate my ignorance. That's why I provide you safest option. In general, be (very) skeptical what you read around on the internet. Do some testings, read, test more, ...
rednoka Posted May 23, 2019 Author Posted May 23, 2019 Dear Igor, I tried to use armbian-config (as your link suggested) to create a Hotspot but it fails... I will try to capture the failures... But even it works, it doesn't solve my problem. What I want is to be able to create and destroy wireless access point programmatically and only on certain conditions.
Igor Posted May 23, 2019 Posted May 23, 2019 (edited) 21 minutes ago, rednoka said: Another thing (to my surprise) nmcli worked on Raspberry Pi without needing any change... Troubles means it can works under certain conditions, but sometimes or mostly not. 4 minutes ago, rednoka said: Dear Igor, I tried to use armbian-config (as your link suggested) to create a Hotspot but it fails... I will try to capture the failures... But even it works, it doesn't solve my problem. What I want is to be able to create and destroy wireless access point programmatically and only on certain conditions. Aha. I see now what is the problem. You need to have active internet connection to setup AP. If your only adaptor is already connected, you can not add AP to id. That is not supported in this driver/chip version. And if it would, performance would sucks. Edited May 23, 2019 by Igor adding "not"
rednoka Posted May 23, 2019 Author Posted May 23, 2019 Dear Igor, I will try to establish an access point using hostapd directly instead of nmcli. I will also look at the armbian-config code. I will post the progress and maybe ask more. Thanx your prompt responses. 1
rednoka Posted May 23, 2019 Author Posted May 23, 2019 Dear Igor, Quote Aha. I see now what is the problem. You need to have active internet connection to setup AP. If your only adaptor is already connected, you can not add AP to id. That is not supported in this driver/chip version. And if it would, performance would sucks. This, "you need to have an active internet connection to setup AP" confused me a bit... I don't want to "share" the internet from another channel (another wifi or GPRS/3G) from my device... Basically my Orange Pi device will sit on a long pole and will create a WiFi access point at a definite time (between 23:00 and 24:00 for example) and my sensors will join the WiFi network Orange Pi created and send their data to Orange Pi. And at another certain time (for example every Sunday between 13:00 and 16:00) a mobile device with WiFi will come to collect data from Orange Pi. This time Orange Pi will join the mobile device's WiFi. For all this, only one WiFi adaptor should suffice without any internet connection.
rednoka Posted May 23, 2019 Author Posted May 23, 2019 Dear Igor, I have succeeded to create a standalone access point. The problem is coming from TKIP (Temporal Key Integrity Protocol) used in WPA. I think one of the ciphering algorithms needed by TKIP is not installed in the kernel, it may be arc4. Are we setting CONFIG_CRYPTO_ARC4=y while building kernel? I used another protocol then TKIP in hostapd config and now I am OK.
Recommended Posts