Bluetooth dies on the Beaglebone Green Wireless

I’m having some issues with Bluetooth on the Beaglebone Green Wireless. The wl18xx module seems to stop working after a period of time (still trying to work out exactly how long). It doesn’t start working again until I power-cycle the board.

I’ve managed to reproduce the issue with a fresh BBGW (straight out of the box) with the latest image from beagleboard.org ( AM3358 Debian 10.3 2020-04-06 4GB eMMC IoT Flasher) and no modifications.

Steps to reproduce:

  1. sudo hcitool lescan
  2. leave it running
  3. wait about 20min

Output stops. Running sudo hcitool lescan again has no output. Restarting the board is the only way to recover.

I also noticed that the wifi AP also goes down at the same time which seems to indicate it’s an issue with the wireless module.

I found one other person who had similar issues but no solution:

There’s nothing remarkable in the logs at the point where it fails that I’ve been able to see.

Is there anything else I can try?

Please give this image a test:

https://rcn-ee.net/rootfs/bb.org/testing/2021-02-08/buster-iot/

I’ve got 2 bbgw’s with an uptime of almost 24 hours… (WiFi connected…)

http://gfnd.rcn-ee.org:81/farm/uptime/

pwr15-ser23-bbgw-4.19.94-ti-r58.log
[bbgw-pwr15-ser23: 4.19.94-ti-r58 (up 3 days, 23 hours, 43 minutes)]
pwr16-ser24-bbgw-4.19.94-ti-rt-r58.log
[bbgw-pwr16-ser24: 4.19.94-ti-rt-r58 (up 3 days, 23 hours, 43 minutes)]

I usually update and reboot them every Friday to the latest kernel branches…

I really need to add an hci scan test to my test script. (it runs every 15 minutes, to validate everything is still up…)

PS, are you 5VDC powered or using a usb hub?

I do not trust usb hub’s and thus inject a real 5VDC with: 2727 Adafruit Industries LLC | Cable Assemblies | DigiKey

Regards,

I loaded that image onto one of my BBGWs and had the same behaviour.

I am starting to suspect a hardware issue with my batch of BBGWs. I have tested on 4 boards which have a date of around 04/23/20 on the box and they all have Bluetooth issues. On the older systems I’ve got floating around (not sure of the dates) everything seems much more stable. I created a flasher image from the ‘good’ system to load onto the new boards. One of the older systems has been running since Friday afternoon without a hiccup.

All systems are powered the same way. I have tried connecting directly to my host machine and to wall power through a 40W 5-Port USB Wall Charger.

I turned on some more debugging logs and ran some more tests on one of my older boards over night.

echo 8 > /proc/sys/kernel/printk
cho 256 > /sys/module/wlcore/parameters/debug_level

On the older board I grabbed out of one of my other systems it looks like wlcore crashes but recovers:

[Wed Feb 10 16:39:45 2021] ------------[ cut here ]------------
[Wed Feb 10 16:39:45 2021] WARNING: CPU: 0 PID: 2099 at drivers/net/wireless/ti/wlcore/main.c:796 wl12xx_queue_recovery_work.part.10+0x68/0x6c [wlcore]
[Wed Feb 10 16:39:45 2021] Modules linked in: aes_arm_bs crypto_simd cryptd xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 bnep wl18xx wlcore hci_uart btqca bluetooth mac80211 ecdh_generic cfg80211 wlcore_sdio evdev usb_f_mass_storage usb_f_acm u_serial usb_f_ecm usb_f_rndis u_ether libcomposite iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_filter uio_pdrv_genirq uio spidev pruss_soc_bus pru_rproc pruss pruss_intc ip_tables x_tables
[Wed Feb 10 16:39:45 2021] CPU: 0 PID: 2099 Comm: kworker/u2:3 Tainted: G        W       4.14.71-ti-r80 #1
[Wed Feb 10 16:39:45 2021] Hardware name: Generic AM33XX (Flattened Device Tree)
[Wed Feb 10 16:39:45 2021] Workqueue: phy0 wl1271_scan_complete_work [wlcore]
[Wed Feb 10 16:39:45 2021] [<c0113910>] (unwind_backtrace) from [<c010debc>] (show_stack+0x20/0x24)
[Wed Feb 10 16:39:45 2021] [<c010debc>] (show_stack) from [<c0d9ca74>] (dump_stack+0x80/0x94)
[Wed Feb 10 16:39:45 2021] [<c0d9ca74>] (dump_stack) from [<c013f8e8>] (__warn+0xf8/0x110)
[Wed Feb 10 16:39:45 2021] [<c013f8e8>] (__warn) from [<c013fa18>] (warn_slowpath_null+0x30/0x38)
[Wed Feb 10 16:39:45 2021] [<c013fa18>] (warn_slowpath_null) from [<bf3c8f6c>] (wl12xx_queue_recovery_work.part.10+0x68/0x6c [wlcore])
[Wed Feb 10 16:39:45 2021] [<bf3c8f6c>] (wl12xx_queue_recovery_work.part.10 [wlcore]) from [<bf3cc858>] (wl12xx_queue_recovery_work+0x24/0x28 [wlcore])
[Wed Feb 10 16:39:45 2021] [<bf3cc858>] (wl12xx_queue_recovery_work [wlcore]) from [<bf3e01f8>] (wl1271_scan_complete_work+0x154/0x15c [wlcore])
[Wed Feb 10 16:39:45 2021] [<bf3e01f8>] (wl1271_scan_complete_work [wlcore]) from [<c015d30c>] (process_one_work+0x19c/0x518)
[Wed Feb 10 16:39:45 2021] [<c015d30c>] (process_one_work) from [<c015e244>] (worker_thread+0x60/0x540)
[Wed Feb 10 16:39:45 2021] [<c015e244>] (worker_thread) from [<c0163e54>] (kthread+0x144/0x174)
[Wed Feb 10 16:39:45 2021] [<c0163e54>] (kthread) from [<c0108fe8>] (ret_from_fork+0x14/0x2c)
[Wed Feb 10 16:39:45 2021] ---[ end trace 6efd6d1ae5e1d0c6 ]---
[Wed Feb 10 16:39:45 2021] wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.0.79
[Wed Feb 10 16:39:45 2021] wlcore: pc: 0x0, hint_sts: 0x00000020 count: 6
[Wed Feb 10 16:39:45 2021] wlcore: down
[Wed Feb 10 16:39:45 2021] wlcore: down
[Wed Feb 10 16:39:45 2021] wlcore: down
[Wed Feb 10 16:39:45 2021] ieee80211 phy0: Hardware restart was requested
[Wed Feb 10 16:39:46 2021] wlcore: PHY firmware version: Rev 8.2.0.0.242
[Wed Feb 10 16:39:46 2021] wlcore: firmware booted (Rev 8.9.0.0.79)

That board is running an older Debian image but the wlcore firmware versions seem to still match.

The same settings on a newer board stops working but there’s nothing in the logs but there’s no recovery and nothing in the logs.