Dear Toradex community,
I set both station- and access-point-mode on a Colibri iMX6ULL 512MB WB IT active. When I suspend/resume the board, the wifi (mlan0) works properly, but the access point (uap0) stops working!
To reproduce this behavior:
- have access point mode (hostapd) activated
hostapd_cli status
Selected interface 'uap0'
state=ENABLED
phy=phy0
freq=2417
num_sta_non_erp=0
num_sta_no_short_slot_time=0
num_sta_no_short_preamble=0
olbc=0
num_sta_ht_no_gf=0
num_sta_no_ht=0
num_sta_ht_20_mhz=0
num_sta_ht40_intolerant=0
olbc_ht=0
ht_op_mode=0x0
cac_time_seconds=0
cac_time_left_seconds=N/A
channel=2
secondary_channel=0
ieee80211n=1
ieee80211ac=0
ieee80211ax=0
beacon_int=100
dtim_period=2
ht_caps_info=000c
ht_mcs_bitmask=ffff0000010000000000
supported_rates=02 04 0b 16 0c 12 18 24 30 48 60 6c
max_txpower=20
bss[0]=uap0
bssid[0]=dc:f5:05:11:3f:9d
ssid[0]=MySSID
num_sta[0]=0
- have an active connection to an available wifi-network
wpa_cli status
Selected interface 'mlan0'
bssid=7a:ac:b9:04:eb:39
freq=5180
ssid=solveNet-TestRoom
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.2.12
address=dc:f5:05:11:3d:9d
uuid=e415156a-49ee-5739-a60d-b078fb834e37
- have both interfaces enabled and active
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: mlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:f5:05:11:3d:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.2.12/24 brd 192.168.2.255 scope global mlan0
valid_lft forever preferred_lft forever
inet6 fe80::def5:5ff:fe11:3d9d/64 scope link
valid_lft forever preferred_lft forever
3: uap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:f5:05:11:3d:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global uap0
valid_lft forever preferred_lft forever
inet6 fe80::def5:5ff:fe11:3f9d/64 scope link
valid_lft forever preferred_lft forever
- perform a suspend/resume
echo mem > /sys/power/state
[ 3060.319433] PM: suspend entry (deep)
[ 3060.341313] Filesystems sync: 0.018 seconds
[ 3060.348221] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 3060.356941] OOM killer disabled.
[ 3060.360181] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 3060.373829] mwifiex_sdio mmc1:0001:1: info: successfully disconnected from 7a:ac:b9:04:eb:39: reason code 3
[ 3060.387268] mwifiex_sdio mmc1:0001:1: None of the WOWLAN triggers enabled
[ 3060.528279] PM: suspend devices took 0.160 seconds
[ 3060.535682] Disabling non-boot CPUs ...
[ 3060.568440] PM: resume devices took 0.030 seconds
[ 3060.573166] OOM killer enabled.
[ 3060.576308] Restarting tasks ... done.
[ 3060.617173] PM: suspend exit
root@Checkbox20-00001:~# [ 3063.325567] mwifiex_sdio mmc1:0001:1: info: trying to associate to 'solveNet-TestRoom' bssid 7a:ac:b9:03:eb:39
[ 3063.353196] mwifiex_sdio mmc1:0001:1: info: associated to bssid 7a:ac:b9:03:eb:39 successfully
[ 3063.411990] IPv6: ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready
- → the access point stopped working
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: mlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:f5:05:11:3d:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.2.12/24 brd 192.168.2.255 scope global mlan0
valid_lft forever preferred_lft forever
inet6 fe80::def5:5ff:fe11:3d9d/64 scope link
valid_lft forever preferred_lft forever
3: uap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether dc:f5:05:11:3d:9d brd ff:ff:ff:ff:ff:ff
inet6 fe80::def5:5ff:fe11:3f9d/64 scope link
valid_lft forever preferred_lft forever
My environment:
- Viola Plus carrier board
- Yocto-build as follows
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-tdx-linux-gnueabi"
MACHINE = "colibri-imx6ull"
DISTRO = "tdx-none"
DISTRO_VERSION = "5.7.0-devel-20220809070425+build.0"
TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU = "hard"
meta-toradex-nxp = "HEAD:ee63c90fde9fde0229bff9ac1c5cffe356fc4f41"
meta-freescale = "HEAD:c4347b507c2ba0d7eb3917303f83631244bf5048"
meta-freescale-3rdparty = "HEAD:88773cbb6367496b1a2ddca683afcd352be3cd58"
meta-toradex-tegra = "HEAD:f5753af4a5b9d33f0f474b320a74c2e29a66ec39"
meta-toradex-bsp-common = "HEAD:029a663150449a5e71b84dd4000476754d525c8c"
meta-oe
meta-filesystems
meta-initramfs
meta-networking
meta-multimedia
meta-python
meta-webserver = "HEAD:52cee67833d1975a5bd52e4556c4cd312425a017"
meta-freescale-distro = "HEAD:5d882cdf079b3bde0bd9869ce3ca3db411acbf3b"
meta-checkbox = "HEAD:770ccb49ac3d2a335a9e60da841f732c4885d566"
- wpa_supplicant.service
cat /lib/systemd/system/wpa_supplicant.service
[Unit]
Description=WPA supplicant
Requires=sys-subsystem-net-devices-mlan0.device
After=sys-subsystem-net-devices-mlan0.device
Before=network.target
Wants=network.target
[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant.conf -i mlan0 -u
[Install]
WantedBy=multi-user.target
Alias=dbus-fi.w1.wpa_supplicant1.service
- hostapd.service
cat /lib/systemd/system/hostapd.service
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target
[Service]
Type=forking
PIDFile=/run/hostapd.pid
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf -P /run/hostapd.pid -B
[Install]
WantedBy=multi-user.target
- wpa_supplicant.conf
cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
config_methods=push_button
network={
ssid="solveNet-TestRoom"
psk="psk"
}
- hostapd.conf (only my changed properties)
interface=uap0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MySSID
country_code=AT
hw_mode=g
channel=2
- mwifiex
dmesg | grep mwifiex
[ 15.920686] mwifiex_sdio mmc1:0001:1: WLAN is not the winner! Skip FW dnld
[ 16.430618] mwifiex_sdio mmc1:0001:1: WLAN FW is active
[ 16.467616] mwifiex_sdio mmc1:0001:1: Unknown api_id: 3
[ 16.473182] mwifiex_sdio mmc1:0001:1: Unknown api_id: 4
[ 16.478494] mwifiex_sdio mmc1:0001:1: Unknown GET_HW_SPEC TLV type: 0x217
[ 16.586525] mwifiex_sdio mmc1:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p197)
[ 16.594809] mwifiex_sdio mmc1:0001:1: driver_version = mwifiex 1.0 (16.68.1.p197)
Does anyone have an idea how to solve this problem?