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.

CC2560B: HCI UART communication problem

Part Number: CC2560B
Other Parts Discussed in Thread: BT-MSPAUDSOURCE-RD, , CC2560

Dear Forum Users,

I have problems communicating with CC2560B using HCI UART. I am using BT-MSPAUDSOURCE-RD as reference design for early development where MSP430 on board transfer bytes between PC and CC2560B. Start-up operations after reset are:

  • wait for SLOW_CLK (from 32,768kHz ACLK) to stabilize
  • set nSHUTD pin high
  • set RTS low

First problem I encountered is that BT controller CTS pin is never going low after start-up. I use HCITester tool to exchange HCI commands and BT contoller does answer but response events are never correct for sent commands. Example output from HCITester is below:

09:59:02.309 Load Succeeded
09:59:02.309 --
09:59:02.309 VersionPlatform = "ORCA"
09:59:02.309 VersionMajor = 7
09:59:02.309 VersionMinor = 16
09:59:02.309 --
09:59:25.381 --
09:59:25.381 Packet "HCI_Read_Local_Version_Information", Opcode 0x1001
09:59:25.381 --
09:59:25.381 Outgoing Dump:
09:59:25.381     0000: 01 01 10 00                                     ....
09:59:25.381 Incoming Dump:
09:59:25.381     0000: 04                                              .
09:59:25.381 Incoming Dump:
09:59:25.381     0000: 88 01 06                                        ...
09:59:25.381 --
09:59:25.381 Packet "se", Opcode 0x0088
09:59:25.381 Parameters:
09:59:25.381 | Layer        : 0x04
09:59:25.381 | Event Opcode : 0x88
09:59:25.381 | Length       : 0x01
09:59:25.381 | Payload      : "06"
09:59:25.381 --
09:59:25.381 Incoming Dump:
09:59:25.381     0000: 00 50                                           .P
09:59:25.388 Incoming Dump:
09:59:25.388     0000: 90 e3                                           ..
09:59:36.147 --
09:59:36.147 Packet "HCI_Read_BD_ADDR", Opcode 0x1009
09:59:36.147 --
09:59:36.147 Outgoing Dump:
09:59:36.147     0000: 01 09 10 00                                     ....
09:59:36.156 Incoming Dump:
09:59:36.156     0000: 04                                              .
09:59:36.156 Incoming Dump:
09:59:36.156     0000: 48 01 cb                                        H..
09:59:36.156 --
09:59:36.156 Packet "se", Opcode 0x0048
09:59:36.156 Parameters:
09:59:36.156 | Layer        : 0x04
09:59:36.156 | Event Opcode : 0x48
09:59:36.156 | Length       : 0x01
09:59:36.156 | Payload      : "CB"
09:59:36.156 --
09:59:36.156 Incoming Dump:
09:59:36.156     0000: 20                                               
09:59:36.156 Incoming Dump:
09:59:36.156     0000: f8                       

I receive event packet (0x04) but opcode and the following bytes are incorrect. This happens regardless of flow control settings in HCITester. Received events are the same when I send commands from MSP430 code instead of using microcontroller as a proxy.

I also tried to download init script from https://www.ti.com/tool/CC256XB-BT-SP to module but I get error at second line because received event is wrong:

Send_HCI_VS_Update_Uart_HCI_Baudrate 0xFF36, 0x0001c200
Wait_HCI_Command_Complete_VS_Update_Uart_HCI_Baudrate_Event 5000, 0x00, 0xff36, 0x00

Have you ever encountered such behavior? Maybe I am missing something in module initialization?

Thank you for any help in advance.

Adam

  • Hi Adam,

    Is this a new design? I highly recommend the CC2564C over the CC2560B as the C variant has 5.1 certification. This will require a new microcontroller as the MSP430 is not supported. The current best option is the STM32. 

    From the output you provided, it does look like the packet formation is incorrect. I'm assuming you are using the .xml from the CC256XB service pack you mentioned? Can you verify that you are using the TIInit_6.7.16.xml and initscripts TIInit_6.7.16_bt_spec_4.1.bts? 

    Thanks,
    Jacob

  • Hi Jacob,

    We have to add dual-mode Bluetooth functionality to the existing project based on MSP430 so this controller was the best match.

    Yes, I verified my files and both command library and init script are the same as you mentioned.

    Thank you,

    Adam

  • Hi Adam,

    Can you run a HCI_VS_Get_System_Status (0xFE1F) command and post the output here? Perhaps you need an earlier version of the service pack for compatibility with the CC2560B.

    Thanks,
    Jacob

  • Hi,

    I have managed to correctly communicate with CC2560. I think there is a problem in initialization script for this module because it send commands to write memory blocks of size 0xFA = 250B. The allowed size of memory block in command is 1-200 as specified in TIInit_6.7.16.xml.

    Service pack/library I downloaded is: www.ti.com/.../CC256XB-BT-SP

    After manually editing the script (writing smaller blocks to memory) I am able to run all these commands.

    My next step was to connect with the module. After running init script and setting basic advertising packet I can discover my device with valid info from adv. packet using mobile phone in both classic/BLE modes.

    My setup is as follows:

    1. HCI_VS_Write_BD_ADDR, HCI_Change_Local_Name

    2. HCI_VS_LE_Enable

    3. HCI_LE_Write_Advertising_Parameters, HCI_LE_Write_Advertising_Data

    4. HCI_LE_Write_Advertise_Enable

    But despite of device discovery I am stuck because I can't find any commands or documentation to perform paring/connection. I don't receive any event on pairing attempt from my phone BT interface. On connection attempt from application I only receive following ACL packets every 5 seconds:

    15:30:02.378 --
    15:30:02.378 Packet "HCI_ACL_Packet_Event", Opcode 0x0000
    15:30:02.378 Parameters:
    15:30:02.378 | Layer             : 0x02
    15:30:02.378 | Connection Handle : 0x0401
    15:30:02.378 | Boundary          : 0x0002 (Start)
    15:30:02.378 | Broadcast flag    : 0x0000 (None)
    15:30:02.378 | Length            : 0x000b
    15:30:02.378 | Data              : "07:00:04:00:10:01:00:FF:FF:00:28"
    15:30:02.378 --

    Could you guide me to documentation describing paring and connection steps for this module in classic/BLE modes? HCI_ACL packets documentation would also be useful.

    Thank You,

    Adam

  • Hi Adam,

    I'll look for this and get back to you on Friday.

    Thanks,
    Jacob

  • Hi Adam,

    I apologize for the delay in my response. I think the CC2560B is a Bluetooth Classic device only supporting BR/EDR. This is the device table from the CC2560B datasheet:

    I'm afraid we do not have any specific guides for using the CC2560B. We do have some other helpful guides on HCI commands and the MSP430 stack that I will provide here. Please let me know if you have further questions.

    1108.CC256x MSP430 TI Bluetooth Stack - Texas Instruments Wiki.pdf

    6371.CC256x VS HCI Commands - Texas Instruments Wiki.pdf

    4428.CC256x TI Bluetooth Stack SPPDemo App - Texas Instruments Wiki.pdf

    Best regards,

    Jacob