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.

CC2564MODA: HCI Command sequence for BLE central device

Part Number: CC2564MODA


Hi,

Note - this is an repost

I am working on a existing product in which I have to integrate the BLE functionality. We have selected CC2564MODA module for the same, BLE stack will reside on my MCU as CC2564MODA is not having his own MCU. Existing MCU is not supported by the TI hence I need to implement the HCI command layer in my code so that communication with the CC2564MODA should be feasible.

I am not sure of command sequence required to initiate the CC2564MODA so that it can act as BLE central device.

I did some research and tried to find the command sequence. But i am not successfully able to discover the peripheral devices around me.

Bit more information about my problem - I am developing a BLE Central device (IoT gateway) which will discover the peripheral devices around it and will communicate with them using GATT protocol. For this I have to use HCI command sequence only as BLE stack is non portable on my MCU. This is as existing product in which I am adding BLE functionality hence can not use MSP430 or any other MCU in between. We have selected CC2564MODA module as BLE transceiver.

I am using HCITester application to send HCI commands. I have also initiated the CC2564MODA module using TI init scripts v1.6. Below is the script which I have created. Please have a look and let me know the corrections required in this script.

Send_HCI_Read_Local_Supported_Commands
Wait_HCI_Command_Complete_Read_Local_Supported_Commands_Event 5000, any
Send_HCI_Read_Local_Supported_Features
Wait_HCI_Command_Complete_Read_Local_Supported_Features_Event 5000, any
Send_HCI_Set_Event_Mask 0x0000000000001fff, 0x0000000000000000
Wait_HCI_Command_Complete_Set_Event_Mask_Event 5000, any
Send_HCI_LE_Set_Event_Mask 0x0000000000000fff, 0x0000000000000fff
Wait_HCI_Command_Complete_LE_Set_Event_Mask_Event 5000, any
Send_HCI_LE_Read_Buffer_Size
Wait_HCI_Command_Complete_LE_Read_Buffer_Size_Event 5000, any, HCI_LE_Read_Buffer_Size, 
Send_HCI_Read_Buffer_Size
Wait_HCI_Command_Complete_Read_Buffer_Size_Event 5000, any, HCI_Read_Buffer_Size,
Send_HCI_Read_BD_ADDR
Wait_HCI_Command_Complete_Read_BD_ADDR_Event 5000, any

Send_HCI_LE_Set_Random_Address "0C8EB3484FC3"
Wait_HCI_Command_Complete_Event 5000

Send_HCI_LE_Write_Suggested_Default_Data_Length 0xda9f, 0x0148
Wait_HCI_Command_Complete_LE_Write_Suggested_Default_Data_Length_Event 5000, any
Send_HCI_LE_Read_Suggested_Default_Data_Length
Wait_HCI_Command_Complete_LE_Read_Suggested_Default_Data_Length_Event 5000, any

Send_HCI_EXT_SetBDADDR "0c:8e:b3:48:4f:c3"
Wait_HCI_Command_Complete_Event 5000, any

Send_HCI_LE_Set_Scan_Parameters 0x01, 0x0010, 0x0010, 0x01, 0x00
Wait_HCI_Command_Complete_LE_Set_Scan_Parameters_Event 5000, any, HCI_LE_Set_Scan_Parameters, 
Send_HCI_LE_Set_Scan_Enable 0x01, 0x01
Wait_HCI_Command_Complete_LE_Set_Scan_Enable_Event 5000, any, HCI_LE_Set_Scan_Enable, 0x00

WaitForAllEvents 50000, True

I am not getting the LE advertising report from the CC2564MODA module.

Please let me know whether my approach is correct or not? as well what command I am missing here?

Vishal N