Open priyasamyal opened 10 months ago
After using the function https://dotintent.github.io/react-native-ble-plx/#blemanagerdiscoverallservicesandcharacteristicsfordevice you know services and characteristics, not directly after connect.
Any update to resolve this?
I also have experienced this issue when using device.discoverAllServicesAndCharacteristics(). I didn't notice until reading this issue, however, that you can get the service UUIDs from startDeviceScan. So perhaps this is a workaround
Devs: Can you please fix the behavior of this function to provide a serviceUUIDs?
EDIT: Using startDeviceScan is not a workaround since it only gives you the generic characteristic.
It seems this issue is still present. Can someone update on it?
Hi everyone As mention above by @dominik-czupryna-withintent connecting to the device and discovering it's characteristics are separate processes that are covered in introduction section of the documentation. We can't make an assumption that everyone that is using this library wants to take resources of devices to do so, especially when these informations may be known upfront. At this moment there are no plans of changing that as it would affect many users.
I am facing the same issue, anyone got the solution?
I am facing this issue as well, only on android. Finding this library unusable on android.
Hi everyone We will try to provide fix for this issue in next release. In the meantime for everyone facing this issue please use servicesForDevice to get services data.
bleManagerInstance.servicesForDevice(device.id).then(services => {
console.log('services', JSON.stringify(services))
})
Similar to the comment above, I noticed that if I call device.services()
after device.discoverAllServicesAndCharacteristics()
it populates the services list as expected.
Prerequisites
Expected Behavior
Expecting to receive serviceUUID and service data array after successful connect. But getting null.
Current Behavior
Unable to fetch the services of A&D Smart BP device.
I am getting device id, name and serviceUUID in manager.startDeviceScan() response.
But after calling device.connect() serviceUUID got null in response.
Library version
3.1.2
Device
iPhone 12
Environment info
Steps to reproduce
Formatted code sample or link to a repository
Relevant log output
Additional information
No response