Skip to content

Fix: Get cccd with FIND_INFORMATION instead of READ_BY_TYPE#350

Merged
lulf merged 7 commits intoembassy-rs:mainfrom
simonft:get-cccd-with-find-information
Aug 7, 2025
Merged

Fix: Get cccd with FIND_INFORMATION instead of READ_BY_TYPE#350
lulf merged 7 commits intoembassy-rs:mainfrom
simonft:get-cccd-with-find-information

Conversation

@simonft
Copy link
Contributor

@simonft simonft commented Apr 10, 2025

Fixes #346

@simonft
Copy link
Contributor Author

simonft commented Apr 10, 2025

A couple notes:

I changed get_characteristic_cccd() to no longer return the state of the CCCD from the server because it would require sending an additional message and the value wasn't actually being used anywhere. Happy to change that back though.

I implemented an arm for encode() (copying the format of the ReadByType arm) because it was throwing an error otherwise. I don't understand what that method is for though. Both arms generate bytes from their associated iterators, which parse from bytes. So they end up converting from bytes into messages and then immediately back into those same bytes. If I'm understanding it correctly, attribute_server.rs is where the serialization occurs when response are being sent to clients.

@lulf
Copy link
Member

lulf commented Apr 14, 2025

/test

@lulf
Copy link
Member

lulf commented May 22, 2025

Could you rebase this PR on latest main? In order to run the integration tests locally, you need two nrf52840 dongles and/or devkits flashed with the zephyr uart controller.

@simonft
Copy link
Contributor Author

simonft commented May 23, 2025

I fixed the merge conflicts.

I also got local tests working, and found and fixed the bug that was leading to the test failure. They pass for me now.

@simonft simonft marked this pull request as ready for review May 23, 2025 20:40
@jamessizeland
Copy link
Collaborator

/test

@EmilNorden
Copy link

How is work going on this PR? I would love to use the find information functionality you have here. I had actually already forked and implemented the find information request/response and was thinking about submitting a PR, but then I saw this and the solution is pretty much identical.

@lulf
Copy link
Member

lulf commented Jul 28, 2025

/test

@lulf
Copy link
Member

lulf commented Aug 6, 2025

/test

@lulf lulf merged commit afcc2f9 into embassy-rs:main Aug 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get CCCD with ATT_FIND_INFORMATION_REQ instead of ATT_READ_BY_TYPE_REQ

4 participants