oblique/create_ap

Hotspot created but cannot be discovered

fevsoftware opened this issue · 0 comments

Hi,

Recently I decided to switch my WIFI card from EMMY-W163 (datasheet: https://www.u-blox.com/sites/default/files/EMMY-W1_DataSheet_%28UBX-15011785%29.pdf) to WPEA-121N (https://www.sparklan.com/product/wpea-121n-ar9382-2t2r-wifi-module/). I am using a custom computer with Nitrogen6 SOM V2 (https://boundarydevices.com/product/nitrogen6-som-v2/). I use ubuntu 16.04.1LTS, kernel 4.1.15.

One of tasks I preform on this computer is to create a hotspot.

When using EMMY card, I can create hotspot using create_ap script with config:

CHANNEL=6 

GATEWAY=192.168.10.1 

NEW_MACADDR= 

SSID=MySSID 

PASSPHRASE=MYPassword 

WIFI_IFACE=mlan1 

WPA_VERSION=1+2 

ETC_HOSTS=0 

DHCP_DNS=gateway 

NO_DNS=1 

HIDDEN=0 

ISOLATE_CLIENTS=0 

SHARE_METHOD=none 

IEEE80211N=1 

IEEE80211AC=0 

HT_CAPAB= 

VHT_CAPAB= 

DRIVER=nl80211 

NO_VIRT=1 

COUNTRY=DE 

FREQ_BAND=2.4 

DAEMONIZE=0 

NO_HAVEGED=0 

INTERNET_IFACE= 

USE_PSK=0 

It works without any problems. Now when I change card for WPEA and try to create hotspot using create_ap (modifying config parameter WIFI_IFACE first) I get.

lspci -v 

00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01) (prog-if 00 [Normal decode]) 

	Flags: bus master, fast devsel, latency 0, IRQ 311 

	Memory at 01000000 (32-bit, non-prefetchable) [size=1M] 

	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 

	Memory behind bridge: 01100000-011fffff 

	Prefetchable memory behind bridge: 01200000-012fffff 

	[virtual] Expansion ROM at 01300000 [disabled] [size=64K] 

	Capabilities: <access denied> 

	Kernel driver in use: pcieport 

  

01:00.0 Network controller: Qualcomm Atheros AR93xx Wireless Network Adapter (rev 01) 

	Subsystem: Qualcomm Atheros AR93xx Wireless Network Adapter 

	Flags: bus master, fast devsel, latency 0, IRQ 343 

	Memory at 01100000 (64-bit, non-prefetchable) [size=128K] 

	[virtual] Expansion ROM at 01200000 [disabled] [size=64K] 

	Capabilities: <access denied> 

	Kernel driver in use: ath9k 

	Kernel modules: ath9k 

I checked that WPEA card supports AP mode:

iw list 

* 

Supported interface modes: 

		 * IBSS 

		 * managed 

		 * AP 

		 * AP/VLAN 

		 * WDS 

		 * monitor 

		 * P2P-client 

		 * P2P-GO 

* 

Running create_ap on computer with WPEA card:

sudo /opt/scripts/create_ap --config /etc/opt/config/create_ap.conf 

Config dir: /tmp/create_ap.wlp1s0.conf.W9XzBnhu 

PID: 7302 

Network Manager found, set wlp1s0 as unmanaged device... DONE 

No Internet sharing 

hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp1s0.conf.W9XzBnhu/hostapd_ctrl 

WARN: Low entropy detected. We recommend you to install `haveged' 

Configuration file: /tmp/create_ap.wlp1s0.conf.W9XzBnhu/hostapd.conf 

wlp1s0: interface state UNINITIALIZED->COUNTRY_UPDATE 

Using interface wlp1s0 with hwaddr 00:0e:8e:88:8a:5d and ssid "AirRate_21_005" 

random: Only 16/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 

wlp1s0: interface state COUNTRY_UPDATE->ENABLED 

wlp1s0: AP-ENABLED 

Low entropy warning also occurs when I run this script on EMMY card so I do not think it is causing problems with hotspot.

Journalctl logs:

Mar 26 13:57:28 nitrogen sudo[6593]:   ubuntu : TTY=tty1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/opt/fev/fach/FachWebServer/scripts/create_ap --config /etc/opt/fach/config/create_ap.conf 

Mar 26 13:57:28 nitrogen sudo[6593]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0) 

Mar 26 13:57:29 nitrogen NetworkManager[2235]: <info>  [1616763449.0499] reload configuration (signal Hangup)... 

Mar 26 13:57:29 nitrogen NetworkManager[2235]: <info>  [1616763449.0518] config: update /etc/NetworkManager/NetworkManager.conf (etc: default-wifi-powersave-on.conf) (SIGHUP,values,values-user) 

Mar 26 13:57:29 nitrogen NetworkManager[2235]: <info>  [1616763449.0576] get unmanaged devices count: 1 

Mar 26 13:57:29 nitrogen NetworkManager[2235]: <info>  [1616763449.0578] device (wlp1s0): state change: disconnected -> unmanaged (reason 'unmanaged') [30 10 3] 

Mar 26 13:57:29 nitrogen wpa_supplicant[2075]: nl80211: deinit ifname=wlp1s0 disabled_11b_rates=0 

Mar 26 13:57:32 nitrogen kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready 

Mar 26 13:57:32 nitrogen dnsmasq[6779]: started, version 2.75 DNS disabled 

Mar 26 13:57:32 nitrogen dnsmasq[6779]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify 

Mar 26 13:57:32 nitrogen dnsmasq-dhcp[6779]: DHCP, IP range 192.168.10.1 -- 192.168.10.254, lease time 1d 

Mar 26 13:57:33 nitrogen kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.1928] reload configuration (signal Hangup)... 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.1947] config: update /etc/NetworkManager/NetworkManager.conf (etc: default-wifi-powersave-on.conf) (SIGHUP,values,values-user) 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.2008] get unmanaged devices count: 1 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.2010] device (wlp1s0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2] 

Mar 26 13:58:19 nitrogen kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready 

Mar 26 13:58:19 nitrogen kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready 

Mar 26 13:58:19 nitrogen kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready 

Mar 26 13:58:19 nitrogen sudo[6593]: pam_unix(sudo:session): session closed for user root 

Mar 26 13:58:19 nitrogen wpa_supplicant[2075]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none 

Mar 26 13:58:19 nitrogen wpa_supplicant[2075]: dbus: Failed to construct signal 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.3354] device (wlp1s0): supplicant interface state: starting -> ready 

Mar 26 13:58:19 nitrogen NetworkManager[2235]: <info>  [1616763499.3371] device (wlp1s0): state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42] 

Mar 26 13:58:19 nitrogen kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready 

Mar 26 13:58:22 nitrogen NetworkManager[2235]: <info>  [1616763502.3468] device (wlp1s0): supplicant interface state: ready -> inactive 

 

 

ubuntu@nitrogen:~$ ifconfig  

eth0      Link encap:Ethernet  HWaddr 00:19:b8:03:85:35   

          inet addr:192.168.8.10  Bcast:192.168.8.255  Mask:255.255.255.0 

          inet6 addr: fe80::219:b8ff:fe03:8535/64 Scope:Link 

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 

          RX packets:1001 errors:0 dropped:0 overruns:0 frame:0 

          TX packets:596 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:1000  

          RX bytes:97071 (97.0 KB)  TX bytes:78277 (78.2 KB) 

  

lo        Link encap:Local Loopback   

          inet addr:127.0.0.1  Mask:255.0.0.0 

          inet6 addr: ::1/128 Scope:Host 

          UP LOOPBACK RUNNING  MTU:65536  Metric:1 

          RX packets:1181693 errors:0 dropped:0 overruns:0 frame:0 

          TX packets:1181693 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:0  

          RX bytes:364159273 (364.1 MB)  TX bytes:364159273 (364.1 MB) 

  

wlp1s0    Link encap:Ethernet  HWaddr 00:0e:8e:88:8a:5d   

          UP BROADCAST MULTICAST  MTU:1500  Metric:1 

          RX packets:4081 errors:0 dropped:0 overruns:0 frame:0 

          TX packets:1096 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:1000  

          RX bytes:178581 (178.5 KB)  TX bytes:151807 (151.8 KB) 

But wifi network cannot be found (it is also not a hidden network)

When I try to connect to other Wi-Fi, I can only connect to ones that are not encrypted. When trying to connect to encrypted ones I get:

sudo nmcli device wifi connect mynetwork password mypassword 

Error: Connection activation failed: (7) Secrets were required, but not provided. 

I also tried to set hotspot using nmcli/nmtui and hostapd commends, with similar results.

For me the most important thing is to use the device as a hotspot.