This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

hciconfig is not showing my nrf52840 dongle on my linux terminal

Hi,

I flashed my nrf52840 dongle by nrf Desktop connect app with ble-blinky hex file from nRF5_SDK_15.2.0_9412b96 SDK and I am able to connect to it from nrf connect ios app.

But unable to see the device on hciconfig.

Basing on this below link flashed the dongle with ble_connectivity_s140_usb_hci_pca10059.hex which I got from SDK instead of Zephyr BLE HCI_USB controller firmware as I didn't find its hex file.

devzone.nordicsemi.com/.../flashing-nrf52840-dongle-to-support-bluez

What should be done to make the dongle visible in hciconfig.. ??

Parents
  • nRF connect desktop uses serialized softdevice (Nordic BT stack) API to communicate with the connectivity chip, not HCI commands. In other words, ble_connectivity_s140_usb_hci_pca10059.hex will not work with the Bluez host. 

    Do you have a programmer to program the dongle, or do you need to upload the FW through USB DFU? 

  • Hi,

    Have you searched the zephyr mailing list?  In any case, there seems to be quite a few questions related to the address "issue". Only public addresses are displayed by HCI config.

    Eg,

    https://lists.zephyrproject.org/g/devel/topic/28047406 

    https://lists.zephyrproject.org/g/devel/topic/bluetooth_address_type/16760640?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,240,16760640

    I'm able to advertise using the random static address here, but I'm running ubuntu with kernel v 4.15.x and bluez 5.48 . Do you have PC with a newer version of Linux that you can test on?

    :~$ sudo btmgmt --index n
    [hci1]# auto-power 
    Found controller with index 1
    [hci1]# advertising on
    hci1 Set Advertising complete, settings: powered connectable discoverable bondable le advertising secure-conn static-addr 
    [hci1]# 
    

    Here is the device discovered in nRF connect. Notice the address type is Random static.

  • Hi,

    Thanks for your reply.

    I connected dongle to raspberry pi which is  kernel v4.14 and bluez 5.48 and did the advertising on as you mentioned in the screenshot.

    By running nRF connect on my PC and did a scan on it, where I didn't  see the dongle random mac address but i'm able to get rest of the devices mac address.

    Is the same zephyr.hex file you flashed on your dongle to test that which you shared with me..?.

    This is the state of my device

    santhosh@santhosh:~/zephyr$ hciconfig
    hci0:    Type: BR/EDR  Bus: USB
        BD Address: 00:00:00:00:00:00  ACL MTU: 27:7  SCO MTU: 0:0
        DOWN
        RX bytes:227 acl:0 sco:0 events:18 errors:0
        TX bytes:85 acl:0 sco:0 commands:18 errors:0

    santhosh@santhosh:~/zephyr$ sudo hciconfig hci0 up
    Can't init device hci0: Cannot assign requested address (99)

    I gave many tries but nothing helped.

    At present I am trying to compile the zephyr code.

    1.Is there a possibility to change public mac address which is (00:00:00:00:00:00) to (xx:xx:xx:xx:xx:xx) default value in zephyr code. 

    2. If its possible can you tell me the exact process or the public mac address variable by which i can change the BD addr.

    I think this can solve my issue.

    Reply ASAP, im stuck on this from days.

     

  • Hi,

    SanthoshN said:
    By running nRF connect on my PC and did a scan on it, where I didn't  see the dongle random mac address but i'm able to get rest of the devices mac address.

     But were you able to discover the device? 

    SanthoshN said:

    This is the state of my device

    santhosh@santhosh:~/zephyr$ hciconfig
    hci0:    Type: BR/EDR  Bus: USB
        BD Address: 00:00:00:00:00:00  ACL MTU: 27:7  SCO MTU: 0:0
        DOWN
        RX bytes:227 acl:0 sco:0 events:18 errors:0
        TX bytes:85 acl:0 sco:0 commands:18 errors:0

    The public address is 0 as expected, but the type should not be BR/EDR as it is an LE only controller. I suspect that the problem is related to this. It is not required to have a Public address. Did you have another PC to test this on? 

    1. It's possible to change the address, either by using the extended HCI commands or by modifying the sample code. However,  you need to have a OUI for your company to assign public addresses, and I doubt it would fix the problem.   

    2. You can call ll_addr_set from main().

    May I ask what you intend to use dongle for? Is it to test BT 5 features?

  • Hi,

    Thanks a lot for your continuous support, we could scan the dongle now.

    After upgrading my PC to ubuntu 18.04 and kernel to 4.15 I am able to scan using random BD address by flashing your  zephyr.hex file.

    However on raspbery pi Jessie we were unable to upgrade linux kernel beyond 4.14. After calling ll_addr_set from main.c we were able to proceed further.

    We will be using this dongle to work as a BT5.0 gateway device.

    Will let you know if we need any additional info.

    Thanks a lot.

  • Thanks for the update. Glad to hear that it works and that you have managed to to build the sample from Zephyr. 

Reply Children
Related