Connection drops with imx7 picopi and yocto

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

Connection drops with imx7 picopi and yocto

Postby Maash » Fri May 25, 2018 12:43 pm


We are prototyping some NXP alexa stuff with picopi. Our main issue is the occasional connection drops that occur few times per day. Also sometimes also the connection fails even in previously connected networks.

We are using wpa_supplicant and udhcp. The disconnection reason is 1, 2, 3 or sometimes 16. This appens both with 5Ghz and 2.4Ghz networks. Note that the environment is pretty congested so band hops occur quite often. Some of the 2.4 drops might be due bands 13 and 14, however this also occurs in 5Ghz.
tn-imx_4.1.15_2.0.0_ga with NXP yocto image.

Driver version:
Driver: 1.141.92 (r)
Firmware: wl0: Apr 3 2014 12:12:42 version (r424058)
Chip: 4339 Rev 1 Pkg 2

hostapd v2.5
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <> and contributors


BusyBox v1.24.1 (2018-01-03 12:32:04 EET) multi-call binary.

Connection drop:
root@imx7d-pico:~# CFG80211-ERROR) wl_cfg80211_disconnect : Reason 3

CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_LINK

link down if wlan0 may call cfg80211_disconnected. event : 16, reason=2 from xx:xx:xx:xx:xx:xx

CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_DEAUTH

connection also fails occasionally:

udhcpc (v1.24.1) started
Successfully initialized wpa_supplicant
_dhd_wlfc_mac_entry_update():1649, entry(32)
Sending discover...
Sending discover...
CFG80211-ERROR) wl_cfg80211_connect : Connecting withe0:3f:49:ed:d2:b4 channel (48) ssid "xxxx", len (8)

connect failed event=0 e->status 1 e->reason 0
CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
Sending discover...
CFG80211-ERROR) wl_cfg80211_connect : Connecting withff:ff:ff:ff:ff:ff channel (48) ssid "xxxx", len (8)
CFG80211-ERROR) wl_run_escan : Escan set error (-16)
CFG80211-ERROR) wl_run_escan : error (-16)
CFG80211-ERROR) __wl_cfg80211_scan : Scan err = (-16), busy?-16
CFG80211-ERROR) wl_cfg80211_scan : scan error (-16

This is how we currently we enable the wifi at startup:
modprobe bcmdhd
echo 0 > /sys/module/bcmdhd/parameters/op_mode
rfkill unblock wlan
killall wpa_supplicant
killall hostapd
killall udhcpd
killall udhcpc
udhcpc -i wlan0 &
wpa_supplicant -dd -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf &

We've also turned the power save off from the module:
iw dev wlan0 set power_save off

However not quite sure if it has any noticeable effect. We also noticed complains about lack of random numbers, so we started using haveged. It seemed to help.

Trace from the start (successful):
udhcpc (v1.24.1) started
dhd_aoe_hostip_clr failed code -23
aoe_update_host_ipv4_table failed
_dhd_wlfc_mac_entry_update():1649, entry(32)
Sending discover...
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line: 1 - start of a new network block
ssid - hexdump_ascii(len=8):
43 72 65 6f 69 72 5f 35 xxxxx
PSK (ASCII passphrase) - hexdump_ascii(len=14): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='xxxxx'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0x1f flags 0x0
WEXT: Driver: bcmsdh_sdmmc
netlink: Operstate: ifindex=6 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: 28:ed:e0:14:26:f1
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address: 0ddd582c-13c4-54d5-aff9-2e3edd8ef360
GnuTLS: Library version 3.4.9 (runtime) - 3.4.9 (build)
EAPOL: Supplicant port status: Unauthorized
EAP: EAP entering state DISABLED
wlan0: Added interface wlan0
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Sending discover...
CFG80211-ERROR) wl_cfg80211_connect : Connecting withe0:3f:49:ed:d2:b4 channel (48) ssid "xxxxx", len (8)

wl_bss_connect_done succeeded with e0:3f:49:ed:d2:b4
wl_bss_connect_done succeeded with e0:3f:49:ed:d2:b4
Sending discover...
Sending select for
Lease of obtained, lease time 172800
/etc/udhcpc.d/50default: Adding DNS

Any ideas would be appreciated. Also possible debug parameters fe for the bcom driver, etc.
Posts: 3
Joined: Tue Dec 12, 2017 12:11 pm

Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 15 guests