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.

Linux/CC2564MODN: hciattach fails to attach bluetooth module

Part Number: CC2564MODN

Tool/software: Linux

Raspberry Pi 3 with onboard bluetooth module disabled, using a CC2564MODN on a custom HAT board, trying to connect the module to bluez in raspbian linux 4.14.98, fails after switching to 3000000 baud.

I edited the /usr/bin/btuart shell script with the command

hciattach /dev/ttyAMA0 texas 115200 flow - $BTADDR

and the response after running /usr/bin/btuart was ...
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
Loaded BTS script version 1
texas: changing baud rate to 300000 flow control to 1
Can't set device: Protocol not supported
Can't initialize device: Protocol not supported

Why does hciattach change the baud rate to 300000 ?

Does anybody know how to get a CC2564MODN or CC2564MODNEM board working on a raspberry pi with raspbian-lite ?

Do i need to download bluez from the official source, compile and overwrite the default raspbian version?

Thanks in advance.

Kyran McGlasson
SAGE Automation

  • Please make sure the UART port supports 3Mbps. You can also try with lower baud rates. For that, you would need to modify the BTS file.

    Latest Service packs
    www.ti.com/.../wl18xx-bt-sp

    Tools to modify BTS files:
    www.ti.com/.../WILINK-BT_WIFI-WIRELESS_TOOLS

    Thanks
  • Thanks Hari,

    I can confirm the RPi3B supports 3MBaud on ttyAMA0, since the onboard BT/Wifi module is configured to use 3MBaud. Not that it matters any more because I am using a different bts that stays on 115200.

    I have downloaded other bts files from TI website and the one I am using now is TIInit_6.7.16_bt_spec_4.1.bts, renamed/copied as TIInit_6.7.16.bts into the /lib/firmware/ti-connectivity/ directory.

    This one in particular stays on 115200, but it still fails to initialize.

    In desperation I have hot-wired my CC2564MODNEM board, with a CC256XEM-STADAPT board (okay so I modified it slightly for dupont connectors) - to a Raspberry Pi 3B SBC board.

    I have disabled onboard wifi and bt, and ttyAMA0 is now configured on pins 14 and 15, with RTS/CTS on 16 and 17. I have disabled hciuart service, and using /usr/bin/btuart script to run the hciattach command. The btuart file uses a couple of GPIO commands to perform a reset using GPIO4 connected to the nSHDN pin, then it has the command ...

    $HCIATTACH /dev/ttyAMA0 texas 115200 flow - $BDADDR

    exit 0

    I have also connected my Saleae logic 8 module to the pins - nSHDN, TXD, RXD, RTS, CTS, and have performed a trace.

    I can confirm that RTS and CTS is performing correctly, that the RPi host is sending HCI commands on the RXD pin and the CC2564MODN module is responding on the TXD pin.

    Then I disabled RTS/CTS, but remained connected, and hciattach command now has noflow option.

    Below is during reset. I notice the RTS line goes high until the module is ready.

    Below is the first transaction.

    then the next transaction .... I notice the RTS line goes high during the response.

    then next transaction ....

    then what follows is a series of large RX packets, followed by small 7 byte responses.

    on the raspberry pi 3 console, the response from the hciattach command is ...

    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 115200, flow control to 1
    Can't set device: Protocol not supported
    Can't initialize device: Protocol not supported

    Can someone provide a working solution for the Raspberry Pi 3 ???

    Much appreciated in advance.

    Kyran McGlasson
    SAGE Automation

  • Attached Saleae capture export with flow control enabled, if anyone wishes to view the full interaction.

    cc2564modN_RTSCTS_capture.zip

  • I have solved my own issue, apparently the default Raspbian kernel does not have Bluetooth HCI LL protocol support enabled.

    I recompiled the kernel with this option enabled, and I can now successfully attach the CC2564MODNEM module with hw flow control enabled, 3000000 baud. ISCAN and PSCAN works too.

    Cheers, Kyran McGlasson

  • 1222.TIInit_6.7.16.zipAttached is the TIInit_6.7.16.bts file - baud rate set to 3000000 - if anyone is interested. This needs to go into /lib/firmware/ti-connectivity folder.

  • Glad to hear, you found the solution..