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 driver code

Part Number: CC2564MODA
Other Parts Discussed in Thread: CC2564

I am looking for  code that will drive the cc2564modA via the HCI interface. I have found a load of demo code for other API's at
http://processors.wiki.ti.com/index.php/CC256x_Demos_and_Sample_Applications 

Does the HCI layer code exist somewhere else? No point in reinventing the wheel if TI have gone to the bother of writing it already!

Thanks

Ken

  • Ken,

    For vendor specific HCI Commands, please refer to processors.wiki.ti.com/.../CC256x_VS_HCI_Commands

    General HCI commands and their usage can be found in the Bluetooth specification.
  • I've not made myself clear enough - I am hoping to find HCI host-side C driver code for the TI vendor specific HCI commands i.e. that will handle the events that happen asynchronously after I fire the commands. I have an RFCOMM driver for the previous TI chip, and I "just" need to be able to set the chip up to pass RS232 in both directions, using HCI rather than RFCOMM. I'll be using an STM32F4 & we've got Uart driver code for it.

    & I think I'll have to load the .btd file onto the cc2564 as a C-array to start with, but that's a separate matter.
  • Please let me know if I'm understanding your situation correctly, but you're looking for C implementations of the Vendor Specific HCI Commands?

    Within the stack you'll be able to find some of the VS HCI Commands implemented in C in Bluetopia/BTVS.c. For the VS HCI commands not in that file, you'll have to implement them yourself, and the implementations of these APIs for your application is also up to you.
  • It's code under the API calls on the micro that's talking to the cc2564modA that I'm looking for (i.e. I don't want to amend the stack on the cc2564modA's internal micro (which I presume is an ARM or a Sitara?).

    Surely HCI is common enough in the Bluetooth world that I don't have to start by coding functions to package up bytes to send the commands? I would have expected all the enums etc to have been in an HCI.h, and functions named, in a 1:1 correspondance after all the HCI commands to exist, and that a customer (who has just had his TI chip EOL'd on him) would only have to fix up the calls to the lower level RS232 packet sends & gets on his micro?
  • Is what you're looking for in HCIAPI.h? It includes the typedefs, enums, function prototypes, etc. for HCI.
  • Yes e.g. github.com/.../HCIAPI.h
    but I suppose that the code in Bluetopia will be the stack's. that's running on the module. Are we going to have to write the host side from scratch? The event handlers will be trickier than the command generators, but isn't there code for most of it inside HCItester, allbeit for a PC?
  • If you're trying to do everything directly through the CC2564 device then yes, you'd have to do it from scratch. Running fully functional applications on the board requires a host controller (in this case, STM32) which provides the HCI commands needed via the stack, but TI does not provide any prepackaged APIs for HCI commands for running directly on the CC2564.
  • OK, Dale, thanks for that definitive (but disappointing!) answer. Next, I'm going to connect HCItester to an eval board & watch what events take place when I fire off some commands. This is really as separate question, but I wonder if there's a sequence diagram anywhere, that shows what VS HCI commands need to be sent, to open up a single virtual rs232 link between two CC2564's, back to back, master/slave? We've used RFCOMM to do it with lmx9838's. I've looked in the latest TI BLE Vendor Specific HCI Reference Guide ( github.com/.../TI_BLE_Vendor_Specific_HCI_Guide.pdf), but in vain.