5 months, 2 weeks ago.

How to get 128Bit Service IDs in advertising payload

Hey guys,

i'm trying to get my unique 128bit serivce UUID into ble advertising payload as follows:


  error = this->ble->gap().setAdvertisingPayload(
          .setLocalServiceList(mbed::make_Span((const UUID *) this->submodule->gattServiceUUID, 1))

But it is not working. It shoots an assert:


++ MbedOS Error Info ++ Error Status: 0x80FF0144 Code: 324 Module: 255 Error Message: Assertion failed: res == BLE_ERROR_NONE Location: 0x30021 File: ./mbed-os/features/FEATURE_BLE/ble/gap/AdvertisingDataSimpleBuilder.h+246 Error Value: 0x0 Current Thread: main Id: 0x20003448 Entry: 0x30F45 StackSize: 0x1000 StackMem: 0x20006FE8 SP: 0x20007E14

What is the right way for doing this?

Now it is working. I used AdvertisingDataBuilder instead of AdvertisingDataSimpleBuilder

posted by Wenzel Reichmuth 12 Aug 2019

1 Answer

2 months, 1 week ago.

Hello Wenzel, I have same difficulties because I'm very very new in C++. How did you resolve this with the "AdvertisingData Builder" ? suppose that it's with the "addData" ? Could you share your code or part of it ?

Thanks in advance, Jiemde