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.

cc256x Gatt client

Other Parts Discussed in Thread: MSP430F5438A, CC2564

All:

 Hi,I use two (msp430f5438a + cc2564b) to developing some application , the referense code is v1.5r2 of bluetopia for msp430 .

I want to construct  relations between server and client by using gatt and gap .

there are two side or role :   cc2564_roleA ,cc2564_roleB .

there are two Characteristics:
one side:          Write Characteristic                    using for cc2564_roleA send infomation or command to ble device cc2564_roleB.

( BLE Properties: Write   , Date Type: Byte[] ,Date Length: 20 )


another side:    Notify Characteristic                 using for ble device cc2564_roleB send notify infomation or command to cc2564_roleA

the problem is :

GATT_Initialize  , GATT_Register_Service  is using for Gatt Server initiate ,

How can I Initiate a  Gatt Client to relate to Gatt Server ?

  • service interface :
    UUID: D618D000-6000-1000-8000-000000000000


    two sub interface(Characteristics):

    1. Write Characteristic ( cc256x_roleA send command to BLE device cc256x_roleB ) 。

    UUID: D618D001-6000-1000-8000-000000000000
    BLE Properties: Write
    Date Type: Byte[]
    Date Length: 20

    2. Notify Characteristic ( BLE device cc256x_roleB send infomation to cc256x_roleA ):

    UUID: D618D002-6000-1000-8000-000000000000
    BLE Properties: Notify
    Date Type: Byte[]
    Date Length: 20


    there are only functions like :GATT_Initialize , GATT_Register_Service about server
    there are no functions about initate Gatt Client 。
    How can I perfoment this ?
  • Hi,

    Did you have a look at any of the demo pages, lets say for example HRP demo http://processors.wiki.ti.com/index.php/CC256x_MSP430_TI%E2%80%99s_Bluetooth_Stack_Basic_HRPDemo_APP

    we do RegisterHRS and AdvertiseLE on the server side, GATT_Register_Service is called from RegisterHRS.

    and we do DiscoverHRS and ConfigureRemoteHRS on the client side, GATT_Write_Request is called from ConfigureRemoteHRS, which Write a value to a remote, connected, GATT server (and wait for a response).
  • Mandava:

      Hi, I'v  looked at many demo pages.for example SPPLE,HRP.  I mean  that  functions like :GATT_Initialize , GATT_Register_Service are useing for initiate server,

    But where is initiating gatt client?

    thank you .

  • Mandava:

    Hi,

    local device become a server  by uuid and GATT_Register_Service.

    remote device connected local device, local server get ConnectedId  and transaction id,  then communication with remote device .

    But , if local device want communication with remote service as a client ,

    How initiate a client ?

    the following likes using for gatt server:

    BTPSCONST GATT_Service_Attribute_Entry_t SPPLE_Service[] =
    {
       {GATT_ATTRIBUTE_FLAGS_READABLE,          aetPrimaryService128,            (Byte_t *)&SPPLE_Service_UUID},

    ........

    }

    ret_val = GATT_Register_Service(BluetoothStackID, SPPLE_SERVICE_FLAGS, SPPLE_SERVICE_ATTRIBUTE_COUNT, (GATT_Service_Attribute_Entry_t *)SPPLE_Service, &ServiceHandleGroup, GATT_ServerEventCallback, 0);

    Result = GATT_Initialize(BluetoothStackID, GATT_INITIALIZATION_FLAGS_SUPPORT_LE, GATT_Connection_Event_Callback, 0);
    in function GATT_Connection_Event_Callback:
    ConnectionID = GATT_Connection_Event_Data->Event_Data.GATT_Device_Connection_Data->ConnectionID;

    transation_id = GATT_Read_Value_Request(BluetoothStackID, ConnectionID, DeviceInfo->ClientInfo.Body_Sensor_Location, GATT_ClientEventCallback_HRP, DeviceInfo->ClientInfo.Body_Sensor_Location)) ;

  • Hi,

    How about "GATT_Write_Request" as I have mentioned in my previous post?
    As far as i know you don't have to register the service for the client, we need to obtain the services from the server.
    and the default SPPLEDemo provided as part of the SDK can act as client.
  • Hi,

    Thank you,I have understood your means.