Discovering services and characteristics callback never called
See original GitHub issueHi,
issue
I am connecting to a device and then calling discoverSomeServicesAndCharacteristics
and discoverAllServicesAndCharacteristics
I passed a callback to both methods and it was never fired.
I did try the discoverServices
method and using the ‘servicesDiscover’ listener. The callback was fired but the services argument was an empty array.
Steps taken to debug
I have been able to connect and listen to the particular service I want to with the lightBlue ios app.
Version
v1.6.0 v1.7.0
What do I need to do to debug this further?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
Can not discover Service and Characteristics via Bluetooth ...
One issue is probably that you call gatt.discoverServices() several times. Two times in the onConnectionStateChange method:
Read more >[BLE] Android does not discover services if ... - Issue Tracker
It performs service discovery after receiving the SC indication. However, the onConnectionStateChange(..) callback is called immediately after ...
Read more >@nabeeln7/noble - npm
For example, in case of the "discover services" operation of Peripheral: There's a discoverServices method expecting a callback: peripheral.
Read more >Generic Attribute Profile (GATT) - Zephyr Project Documentation
Attribute read and write callbacks are called directly from RX Thread thus it is not ... Caching discovered attributes is not supported.
Read more >Bluetooth Low Energy Custom Profile
This is not coincidental. The GATT protocol specifies that a peer device should be able to discover all the services and characteristics by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ojack I’ve started using
discoverServices
anddiscoverCharacteristics
since then. I’ve observed that these 2 methods are more reliable. Basically, you calldiscoverServices
on the peripheral object and then you calldiscoverCharacteristics
on each service object.@sandeepmistry here it is. I see at least two errors. That said I really have no idea what I’m looking at.