Dear Technical Support Team,
I am writing to request your assistance in resolving a Bluetooth Low Energy (BLE) connection issue on my Colibri iMX8 device running the latest Yocto Dunfell 5.7.x software.
I have noticed that the BLE hosting feature on my device is not functioning properly. The connection between my device and other BLE devices is intermittent, and sometimes it does not work at all. When the connection fails, the phone displays an “interrogation error” message, and I have also observed the following error message in the Linux kernel logs: “Bluetooth: hci0: ACL packet for unknown connection handle 128”.
We have tested the BLE hosting feature on the Colibri iMX8 device with both the original Bluez version 5.55 and the customized version 5.64, but the issue persists in both cases. We suspect that the issue might be related to the firmware on the device, possibly in combination with the interface diversity. However, we have successfully tested the same test scenario on other devices, such as the Raspberry PI 4B and the Toradex Colibri iMX6ULL, and did not encounter any issues with the BLE hosting feature.
I have created a reproducible test scenario that can be found on the following Github repository: GitHub - riwo/ble-example. There are pre-built static binaries available on the release(s) page which can be used to test without compiling the code your self (Release 1.0.2 · riwo/ble-example · GitHub).
The test scenario includes code that allow a BLE peripheral to establish a connection to the Colibri IMX8X (central device). I have tested this scenario multiple times and have encountered the same issue with the BLE hosting feature.
Furthermore, I would like to mention that we are running a customized version of Bluez 5.64 in Yocto. We have tested the BLE hosting feature using both the in-tree Linux drivers and the proprietary drivers provided by NXP through Toradex.
In our efforts to troubleshoot the BLE hosting issue, we have disabled the battery service in the Bluetooth service by changing the “ExecStart” line in the “/usr/lib/systemd/system/bluetooth.service” file to “ExecStart=/usr/libexec/bluetooth/bluetoothd -P battery”. The reason for disabling the battery service is that it forces pairing on the iPhone, which is not necessary for our testing scenario. We believe that this is not the cause of the issue, as we have also encountered the same problem when the battery service is enabled.
I would be grateful if you could provide me with a solution to this issue as soon as possible. I rely heavily on this feature to establish a stable connection between my device and other BLE devices.
Please let me know if you require any additional information from my end to diagnose and resolve this issue. I appreciate your prompt attention to this matter and thank you in advance for your help.
Sincerely,
Jormen Janssen