-
Notifications
You must be signed in to change notification settings - Fork 306
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
signature "" on interface ... doesnt exist #55
Comments
I also got this error when I tried at first. Then I performed a discovery operation first (see discover example), and after that it works. It's like the DBus interface must be "started" and have stored a entry about the peripheral you want to connect to. Try this and it it works I will add a discover action when |
Fixed Battery level bug for BlueZ >=5.48 Also fixed #55 by adding a discover call before connecting.
Thanks for awnser. I will try it these days and will give you a statemant |
40:B8:9A:CE:6A:52: dev_40_B8_9A_CE_6A_52
During handling of the above exception, another exception occurred:
I also get this error |
Could you provide a code snippet showing how you create the client and call connect? Try to extract a minimal example that reproduces the error, Also, what version of Ubuntu do you use and what version of BlueZ? |
Sorry for late awnser. Here is my Code Snippet: async def measure_battery(self, loop):
async with BleakClient(self.__address, loop=loop) as client:
await client.start_notify(self.__BtriggerCharacteristicUUID, self.callback_battery)
await asyncio.sleep(2.0, loop=loop)
await client.stop_notify(self.__BtriggerCharacteristicUUID)
async def scan_bleak():
devices = await discover()
for d in devices:
print(d)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(scan_bleak())
s = Sensor("EC:67:FD:C2:79:1B", 5)
loop.run_until_complete(s.measure_battery(loop)) And i have bluez in version 5.48 and Ubuntu in 18.04.2 |
Ah, this is a bit of a problematic case... In BlueZ 5.48 they removed the Battery Service (0000180f-0000-1000-8000-00805f9b34fb) from the has been moved to interface |
Improvement for #55 Wrote better error for battery notification in BlueZ >= 5.48
After I release version 0.4.0 and you have installed that, try this instead:
Notifications on battery level will not work in BlueZ right now; I do not know how to fix that right now. You will have to settle for a regular read. |
Hi sorry, but I don't use the Battery UUID. It's a Custom Service and it don't work. |
I'm getting this still with bluez 5.64 on openwrt (dbus, but not systemd) using the script: https://github.com/etactica/host_utilities/blob/feature/bluetooth_ota_python_bleak/bluetooth_ota_apploader_python_bleak/sl-ota-apploader.py It happily scans and finds the device, then .... fails to connect. This works fine on fedora desktop with bluez5.65, and it worked "back then" before I updated fedora as well. Using bluetoothctl, I can see that I must leave scan on to get a connection to succeed? if I do "scan le" my device appears, but if I do "scan off" (to stop the console spam) and then "connect blah" it will fail. if I leave scan on, I can connect just fine |
Description
I want to connect to an BLE device.
What I Did
The text was updated successfully, but these errors were encountered: