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.

connection setup for cc2560

Other Parts Discussed in Thread: CC256XQFNEM

Hi,

I have a CC256XQFNEM evaluation board to make a prototype.

To manage the CC2560XQFNEM, I have to use a PLD, an Actel Igloo, but it isn't define yet.


I read the bluetooth protocol, I saw an explanation of a ACL connection setup, on this paragraph :

Volume 2 - Core System Package [BR/EDR Controller Volume] - Part F Message Sequence Charts - 3 ACL Connection  Establishment and Detachment

To start I will try to make a simple connection, without authentification and encryption.

For create a connection, I saw the HCI_create_connection command, but I also saw a paragraph named "HCI Configuration Parameters" on the bluetooth protocol.

In this paragraph, there are several commands and parameters like "Scan enable" for example.

My question is :

when a HCI_create_connection command is send to the controller, is that configure all the controller parameter like "Scan enable" ?

Or do i need to configure it by myself ? Or it doesn't matter ?

Scan enable is an example, but i have the same question for Pin Type, etc ...

If anybody can help me.


Best regards

  • Hi,

    For HCI_Create_Connection, you need to send the below parameters: BD_ADDR, Packet_Type, Page_Scan_Repetiiton_Mode, Clock_Offset and Allow_role_Switch. What each parameter means, is explained in the BT Spec.

    Please note that you will also have to download the service pack first (processors.wiki.ti.com/.../CC256x_Downloads)

    If you are using a stack & a sample apps (www.ti.com/.../tibluetoothstack-sdk), then the stack would take care of most of the things.

    Regards,
    Gigi Joseph.
  • Thank you for your answer.

    I saw those parameters, but my questions wasn't about these one.
    In the Bluetooth Spec, there is a paragraph :
    Volume 2 - Core System Package [BD/EDR Controller Volume] - Part E Host Controller Inferface Functional Specification - 6 HCI Configuration Parameters

    If i take the HCI_Create_Connection command for example, one parameter is Page_Scan_Repetition_Mode, however in the bluetooth spec paragraph quote above, it doesn't exist, there is a Page_Scan_Period_Mode with others parameters.

    So what is the difference between these parameters ?
    Should I take care of parameter in that paragraph ?
    Or for a simple connection setup, parameters on each commands are enough ?

    Regards.
  • HI,

    Simply use the parameters that are required for HCI_Create_Connection. Like I said before, please ensure to download the BT firmware before.

    Regards,
    Gigi Joseph.
  • Hi,

    Thank you for your answer.

    About the BT firmware thank you for your reminder because i didn't see this file, I think it manages layers below the HCI layers.
    I opened it in .h, it contains a series of bytes of data, around 400 lines with 16 bytes per lines.

    I implement the CC2560XQFNEM, with a PLD, my files are in VHDL, so in .vhd.
    I can't use a file in .h, is it possible to send the serie of bytes of data through UART ?
    If it's possible, i have to send all data in a single file or the controller needs break between each bytes ?

    Regards
  • Hi,

    You have to wait for command complete from the controller after each command...

    Regards,
    Gigi Joseph.
  • Hi,

    I apologize for the time of my answer.

    I have to wait the command complete event after each command, but how can I know the end of each command on the BT firmware file ?
    Below I copy the first ten lines of the BT firmware file when it's in .h.
    If it's HCI commands packets, the second bytes should be between 0x01 and 0x08 (the OGF code), but for the first line, it's 0x36.

    What is that command packet ?

    Or may be each lines represent a command ?
    For example, I have to send the first line (nine bytes) and wait for a command complete. Then second line (sixteen bytes) and I wait for a command complete, like that until the last line ?

    0x01, 0x36, 0xFF, 0x04, 0x00, 0xC2, 0x01, 0x00, 0x01,
    0x03, 0xFF, 0x06, 0x31, 0x4F, 0x08, 0x00, 0x01, 0x00, 0x01, 0x37, 0xFE, 0x02, 0x07, 0x10, 0x01,
    0x05, 0xFF, 0xFF, 0xD0, 0x62, 0x08, 0x00, 0xFA, 0x07, 0x10, 0x47, 0x1A, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xB5, 0x00, 0x90,
    0x47, 0x68, 0xFF, 0x20, 0x26, 0x30, 0xC0, 0x5D, 0x00, 0x28, 0x26, 0xD0, 0x01, 0x38, 0x1D, 0xD0,
    0x01, 0x38, 0x2A, 0xD1, 0xFF, 0x24, 0x95, 0x34, 0xE5, 0x19, 0x29, 0x88, 0x08, 0x20, 0x01, 0x26,
    0xB6, 0x46, 0x31, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x00, 0x29, 0x01, 0xD1, 0x02, 0x20, 0x07, 0xE0,
    0xE5, 0x19, 0x29, 0x88, 0x08, 0x20, 0xB6, 0x46, 0x2B, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x48, 0x1C,
    0xE9, 0x88, 0x0C, 0x1C, 0x44, 0x43, 0x60, 0x2C, 0x0F, 0xD9, 0x0F, 0xE0, 0xFF, 0x20, 0x99, 0x30,


    Regards
  • Hi,

    It is as below

    0x01: command packet.
    0xFF36: Vendor specific opcode (processors.wiki.ti.com/.../CC256x_VS_HCI_Commands)
    0x04: param_length
    0x00, 0xC2, 0x01, 0x00 : param

    Regards,
    Gigi Joseph.
  • Hi

    Thank you for your answer.

    Regards
  • Hi,

    Please let me know if I can close this post...

    Regards,
    Gigi Joseph.
  • Hi,

    I have a last question about Vendor-Specific HCI command.
    I divided the BT firmware file to know each command, but some of these command aren't given on your wiki page (processors.wiki.ti.com/.../CC256x_VS_HCI_Commands).

    For example, the third command is 0x01 0x37 0xFE 0x02 0x07 0x10.
    The 0xFE 0x37 opcode doesn't exist on your wiki page.

    How could I know these opcodes and its action ?
    Or it doesn't matter ?

    Regards
  • Hi,

    It doesn't matter...
    The commands that matter are put in the wiki page (processors.wiki.ti.com/.../CC256x_VS_HCI_Commands)

    Regards,
    Gigi Joseph.
  • Hi,

    I come back to know if you have the Service Pack in .hex.
    I would put it into a flash memory for my PLD, but memory accepts only a file in .hex for its initialization.
    I searched on internet, but there isn't any add on to convert a file .h to .hex.

    Regards.