BLE reading services and writing characateristics
-
Hi, i'm working on a little project that uses Wipy as a master device and some BLE devices as slaves. I want to discovery the services from the slaves, then write the characteristcs values, is there any way to do that by passing the uuid of the services and the uuid of the specific characteristic besides iterating throgh the characteristic list (services.characteristics())? the type value that i want to write is a string (text).
Thanks.
-
Someone could help? Almost one month and yet no answers!!!
-
@luis.reis I don't think there is a way other than iterating but I hear a BLE module restructure is planned so it may change in the near future
-
I find it very hard to understand what your are trying to achieve.
It seems that you would like to get certain characteristics from specific BLE devices.
You'll have to iterate through the list and select your specified devices using an if-loop.
For example:while bluetooth.isscanning(): if bluetooth.get_adv(): if [your_ble_device_mac] == binascii.hexlify(bluetooth.get_adv()[0]).decode(): print ("Short name is: ", bluetooth.resolve_adv_data(adv.data, Bluetooth.ADV_NAME_SHORT)) else: print("no known devices") else: print("No adv")Something like that will work.
Sorry for low readability.Please upvote me or something, I can only post every 600s.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login