Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

BLE Adapter: support enabling notifications on CCCD #20

Closed

Conversation

peabody124
Copy link

This is needed for the buttonless DFU CCCD

This is needed for the buttonless DFU CCCD
@peabody124
Copy link
Author

I'm trying to write a script that kicks a device like the buttonless DFU app into DFU mode. This seems to almost work ( https://gist.github.com/peabody124/ec1f037506e498dc66c4ddfbce2a5997 ). The device repeats back the correct value (like when using nRF Connect). However it never quite completes. As best as I can tell, that is because the characteristic is an indication and it needs to be acknowledged. I can't find anything in the python code that does that. Any suggestions?

@bihanssen
Copy link
Contributor

There are some parts missing to make indications work properly.

Currently only notification events are being propagated: https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/master/python/pc_ble_driver_py/ble_adapter.py#L427. Indications will need to be propagated too.

It is also necessary to add handling of indications, and for that it is necessary to call sd_ble_gattc_hv_confirm which is currently not implemented in ble_driver.py.

@mrodem
Copy link
Contributor

mrodem commented Sep 5, 2017

Indication support was added in PR #28. This also included the missing parts that were pointed out by @bihanssen.

@mrodem mrodem closed this Sep 5, 2017
@peabody124
Copy link
Author

Awesome, thank you!

@peabody124 peabody124 deleted the enable_indication branch September 5, 2017 11:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants