AnsweredAssumed Answered

wlan0 interface up but not RUNNING

Question asked by Andro Nooh on Feb 13, 2019
Latest reply on Feb 21, 2019 by Andy .

I'm using the IMX7-Dual board to configure the drivers to run in AP mode. I've followed the instructions from Wi-Fi/Bluetooth for Linux and Android: Getting ... | Cypress Developer Community  and downloaded the drivers and a Linux Kernel. I followed all the steps provided in that link and was able to compile/load and get the board to associate to an open WLAN, and then also to a secured (WPA2-PSK) WLAN.

Now, I'm trying to get the board to run in AP mode. I bring up the wireless interface (wlan0) with the following command sequence:

ifconfig wlan0
ifconfig wlan0 up

wl -i wlan0 down
wl -i wlan0 ap 1
wl -i wlan0 country US
wl -i wlan0 5g_rate auto
wl -i wlan0 bw_cap 5g 0x7
wl -i wlan0 ssid "001_mesh_open"
wl -i wlan0 bss 1
wl -i wlan0 chanspec 36/20
wl -i wlan0 txchain 7
wl -i wlan0 rxchain 7
wl -i wlan0 up
wl -i wlan0 bss 1
wl -i wlan0 status
wl -i wlan0 msglevel + assoc + error + info

ifconfig wlan0 up


With this sequence of commands, the board is able to broadcast an SSID (001_mesh_open) and a client is able to associate, however, the client does not get an IP address and when configured with a static IP address that's in the same network as the configured IP address of wlan0, traffic does not pass. 

# wl assoclist
assoclist 8C:85:90:A8:FF:01


On checking wlan0, its status is UP, but not RUNNING! (This seems to be the main issue)

When the board is acting as a STA, wlan0 shows as UP and RUNNING. 

# # logs for when using board as AP
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr A4:08:EA:E1:A1:B0
RX packets:77 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18475 (18.0 KiB) TX bytes:0 (0.0 B)





# dmesg | tail

IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
random: crng init done


The devices are all unblocked for the wireless interface:
# rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no


Trying to bring up the wireless interface with ifup wlan0 doesn't seem to do anything. 

# ifdown wlan0
# ifup wlan0


Checking the IP link, it says "No-Carrier"

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
link/ether 00:04:9f:05:24:eb brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq qlen 1000
link/ether 00:04:9f:05:24:ec brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1
link/ipip brd
5: gre0@NONE: <NOARP> mtu 1476 qdisc noop qlen 1
link/gre brd
6: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
7: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1
link/sit brd
8: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether a4:08:ea:e1:a1:b0 brd ff:ff:ff:ff:ff:ff


The interfaces file is as follows:

# cat /etc/network/interfaces
# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

# allow-hotplug wlan0
iface wlan0 inet dhcp




My questions:

Why is the link not RUNNING? Is there something that I am missing? Is the driver capable of operating in an AP mode? Is there kernel support for driver to operate in AP mode?

Any help in debugging this issue is appreciated.