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.
-
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.
-
@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
-
Someone could help? Almost one month and yet no answers!!!