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,

    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. 

  • Hi Vidar,

    I am having an issue which I raised a support ticket, can you go through that. Attaching the link in this.

    NOTE: I am using NRF52840 DK and not USB dongle

    https://devzone.nordicsemi.com/f/nordic-q-a/49841/library-for-integrating-nrf52840-with-mtk7628-running-on-openwrt 

    Thanks

Reply Children
  • Hi SanthoshN,

    I have followed you steps and arrived at the same page and stuck here, Able to scan the devices.

    1) Tried scanning Application from reference link. But stuck with error and not able to solve below error even after rigorous search

    $ ./scan
    Device ID 1
    hci_inquiry: Operation not supported

    2) Except few threads i could not found any tutorials or documentation to write the Bluez application to test it features.

    3) Have you proceeded further with Bluez, If YES can you share any documents or links,

    If NO whats the Alternate to use all features of BLE

    Thanks and any inputs Highly Appreciated.

  • Hi 

    which device/controller are you using..??

    Are you using nrf52840 dongle or  NRF52840 DK. 

    How did you install bluez.?? 

    Can you see your device in hciconfig command. If yes send me the hciconfig logs.

  • Hi

    Thanks alot for your quick response,

    1. We are using Ubuntu (After basic testing will use AM4378 processor base linux system) as host device and nRF52840DK through USB as Radio

    2. i) First Installed through $sudo apt-get install bluez libbluetooth-dev

        ii) I didnt found command bdaddr, So Downloaded Bluez sources, compiled and installed (There were so many lib version mismatch issue, but some how installed)

    3) Link for Query on forum Briefly describing how and what i did. 

    4) I can see my device as hci1 in hciconfig and using hci1 everywhere by disabling hci0 or giving as argument

    5) Please can you comment on my 3rd point in last query (weather u proceeded with Bluez i) if yes can you share some docs or info. ii) if no whats the alternate)

    Can you go through my query in other link and comment on it.

    Lastly we can interact once, discuss the design part my mail [email protected]

    Thanks

  • Hi 

    Yes we went ahead on bluez. We are able to scan and make communication between BT server and client.

    On the top of bluez we installed bluepy and after installing bluepy you will get some python source files with which you can test.

    But for testing you can use bluepy files but later is is better to go with any other way like your reference link .

    NOTE:

    1. We didnt go further on this as we are having other priority tasks. 

    2. In some blog I read that bluepy gives support only for bluetooth 4.2 and not for 5. 

Related