Bluetooth module not detected when using an LTE modem

Dear Toradex Tech Support,
we are using the Bluetooth module of the imx8 with TorizonCore to connect to other BLE devices. This worked fine so far. But now we want to add an mPCIe LTE modem and I discovered that the Bluetooth module does not get detected anymore as soon as I plug in the LTE modem. (Simply tested with the hcitool dev command. When the modem is plugged in, no device is show)

These are the modems I tested it with and both have the same problem:

(Sidenote, don’t know if this is important: The modems are detected by mmcli and I can use them. So they seem to be fine )

We are using TorizonCore 5.3.0, but the problem persists with TorizonCore 5.7.2 and 6.2.0

Do you know anything about this problem?

Thanks and best regards,
Thorbjörn

Ps. The WIFI seems to be working, although I only did a short test on this.

Hello @n11ThoMumme,

Thanks for reaching out!

I would like to get some specific information regarding your hardware setup such as the exact version of the module and carrier board. You could simply send me the output of tdx-info command.

On TorizonCore 6, it simply works with sudo tdx-info --all
On older versions of TorizonCore you could run this command:

# wget https://raw.githubusercontent.com/toradex/tdx-info/master/tdx-info --output-document=tdx-info && sudo sh ./tdx-info

You can learn more about tdx-info here: Getting Device Information with Tdx-Info | Toradex Developer Center

Hi @rudhi.tx
here is the output of txd-info:
txd-info_output.txt (1.6 KB)

I don’t see any information about the carrier board in the output, so I am adding it here:

Ixora V1.2A
SN: 107744753

Best,
Thorbjörn

Hello @n11ThoMumme,

Thanks for sending the additional information.
This issue could be related to LTE and Bluetooth coexistence. However, there are other possibilities such as misplacement of the antennas. Are you using 2 antennas or just one? Also, which antenna are you using?
Could you also please send a picture of how the antennas are connected and set up?

Hi @rudhi.tx
here is a picture how the antennas are placed for development


The big black one you see in the middle is the BT/Wifi Antenna which is connected to the “aux” connector of the BT/WIFI module.
The little small antenna you see is the LTE antenna, connected to the LTE modem on the back side
And the third cable you can see is the WIFI antenna, connected to the “main” connector of the BT/WIFI module.

But I don’t think this is an issue of antenna misplacement. When the LTE modem is plugged in, the BT module is not detected anymore and it is not like it is detected but simply does not work. For example hcitool dev does not list any devices:

n11-AP55:~$ hcitool dev
Devices:
n11-AP55:~$

And here is the output without the LTE modem:

n11-AP55:~$ hcitool dev
Devices:
        hci0    D8:C0:A6:CF:6E:E6
n11-AP55:~$ 

Best,
Thorbjörn

Hi @n11ThoMumme ,

I think that both the Telit and the Sierra mini-PCIe modems you mentioned show up as USB devices, is this correct?

The Bluetooth interface of the Apalis iMX8 and the USB port (USB_H2) on the mini-PCIe slot of the Ixora board are connected to a USB hub.

In theory this configuration shouldn’t cause any issues when using the modem and Bluetooth at the same time, since they’re using different ports of the hub, so there aren’t any shared pins to be aware of.

The problem you’re having could be related to the USB hub, or how TorizonCore configures it.

Can you post the output of the following command after trying to detect the Bluetooth module with the modem plugged in?

dmesg | grep -i usb

Best regards,
Lucas Akira

Hi @lucas_a.tx ,
yes you are correct the modems show up as USB devices.
Here are the two dmesg outputs before and after the Bluetooth device detection:
dmesg-before-detection.txt (2.8 KB)
dmesg-after-detection.txt (2.8 KB)
Unfortunately they do not differe, so there is no clear error message.
Just for you to understand what I did, here are the commands I executed:

  281  dmesg | grep -i usb | tee dmesg-before-detection.txt
  282  cat dmesg-before-detection.txt 
  283  hcitool dev
  284  dmesg | grep -i usb | tee dmesg-after-detection.txt
  285  diff dmesg-before-detection.txt dmesg-after-detection.txt 

Next I thought maybe there is a difference in dmesg between booting the device with and without modem. Here is the output without the modem:
dmesg-no-lte-after.txt (2.0 KB)

For me it looks like there is not really a difference despite the fact that when the modem is attached it gets detected. But not really an error messages why Bluetooth is not detected.
I don’t know in detail how USB works, so the following is only an assumption with no knowledge behind it: But it even looks like, the drivers knows that there is another USB device attached, because the modem is bound to usb 3-1.2 and something else (I guess the Bluetooth device) to usb 3-1.1
There is even this log message: usbcore: registered new interface driver btusb which might indicate that the bluetooth device is detected by the USB driver.

Thanks for your help and let me know if I can provide you with more logs or details.

Best,
Thorbjörn

Hi @n11ThoMumme ,

Unfortunately they do not differe, so there is no clear error message.

Yeah, I looked at the dmesg outputs you got, and apparently the logs messages are nothing out of the ordinary. That’s really strange.

Just to be sure, can you try testing the modem with Bluetooth on one of our BSP reference images and see if the issue also occurs there? That way we can see if this problem is on a lower level or if it is a TorizonCore-related issue.

Best regards,
Lucas Akira

Hi @lucas_a.tx
I tested it with BSP 5.3.0 and BSP 5.7.2 and with both versions the BT device gets detected when the modem is attached. Here are the commands I used:

$> connmanctl enable bluetooth
Enabled bluetooth
$> hcitool dev
Devices:
        hci0    D8:C0:A6:CF:6E:E6

I could not test the modem itself, because mmcli is missing, but dmesg states that it gets detected:

[    9.570647] usbcore: registered new interface driver btusb
[    9.572370] Bluetooth: hci0: unexpected event for opcode 0x0000
[   10.054372] Bluetooth: RFCOMM TTY layer initialized
[   10.059334] Bluetooth: RFCOMM socket layer initialized
[   10.064559] Bluetooth: RFCOMM ver 1.11
[   10.960031] usb 3-1.2: new high-speed USB device number 4 using ci_hdrc
[   11.098301] usbcore: registered new interface driver option
[   11.104087] usbserial: USB Serial support registered for GSM modem (1-port)
[   11.111623] option 3-1.2:1.0: GSM modem (1-port) converter detected
[   11.118413] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[   11.125922] option 3-1.2:1.1: GSM modem (1-port) converter detected
[   11.132684] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[   11.140088] option 3-1.2:1.2: GSM modem (1-port) converter detected
[   11.146942] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[   12.266199] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   12.274207] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

While doing this I realized I missed the step of enabling the BT device when producing the logs for my last post. So I tested it again for Torizon 5.3.0, 5.7.0 and 6.3.0 and got some more logs.
To enable the BT device I used the command sudo hciconfig hci0 up.
When executing it the process hangs for a few seconds and in dmesg I get the following error messages:

[  153.376485] Bluetooth: hci0: command 0x1003 tx timeout
[  155.456549] Bluetooth: hci0: command 0x1001 tx timeout
[  157.536608] Bluetooth: hci0: command 0x1009 tx timeout

So it looks like the device is detected but the communication is not working properly.
Here are the complete dmesg logs for all 3 Torizon versions in case you need them.
torizon-5.3.0-after.txt (41.9 KB)
torizon-5.7.0-after.txt (41.3 KB)
torizon-6.3.0-after.txt (43.6 KB)

Best,
Thorbjörn

Hi @n11ThoMumme ,

Thank you for doing the tests. Given that the problem doesn’t appear to happen on the BSP reference images, perhaps the issue could be related to ModemManager itself. Can you try disabling it on system startup with:

sudo systemctl disable ModemManager

After that, reboot the SoM and see if Bluetooth gets detected. If it is, try manually activating ModemManager

sudo systemctl start ModemManager

and see if the Bluetooth device disappears.

Best regards,
Lucas Akira

Hi @lucas_a.tx
when disabling the ModemManager service the BT device is detected after reboot and I can connect other devices to it.

As soon as I start the ModemManager service again, I can see that the communication with the BT chip times out. When stopping the ModemManager service again, the communication does not recover.

How do we continue from here?
Those options came to my mind:

  • Use the latest ModemManager, in Torizon 6.3.0 version 1.18.8 is used, but there is already 1.20.x published. Maybe this fixes the coexistence issue.
  • Configure the modem connection with ModemManager and then stop the service. Next recover the communication to the Bluetooth chip. But so far I could not figure out how to do this.
  • Use a different method to configure the modem connection after boot, but I did not find a solution for this on the internet so far.

What do you think?
Best,
Thorbjörn

Hi @n11ThoMumme ,

So the problem apparently is related to ModemManager. Feel free to try to use a newer version to see if this helps, though you would probably need to adapt its recipe on the Yocto layers then build a custom version of TorizonCore with it.

The options you mentioned look valid, though it’s hard to know this for sure without a thorough research on the matter.

I’ve passed your issue internally for further investigation. I’ll post here if we have any updates to share.

Best regards,
Lucas Akira

Hi @lucas_a.tx
I was able to solve this issue by using qmicli instead of ModemManager to configure the modem connection. Maybe it is worth mentioning this alternative on the Modem Support Toradex site?

In case anyone has the same problem. here is a step-by-step guide on how to do that with qmicli: Techship - FAQ - How to step by step set up a data connection over QMI interface using qmicli and in-kernel driver qmi_wwan in Linux?

Best,
Thorbjörn

Hi @n11ThoMumme ,

Glad you were able to solve the issue!

Also, thank you for sharing the solution. I’ll pass this information to the TorizonCore team, and we’ll discuss updating our documentation on modem support.

Best regards,
Lucas Akira