-
Notifications
You must be signed in to change notification settings - Fork 295
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
Bleak returns a mac address that is 00:00:00:00:00:00 #1490
Comments
Please see https://bleak.readthedocs.io/en/latest/troubleshooting.html to enable debug logging and how to log Bluetooth packets. Bleak only reports the value returned by BlueZ so this is likely a BlueZ issue or an issue with the Bluetooth adapter. |
@dlech Here are the logs |
As seen in the second line of the logs: 2024-01-05 14:22:14,983 bleak.backends.bluezdbus.manager MainThread DEBUG: received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_00_00_00_00_00): BlueZ thinks the device address is all 0s. |
Is there a way to fix the issue? Do we need to downgrade BlueZ to an earlier version? |
I would start with logging Bluetooth packets. If the device is actually sending the address 00:00:00:00:00:00 then there is nothing wrong with the software. |
The device is sending a MAC address since I can see it on MacOS |
bluetoothctl -v
) in case of Linux: 5.66Description
I'm trying to get the mac address from a BLE device. But it returns a mac address equal to -> 00:00:00:00:00:00
What I Did
Of course I tried to restart the rasp, I also tried to see if there bluetooth drivers I needed to install, but didn't find any. I was unable to find any good thread for this type of problem.
My code
Here is the code I use to get the mac addresses.
import asyncio
from bleak import BleakScanner
async def discover_devices():
devices = await BleakScanner.discover(timeout=20)
for device in devices:
print(f"Device: {device.name}, Address: {device.address}")
asyncio.run(discover_devices())
The text was updated successfully, but these errors were encountered: