Report
2 months, 1 week ago.

BLE_API for IDB05A1 still in use ?

Hi there,

I'm starting a BLE application for a NUCLEO board using the IDB05A1 shield. I've made an application for it running as peripheral (creating some custom services and characteristics) and everything has gone well. But now, I'm making it to be a central device, so it must discover services and characteristics. So far, so good.

But, when I've tried to set a characteristic to be notified, it is not working. I can make a polling of the characteristic and get the read value without any problem, but there is no notification being fired in my central device, although the right (I hope) procedure for notification activation and registering has been follwed (writing to the 2902 descriptor, register the onHVX callback).

For the IDB05A1, the library X-NUCLEO-IDB0XA1 (version 2.1.0) and the BLE_API (ble version 2.7.0) are being used, and both of them are not updated since more than 2 years ago.

I have been searching through the forum and found several users complaining about the same notify issue, but related to nRFxxx devices rather than BlueNRG. But they have in common its dependency to BLE_API library.

So my question is... am I using the right libraries (and versions) to use the shield IDB05A1 or is there a different and more updated library pack to be used ?

Thanks.

Hi Desmond,

I am not sure if I'm following the right procedure to test your commented found issue. I have switched the med-os version to the last revision (5.11.5-alpha, dated 4 hours ago) and recompiled my program. However, and this is something that has happened since the last 5.11 update, the compilation reports an error saying... Error: Expected an identifier in "extras/mbed-os.lib/features/FEATURE_BLE/ble/gap/Types.h", Line: 188, Col: 10 and showing the offending text as "ADV_IND = 0x00,"... and I really do not know how to fix this since this types.h file is not accesible to me (I'm using the online compiler).

So, how can I test your solution? (..and by the way, what does PR mean ?

Thanks.

posted by Jorge Monagas 19 Feb 2019
Comment on this question

1 Answer

2 months, 1 week ago.

Hi Jorge,

Registering the onHVX callback doesn't subscribe the notification, client should register to notification for the characteristics is interested in.

Here is a discussion and example for getting notification.

https://github.com/ARMmbed/ble/issues/191

Desmond, team Mbed

Hi Desmond, and thanks for your answer on this question.

Maybe I did not detailed it enough in my original post, but I am doing all the process, this is...

1) Subscribing to the notification request on the server by writing value 1 in the CCCD (using the write operation with command GATT_OP_WRITE_REQ), and then 2) Registering to onHVX callback to be fired on client side whenever the server send the notification requested.

But this callback is never been fired.

Thanks.

posted by Jorge Monagas 15 Feb 2019

Hi Jorge,

We found an issue related to your issue, could you check if the PR within it is able to fix your issue?

https://github.com/ARMmbed/mbed-os/pull/9748

Thanks

Desmond

posted by Desmond Chen 19 Feb 2019

(sorry, I had placed this in a wrong place)

Hi Desmond,

I am not sure if I'm following the right procedure to test your commented found issue. I have switched the med-os version to the last revision (5.11.5-alpha, dated 4 hours ago) and recompiled my program. However, and this is something that has happened since the last 5.11 update, the compilation reports an error saying... Error: Expected an identifier in "extras/mbed-os.lib/features/FEATURE_BLE/ble/gap/Types.h", Line: 188, Col: 10 and showing the offending text as "ADV_IND = 0x00,"... and I really do not know how to fix this since this types.h file is not accesible to me (I'm using the online compiler).

So, how can I test your solution? (..and by the way, what does PR mean ?

Thanks.

posted by Jorge Monagas 19 Feb 2019

Hi Jorge,

I tried online-compiler to build BLE_GattServer example with Mbed OS 5.11.5-alpha, it's compiled without error, could you specify what platform and project your are building?

PR means pull request, it's for pushing commit to GitHub project, what I would like to say is we have a fix for characteristic callback function, the change is here

https://github.com/ARMmbed/mbed-os/pull/9748/commits/79e8bf4bc9e4ea3b5fc9fb0a94b7c5e5e511fd66

Could you apply this change to your code, and check if this solve your problem?

Thanks, Desmond

posted by Desmond Chen 21 Feb 2019

To post an answer, please log in.