This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: HCI UART with BlueZ Initialization Issue

Part Number: CC2340R5


Tool/software:

Hi Team,

The new zephyr release does support CC2340R5, and using west I was able to compile and flash the driver codes successfully

However, when trying to run run HCI UART on LP example with BlueZ as host on a linux system. The device gets attached using but fails to initialize HCI resulting in invalid mac address on hciconfig command

Thanks & Regards

  • Hello Rupesh,

    Thanks for reaching out. I will try to reproduce this on my end and come back to you.

    May I ask if in the meantime the test can be done using our BTool tool? You would only be able to execute controller only commands, for instance HCI_ReadBdAddr.

    BR,

    David.

  • Hi David,
    I checked with BTool It seems to be working, This is the output that I am getting

    Please let me know if you replicate this with BlueZ

  • Hello Rupesh,

    Thank you for trying this, we know the device has been properly flashed and is responding correctly to the HCI commands.

    I am asking another team member who has more experience with BlueZ. In the meantime, have you tried other commands?

    BR,


    David.

  • Hi David,

    I tried a couple more commands such as HCI_LE_ReadTxPower, HCI_Reset. They all seem to be working fine.

    One thing I did observe though was sometimes when we add the port to BTool, It gives warning that it failed to reset the device, Device may not work properly. But there were no issues running the commands even then.

    With The Linux, I found from the logs that the opcode 0x0C03: HCI Reset commands fails to execute when running btattach

  • Hello Rupesh,

    Just for clarification, are these commands (HCI_LE_ReadTxPower, HCI_Reset, etc) running successfully in Btool or BlueZ?

    BR,

    David.

  • HCI_LE_ReadTxPower, HCI_Reset, etc are running successfully in Btool.

  • Hello Rupesh,

    These are some of the steps I have from the expert to run BlueZ:

    1. Connect CC2340R5 via XDS110 to Linux Machine
    2. sudo apt-get install bluez libbluetooth-dev
      1. Install needed packages for bluez development.
      2. Includes tools like hciconfig, hciattach, bluetoothctl, etc.
    3. ```ls /dev | grep -i “ttyACM*”```
      1. Return of this command will be something like this: /dev/ttyACM0, /dev/ttyACM1
    4. ```sudo hciattach /dev/ttyACM0 any 115200```
    5. ```sudo hciconfig```
    6. ```sudo hciconfig hci0 down```
    7. ```sudo hciconfig hci1 up```
    8. ```bluetoothctl```
      1. Test program, can be used to setup the controller, advertisements, etc.
    9. ```sudo apt install d-feet```
      1. Can help to see what’s happening/what applications are on the bus
      2. Select System Bus
      3. Type in org.bluez in the search bar, and you will see all the objects.

    Let me know if these sequence/commands help.

    BR,

    David.

  • Hi David,

    Thanks for the detailed steps, I will update here after following the steps.
    However, since I am using virtual box for running Linux and using serial ports so instead of /dev/ACM* for me it is /dev/ttyS* can it be an issue.

  • Hi David,

    I ran the commands in the sequence, it still does no work. 

    the command "sudo hciconfig hci1 up" returns no such device as there in only 1 index available for hci.

    Please find below the output for all the commands.

    Thanks & Regards,

    Rupesh Yadav

  • I am also sharing the hex file for the HCI UART example that I am testing the driver with

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/hciuart.hex

  • Hi David,


    I noticed that the HCI UART example requires HW-Flow for uart but the default configuration that we have available in the boards section does not provide that.

    The other boards that support HCI UART have provided an overlay configuration to enable the HW-FLOW-Control.

    Can this be an issue?

    Thanks & Regards,

    Rupesh Yadav

  • Hello Rupesh,

    Apologies for the delay. I have not been able to reproduce this yet with BLUE Z. Please allow me today to try to get some answers on this.

    BR,

    David.