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.

CCS/LAUNCHXL-CC2640R2: CHANGING THE NAME OF OF CUSTOM SERVICES IN HEART RATE CODE

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hello Sir,

I have used Heart Rate example and modified it as per my requirements now i wants to change the name "Heart Rate" which is appearing in BLE scanner,

And also i want to change the name of the characteristics as per my requirements i tried from my side but was not able to do so,

So please help me in this case so that i can change the name of Characteristics and services,

Also please tell me if i can change the Bluetooth Device address of the device and if so where i can do it.

Thanks and Regards

Utkarsh P

  • Hi Utkarsh,

    You would need to add a characteristic descriptor to each characteristic you wish to add a description to, for example you can refer to the OAD service:

    // OAD Characteristic user descriptions
    static const uint8_t oadImgIdentifyDesc[] = "Img Identify";
    
    // ...
    
    static gattAttribute_t oadAttrTbl[] =
    {
      // OAD Service
      {
        { ATT_BT_UUID_SIZE, primaryServiceUUID },
        GATT_PERMIT_READ,
        0,
        (uint8_t *)&oadService
      },
    
        // OAD Image Identify Characteristic Declaration
        {
            { ATT_BT_UUID_SIZE, characterUUID },
            GATT_PERMIT_READ,
            0,
            &oadCharProps
        },
    
            // OAD Image Identify Characteristic Value
            {
                { ATT_UUID_SIZE, oadCharUUID[OAD_IDX_IMG_IDENTIFY] },
                OAD_WRITE_PERMIT,
                0,
                oadCharVals
            },
    
            // Characteristic configuration
            {
                { ATT_BT_UUID_SIZE, clientCharCfgUUID },
                GATT_PERMIT_READ | OAD_WRITE_PERMIT,
                0,
                (uint8_t *)&oadImgIdentifyConfig
            },
    
            // OAD Image Identify User Description --> This is what you need to add
            {
                { ATT_BT_UUID_SIZE, charUserDescUUID },
                GATT_PERMIT_READ,
                0,
                (uint8_t *)oadImgIdentifyDesc
            },
    
    // ...
    

    This is of course just a snippet, you will need to fill in the rest yourself.

  • Part Number: LAUNCHXL-CC2640R2

    Tool/software: Code Composer Studio

    Hello Sir,

    I am working with BLE and RTOS for the first Time, i have checked with basics of Rtos and also I went trough

    1. "Bluetooth Low Energy Fundamentals" (http://software-dl.ti.com/lprf/simplelink_academy/modules/ble_01_basic/ble_01_basic.html

    Bluetooth Low Energy Custom Profile" (software-dl.ti.com/.../ble_01_custom_profile.html).

    I understood how to create a custom service  and i tried to create one service with write characteristics and one service with notify characteristics, i am also able to see these services on BLE Scanner app.

    However, i am not able to transfer data using notify service and not not able to understand how the data exchange is happening actually,

    Now I want learn how actually these Data exchanges are handled in projectzero.c and heart_rate.c,

    So please help with explanation how exactly data Exchange happens in projectzero.c and heart_rate.c  task functions. 

    Also i want to combine the Notify and Write Characteristics in one Custom service and transfer the characters as well as use read Characteristics with each.

    Please help me with this at the earliest.

    Thanks and Regards,

    Utkarsh Patil 

  • Part Number: LAUNCHXL-CC2640R2

    Tool/software: Code Composer Studio

    Hello sir,

    I am using Heart rate example code and have interfaced a accelerometer with it,

    Now i want an these accelerometer function to be executed on perodic bases that after every second or 500 milli second,

    So i was thinking to use an RTOS clock which is Timer based, which would be running in background after every 500 milli second with BLE functions,

    So kindly help me with the steps to implement this operation using RTOS clock, 

    Or if you have any other method through which i can perform this action of accelrometer functions running in background after every 500 milli second, then please help me with the procedure,

    Thank You 

    Utkarsh P

  • Hi Utkarsh,

    You currently have 3 threads open, and we have discussed some yesterday. I am merging them all into this thread for brevity
    e2e.ti.com/.../655940
    e2e.ti.com/.../655799

    In general, creating new threads is not the best way to get support. Instead, it would be most helpful for us at TI for you to create one thread and ask your questions there. The best way for us to help you is for you to attempt to implement your features, and come to the forums when you have an issue and then provide the code that you have worked on so far. In this way, we can best help you debug.
  • Regarding RTOS clocks, the simple peripheral application will perform a periodic event every 5s using a TI-RTOS clock object.

    You can refer to this code for more information. Also see the BIOS User's Guide in the docs\tirtos\sysbios\docs folder for more information on how the kernel/clocks work.
  • Regarding the relationship between your application task and the service (could be proejct zero or any other app in the SDK) it is as follows:

    1. Stack invokes service callback when peer device reads or writes to a given char in the heart rate service, see heartrateservice.c::heartRate_ReadAttrCB and heartrateservice.c::heartRate_WriteAttrCB

    2. The above callbacks will invoke your application callback, assuming you have registered for it using HeartRate_Register(...)

    3. Your application callback is up to you to define, from heartreateservice.h::heartRateServiceCB_t you can see that it is a void function that provides the event that occurred as a parameter. In summary this will notify your application which char was written to. It is now up to your app to process the data as you see fit.