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

How to get characteristics by using serviceId #81

Open
rohitsangwan01 opened this issue Mar 30, 2022 · 12 comments
Open

How to get characteristics by using serviceId #81

rohitsangwan01 opened this issue Mar 30, 2022 · 12 comments

Comments

@rohitsangwan01
Copy link

Hey , as title suggests can we have a method like , discover characteristics

@Sunbreak
Copy link
Collaborator

Any usecase?

@rohitsangwan01
Copy link
Author

Yes i was implementing a feature where i have to list out all services and their characteristics
Something similar to nRF connect app
Not urgent feature for now, but just asking in case if its possible
As we are already discovering characterics , so just an api to get list of it, or maybe in discoverServices methods
Instead of getting services , we can get an object containing serviceId and characteristicList

@Sunbreak
Copy link
Collaborator

Probably. But not on my roadmap

Busy doing pure Dart implementation on Windows

@rohitsangwan01
Copy link
Author

Okk great , let me know if i can be helpful

@Sunbreak
Copy link
Collaborator

I'd like to review your implementation on this

@rohitsangwan01
Copy link
Author

Okk Will try

@rohitsangwan01
Copy link
Author

@Sunbreak done , added a PR #82

@Sunbreak
Copy link
Collaborator

Could split this feature request into another PR?

@ext-danny
Copy link

Is this api be available already, because I can see this on the example.

@rohitsangwan01
Copy link
Author

@ext-danny You can recieve Characteristics from the Service Handler , call discover services and it will return serviceId and Characteristics list

@ext-danny
Copy link

@rohitsangwan01 I'm using the latest version i.e, quick_blue: ^0.4.1+1
but the third parameter is missing. if I follow the example like you said I get the error

The argument type 'void Function(String, String, List)' can't be assigned to the parameter type 'void Function(String, String)?'.

checking on the plugin code I can't see the third parameter

typedef OnServiceDiscovered = void Function(String deviceId, String serviceId);

@rohitsangwan01
Copy link
Author

@ext-danny try version 5 , check on Pub dev , its in bera version currently

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

3 participants