question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Characteristics with duplicating UUIDs are not supported

See original GitHub issue

I have a device which has two different characteristics with the same UUID (8b6b2dbe-cffa-4f90-b004-b411af90d4c4): image

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?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
twyattcommented, Feb 4, 2022

@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!

1reaction
twyattcommented, Feb 4, 2022

@solvek thanks so much for all your help! I’ll try to get a version with this update released soon (expect it in the ~0.12.0 release~ 0.13.0 release).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are UUIDs really unique? - Towards Data Science
Are UUIDs really unique? UUID stands for universally unique identifier. It looks like a 32-character sequence of letters and numbers separated by dashes....
Read more >
Duplicate UUIDs problem - HCL Product Documentation
The duplication occurs when incorrect or duplicate UUIDs are assigned to some virtual machines. The problem occurs most frequently on VMWare and is...
Read more >
Duplicate characteristic UUIDs · Issue #336 - GitHub
When trying the Write to the UUID the message 'OPERATION_NOT_SUPPORTED' is returned, I suspect it's picking up the Notify characteristic instead ...
Read more >
How to be sure UUID is not duplicated - Stack Overflow
Closed 9 years ago. I'm working on a video share project and I would like to generate "characters" id's for each video similar...
Read more >
UUID: What and Why - Avoiding Duplicate Listings
Summary · Why? Duplicate item listings, caused by various operational problems, can lead to a customer support issues. · What? The UUID parameter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found