-
Notifications
You must be signed in to change notification settings - Fork 65
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
Read characteristics of the BLE device based on UUID #45
Comments
HI @einfochips1, thanks for the feedback. Yes, peripheral is not accessible outside the library to keep the handling of BLE devices private to the library and avoid any discontinuity. However, we read each characteristic of the BLE device and store it in the format of a dictionary with the path as key and characteristic as value. If you want to send custom data to the device then you can use the API |
Hi @vikas-chandra-mnnit let data: Data = "FEE2".data(using: .utf8)! //FEE2 is characteristic UUID , I want to read connectedDevice?.sendData(path: "Custompathhere", data: data, completionHandler: {data,error in If not can you help me with how to read a characteristics. |
You will not get the characteristic value here, this API is used to send custom data. Check out this thread. We do not have any API to get characteristic values. You can enable logs in SDK to see all BLE characteristics read from the device in console. |
Hi @vikas-chandra-mnnit Without requesting the characteristics UUID, we won't get the value for characteristics. |
This is super annoying. Why not just expose CBPeripheral so that more normal Core Bluetooth stuff can be done? |
Hi @mevdev, I understand your frustration. The reason we have not made peripheral object public is that we have certain callbacks in SDK that we trigger when some set of conditions are met in Core Bluetooth methods. However, if you have a specific use case that cannot be accomplished with the existing SDK, you could consider submitting a feature request to us. We are always looking to improve our library and will consider adding the functionality you need in a future release. |
The library works great.
Is there a method where I can read the characteristics of the device(from UUID) using ESP.Here I am not able to do
connectedDevice?.peripheral.discoverServices([UUID]) , as peripheral is not accessible
The text was updated successfully, but these errors were encountered: