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

Implement Display and Debug traits for BLERemoteCharacteristic & BLERemoteService #66

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

oleander
Copy link
Contributor

This allows for easier debugging when working with clients. Debug ({:?}) now includes the most valuable fields, and display ({}) consists of the uuid, and, in the case of the characteristic, properties.

Here's an example:

I (4039) ble_client: (display) BLERemoteService[0x1812]
I (4039) ble_client: (debug) BLERemoteService { uuid: 0x1812, start_handle: 24, end_handle: 47, characteristics: Some([0x2a4e, 0x2a4d, 0x2a4d, 0x2a4d, 0x2a4b, 0x2a22, 0x2a32, 0x2a4a, 0x2a4c]) }
I (4059) NimBLE: GATT procedure initiated: discover all characteristics;
I (4069) NimBLE: start_handle=48 end_handle=65535
I (4829) ble_client: (display) BLERemoteCharacteristic[f3641401-00b0-4240-ba50-05ca45bf8abc]
I (4829) ble_client: (debug) BLERemoteCharacteristic { uuid: f3641401-00b0-4240-ba50-05ca45bf8abc, service: Some(f3641400-00b0-4240-ba50-05ca45bf8abc), handle: 50, end_handle: 0, properties: GattCharacteristicProperties(READ) }

I updated the ble_client example to include the change, but I'm unsure if it adds anything to the example.

@oleander
Copy link
Contributor Author

My free quota for GitHub actions is met so have rerun the CI when it's restored. I'll try again in 24h.

@taks
Copy link
Owner

taks commented Jan 11, 2024

Thanks.

Currently, esp-idf version 4.4 seems to have a compile error.
I will merge because of CI goes through in other versions.

@taks taks merged commit 63e0f18 into taks:develop Jan 11, 2024
2 of 7 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.

None yet

2 participants