Add BLE descriptors using mbed os

20 views Asked by At

I’m wondering how I could get my characteristic discriptor display as in the picuture.

I have tried to set up the Gatt Characteristic as code below

Discription(
        0x2A29,  // attribute type
        BUTTONSTATE_USRDESCR,
        sizeof(BUTTONSTATE_USRDESCR),
        20,   // length of the buffer containing the value
        true  // variable length
        ),
      descriptors{ &Discription },
      Test(
        0x2A1C,
        &testval,
        GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ,
        descriptors,
        sizeof(descriptors) / sizeof(GattAttribute *)),

However, it display as “{length 13,etc…” on my phone and not just simple string as the screenshot below.

enter image description here

0

There are 0 answers