Bluetooth HCI USB sample is not working

Hi,

I'm trying to connect my mobile phone to my development board nrf52840dk using the Zephyr HCI_USB sample (https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/bluetooth/hci_usb) and the nrf sdk version, 2.5.0, but it's not working. When I try to scan using bluetoothctl, my phone doesn't appear, and I have no way to pair.

I tried to check the HCI configuration using hciconfig, but I encountered an error: "Can't read local name on hci0: Input/output error (5)".

Below the lsusb configuration : 


If I try to change any setting, I still get the same error, "Operation not supported".

Does anyone know how to fix this issue ?

Regards.

Parents
  • Hi!

    When I try to scan using bluetoothctl, my phone doesn't appear, and I have no way to pair.

    Is it only your phone you don't see? Do you see other devices advertise? Do you have any more logs of this?

  • I can see other devices like headphones, but not phones and computers.

    Below the scan logs :


    Edit : 

    I can give the btmon -M logs if that helps when I plug in the nrf52840dk card.

  • Hi,

    No, I was not using nRF Connect for Mobile, but I just tried with the configuration below, and it works:

    • Display name: A53
    • Connectable: True
    • Scannable: True
    • Advertising Extension: False
    • Include Tx power: False
    • Anonymous: False

    However, I would like it to work without this application by connecting directly with the Bluetooth of my phone, as we do with any device. Is this possible, or does the nrf52840dk board with the hci_usb example only work with nRF Connect for Mobile?

  • Hi!

    I'm not sure what kind of advertising the phone is doing by default here, if it's BLE or BR/EDR. Are you able to see the advertising with the nRF Sniffer? https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le

    Make sure that you set these configurations in the sniffer:

    If you are able to see the advertising in the sniffer, please save the log, and upload it here

  • Hi,

    I installed the sniffer following this tutorial (https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_ble%2FUG%2Fsniffer_ble%2Finstalling_sniffer_plugin.html&anchor=installing_sniffer_plugin). My interface is not detected by Wireshark. However, it is detected by Windows, as you can see below, and even by nRF Connect for Desktop BLE:


    I have checked all the following points:

    • All Python dependencies
    • Verified that nRF Sniffer can be launched with nrf_sniffer_ble.bat --extcap-interfaces
    • Tried with the firmware from nRF Connect for Desktop BLE and the hci_usb sample

    I also have the logs from the sniffer:

    I tried launching Wireshark in administrator mode, but it didn't work either.

    Edit : 

    That's my bad, I didn't realize that a special firmware was required.

     

  • Edit : 

    That's my bad, I didn't realize that a special firmware was required.

    Correct, you need to flash the sniffer_nrf52840dk_nrf52840_4.1.1.hex firmware when using nRF52840-DK as sniffer

  • I tried to sniff the advertising of my phone, but it's not detectable. I applied the following filter: 'btle.advertising_address == 5c:ed:f4:8d:3d:63,' and there is no corresponding frame. I noticed something strange: when I start the sniffer with Wireshark, it works for 2 seconds and then stops, and nothing happens afterward.

Reply
  • I tried to sniff the advertising of my phone, but it's not detectable. I applied the following filter: 'btle.advertising_address == 5c:ed:f4:8d:3d:63,' and there is no corresponding frame. I noticed something strange: when I start the sniffer with Wireshark, it works for 2 seconds and then stops, and nothing happens afterward.

Children
  • JeremieL said:
    'btle.advertising_address == 5c:ed:f4:8d:3d:63,'

    Not sure if it's Little-endian or Big-endian, maybe try the other way around as well. I have not seen this 2 second and then stops issue before. 

    Another option, if you have a spare smartphone, you could also try to use nRF Connect for mobile app, and scan for the phone using the other phone, and see what kind of advertising info you get.

  • I finally managed to capture the advertising from my phone. The Bluetooth address indicated in the phone settings was apparently incorrect. I am sharing the link to the Wireshark capture with you.

    https://1drv.ms/u/c/6721ea87afaabc14/EZY5E3n7p8FBqXL5gCZSsKMBkw5mP_PmvM0KEfe8rxsNwA?e=yUwl26

  • Hi!

    You can zip and upload it here as well. I tried your link, but I got "Access denied"

  • 1) I see that it only picks up one device here, and seems to stop after 2 seconds.

    The device here has Advertising Address: 6c:03:a5:f6:d5:16 , it has RSSI of -59 dBm , so it's relatively close to the sniffer. 

    PS: note that the phone might advertise with a Resolvable Random Private Address, i.e. it will randomly change every x minutes. e.g. see this page

    2) 

    Sigurd said:
    Another option, if you have a spare smartphone, you could also try to use nRF Connect for mobile app, and scan for the phone using the other phone, and see what kind of advertising info you get.

    Did you try this?