-
Notifications
You must be signed in to change notification settings - Fork 88
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
Characteristics with duplicating UUIDs are not supported #127
Comments
Thanks for your great library and quick response. |
Thanks for the clarification, I see now how the issues may differ. 👍 Clever idea on how to differentiate the characteristics by their supported properties. I need to look into it further, but I think the In either case, I do need to look into it further, but your suggestion will help in the brainstorming process. |
@twyatt Thanks a lot. |
@solvek thanks so much for all your help! |
@solvek I'll put together a write up for users re: how characteristic and descriptor lookups have changed to have in the 0.13.0 release notes. I expect to cut the release in the coming days. Sorry it took so long to get this in, thanks for your patience! |
Support shipped in 0.13.0. |
I have a device which has two different characteristics with the same UUID (8b6b2dbe-cffa-4f90-b004-b411af90d4c4):
One of them should be used for writing data and another for notifications.
Seems kable uses standard android method for getting characteristic and it returns the first one by UUID:
service.getCharacteristic(BLE_DATA_STREAM_CHARACTERISTIC_DATA_AVAILABILITY)
For my device I wrote a pure app without libraries and I loop the service characteristic and choose proper one by checking its properties:
private fun BluetoothGattService.getCharaWithProperty(uuid: UUID, property: Int) = characteristics.first { it.uuid == uuid && it.properties and property != 0 }
This pure app works fine but if I use kable my device is not working properly.
Is there any way to choose service/characteristic from discovered but not just by UUIDs?
Is there a workaround to my problem?
The text was updated successfully, but these errors were encountered: