We are encountering an issue with the hci0 bluetooth interface becoming unresponsive over time. We are using the device to scan for BLE advertising packets. After some period of time, the interface becomes unresponsive. Attempting to bring the interface down and back up results in an timeout
torizon@verdin-imx8mm:~$ sudo hciconfig hci0 down
torizon@verdin-imx8mm:~$ sudo hciconfig hci0 up
Can't init device hci0: Connection timed out (110)
A reboot does resolve the issue, but is not practical for our use-case, as we would now be required to have a psuedo watchdog to watch for unresponsiveness.
Seeing as both interfaces are on the same chip as well as use the same firmware and driver. The fact you’re seeing issues with both isn’t too surprising. Are you running both the WiFi and Bluetooth simultaneously?
On another note, bluetooth is something that is still sort of untested with TorizonCore. In the sense that it might work, but it’s not something the team currently tests very rigorously. Therefore there might be unknown issues or quirks with it that you might run into.
In the previous issue, bluetooth and wifi were not running simultaneously. In this issue, they were running simultaneously. Interestingly, the wi-fi interface stayed up here, but bluetooth became unavailable.
Do you have suggestions for debugging / working around this (aside from a reboot)?
On another note, bluetooth is something that is still sort of untested with TorizonCore
Is there an alternate image that is recommended for use with bluetooth? Based on the product description here, NXP i.MX 8M Mini / Nano - Verdin System on Module, we were under the impression that it was functional.
Well to be clear it’s not that Bluetooth isn’t explicitly working. It’s just not as thoroughly tested and worked on as other features in the software. In fact we do have other customers that work with Bluetooth successfully on TorizonCore despite this.
As for your issue could you tell me how long it takes for the bluetooth to end up like this. Also how exactly did you setup the bluetooth and what is it doing during this time.
As a suggestion can you try to see if this issue happens when just running bluetooth on it’s own, without the WiFi enabled. Also another suggestion would be to try bluetooth with our reference images instead of TorizonCore. Bluetooth is a bit more well-tested with these images. That said they should be using the same firmware/drivers as TorizonCore. This is just to help narrow things down to determine whether this issue is specific to TorizonCore or not.
On a final note, with regards to both this and your WiFi issue. Just to double-check you do have 2 antennas attached to the WiFi/BT chip on the module correct?
The issue you are experiencing with the hci0 Bluetooth interface becoming unresponsive over time could be caused by a variety of factors, such as a software bug or a hardware issue. Here are a few troubleshooting steps you can try to narrow down the root cause of the issue:
Check the system logs: You can check the system logs (e.g. dmesg) to see if there are any error messages related to the Bluetooth interface or the Bluetooth driver.
Check the antenna connection: Make sure that the antenna connection to the Bluetooth module is secure and properly seated. A loose or faulty antenna connection could result in poor signal quality, which could cause the Bluetooth module to malfunction.
Update the Bluetooth driver: Make sure that you are using the latest version of the Bluetooth driver for your device. You can check the Yocto project website for any updates or patches that may have been released since the version you are currently using.
Enable debugging: You can enable debugging for the Bluetooth driver by modifying the kernel configuration to include the appropriate options. This can help you identify any issues with the driver itself.
Double-check to ensure that there are no significant sources of electromagnetic interference (EMI) in your area that may be suppressing the Bluetooth signal.