WiFi module sometimes not detected

Hi,
I seem to be having some issues with the Balena Fin (v1.0)'s built-in WiFi module - sometimes it is not detected on boot and I have to reboot the Balena Fin again for it to work. It doesn’t show up in NetworkManager ifconfig or in /sys/class/net/ .

Is there any way to reset the WiFi module if this happens? I’ve tried stopping NetworkManager, running ifconfig wlan0 down, removing the kernel module (sd8xxx) and loading it again. This works without any errors but it doesn’t get it working again. Is there any other way to reset the WiFi? For modems I know you can tell ModemManager to do a hardware reset of the modem but I’m not aware of an equivalent for WiFi.

Hi @joshbot can you tell us what version of balenaOS you are running on the fin? I have the 1.0 fin and have’t experienced it, but would love to see if I can reproduce it on mine so we can debug.

It would also be super helpful to have dmesg output from the device when it boots with a failed wifi module.

Hi @shaunmulligan, the balenaOS version is balenaOS 2.29.2+rev7. I will try and get hold of dmesg output when the issue next occurs.

thanks @joshbot, that will be super helpful. It would also be useful to know if you have any other devices connected to the board and how things are powered. Just so we have a full picture of your setup.

Thanks @shaunmulligan, at the moment there is just a Quectel EC25 modem connected and the Compute Module is a CM3+.

I’ve logged into the Fin and checked the dmesg logs, there appear to be a few warnings. Some are definitely WiFi related but I’m not sure whether or not the IOCTL ones are:

[ 5270.461430] IOCTL failed: b9fef000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 5318.636865] CMD_RESP: cmd 0xb5 error, result=0x1
[ 5318.636889] IOCTL failed: b9fe8000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6038.813022] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6038.813042] IOCTL failed: b9fee000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6380.847689] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6380.847710] IOCTL failed: b9feb000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6515.096501] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6515.096521] IOCTL failed: bc351000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6596.847423] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6596.847442] IOCTL failed: bc355000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6695.568681] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6695.568704] IOCTL failed: bc351800 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[ 6826.069173] CMD_RESP: cmd 0xb5 error, result=0x1
[ 6826.069217] IOCTL failed: bbc24000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
[10141.153299] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[10141.171148] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[10141.244043] IOCTL failed: a468ec00 id=0x10000, sub_id=0x10003 action=1, status_code=0x80000007
[10141.279534] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[10141.288622] IPv6: ADDRCONF(NETDEV_UP): wwan0: link is not ready
[10141.738516] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[12331.941287] get_channel when STA is not connected
[12331.963958] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[12332.051954] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[12332.452567] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[12332.643561] IPv6: ADDRCONF(NETDEV_UP): wwan0: link is not ready

Checking with our team based on your information and will follow up soon.

Hey @joshbot , I have a fin 1.0 and a Quectel EG25-G (new drop in replacement for the EC25) perhaps if you can give me some pointers on how to reproduce and I can try get to the bottom of it. Things of particular interest for me for the repro is if your Application code does anything with the hostOS networking stack, like running wifi-connect or interacting with NetworkManager or ModemManager via dbus? Any other info on your application would also help.

Thanks @shaunmulligan, the application code is communicating to NetworkManager and ModemManager, both via dbus.

Hi @joshbot,

We identified the issue that causes the WiFi module to not be detected on boot sometimes. We need to patch a kernel driver to employ a a better power up sequence for it. It is in our list with priority fixes for the Fin. We will post an update here once we are ready.

Thanks,
Zahari

Hi @majorz, thanks for your response, do you guys have any idea when this will be fixed? The WiFi functionality is quite critical to what our business is using the Fins for.

1 Like

Dmesg logs of when it fails:
dmesg.log (24.4 KB)
dmesg.log (24.5 KB)

Normal operation logs:
dmesg.log (24.9 KB)

Hi @joshbot, I hope that we will have the fix ready next week. This is very high priority on my task list. Here is the relevant ticket for this: https://github.com/balena-os/balena-raspberrypi/issues/330
Thanks,
Zahari

Any updates on this?

No update yet, but we are getting closer. I do not think we will be able to complete it this week, but hopefully next week it will be resolved.

Update: it looks like the fix was released in balenaOS v2.38.3+rev9 or later, which will be available in production soon.

Hi, we have released OS version 2.43.0+rev1 for the Balena Fin. Can you please test this new release and let us know if it fixes the issue?

Hi,
Unfortunately we have decided to stop using Balena Fins due to the WiFi issue which took a while to be fixed, and also an issue with overheating. Both of these were critical for our business as we need the devices to work reliably when deployed in the field. We hope you can find someone to test this for you and will keep an eye open for further developments and improvements you may make.

Thanks for coming back to us. Unfortunately yes, it took a little more than we wanted to get these fixes out. Have you also had communication with us on the overheating issue? Sorry if you did and I am not aware, I just want to let the relevant people from Balena know this in case they are not aware.