5 years, 3 months ago.

GattCharacteristicWriteCBParams is undefined


Im trying to handle BLE write events but I keep getting an error on this method definition:

void writeCallback(const GattCharacteristicWriteCBParams *params){

    if(params->charHandle == eventStuff.getValueHandle()){
           //STUFF TO DO HERE


Error: Identifier "GattCharacteristicWriteCBParams" is undefined.

Am I missing an import statement or has this changed with the updated BLE library? Ive tried googling and I could not get a result that works. Can someone please help me?

1 Answer

5 years, 3 months ago.

latest ble library, "GattWriteCallbackParams" and not use "charHandle", to "handle"

Accepted Answer

Thank you for this. Is there documentation where I can find all this classes and their changes?

posted by Naum N 18 Aug 2015

instead of doing like this... void onDataWritten(const GattCharacteristicWriteCBParams *params) do like this instead void onDataWritten(Gap::Handle_t handle,const GattWriteCallbackParams *params) then change the reference inside the function to params->handle and you're good.

posted by Raymond Henick 12 Jan 2017