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.

BLE Simple Profile Characteristic change value



Hi All,

I have question about BLE simple profile parameters:

In the simple gatt profile example we have setting of charecters:

// Characteristic 5 Value
static uint8 simpleProfileChar5[SIMPLEPROFILE_CHAR5_LEN] = { 0, 0, 0, 0, 0 };


// Simple Profile Characteristic 5 User Description
static uint8 simpleProfileChar5UserDesp[17] = "Characteristic 5";

I changed the line of profilechar5 to: static uint8 simpleProfileChar5[SIMPLEPROFILE_CHAR5_LEN] = "abcd";

When i tried to read the value i get the same value even after i changed the values to abcd:

  • Which one are you trying to change? It sounds to me that you want to change User Description but however your code shows you are trying to change values stored in characteristic 5 from 1 2 3 4 5 to something that's not legal.

    // Simple Profile Characteristic 5 User Description

    static uint8 simpleProfileChar5UserDesp[sizeDefineByYou] = "string";

  • Thanks Christin,

    I want to change the value that stored in characteristic 5.

    Why it's not legal?

    The purpose of this characteristic is to unpack data that stored in the sensor tag like temperature history for the last 30 days, the value of characteristic 5 changed each time i send 1 packet will be the next packet.
  • Sorry I missed understand you. In order to change the value you need to go into SimpleBLEPeripheral_init() function. The values are set again there. You are just changing the default value in your code, but forget to take care of other place that calls SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR5, SIMPLEPROFILE_CHAR5_LEN,
    charValue5);