Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After hids_client_send_write_report() client state never gets back to HIDS_CLIENT_STATE_CONNECTED #573

Closed
ricardoquesada opened this issue Mar 16, 2024 · 2 comments

Comments

@ricardoquesada
Copy link
Contributor

Describe the bug

After calling hids_client_send_write_report(), the client state does not return to HIDS_CLIENT_STATE_CONNECTED.
It remains on HIDS_CLIENT_W4_WRITE_REPORT_DONE.

To Reproduce

Just call hids_client_send_write_report().

It seems that handle_report_event is ignoring the GATT_EVENT_QUERY_COMPLETE event triggered by gatt_client_write_value_of_characteristic(), and the client state remains at HIDS_CLIENT_W4_WRITE_REPORT_DONE

ricardoquesada added a commit to ricardoquesada/btstack that referenced this issue Mar 16, 2024
…_STATE_CONNECTED

This commit sets the client state back to HIDS_CLIENT_STATE_CONNECTED
after receiving a GATT_EVENT_QUERY_COMPLETE event.

Fixes bluekitchen#573
@mringwal
Copy link
Member

Hi @ricardoquesada - the first bug was actually that the wrong packet handler was registered. With that in place, the state is set back to connected correctly. However, there was no event that indicates that the write is complete. I've changed the code to emit an empty GATTSERVICE_SUBEVENT_HID_REPORT. What do you think about this? Does this work for you?

mringwal added a commit that referenced this issue Apr 17, 2024
@ricardoquesada
Copy link
Contributor Author

Thanks. works great.

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

No branches or pull requests

2 participants