1

I am building a project using gopro camera i found that there is free API from GoPro it self, i followed the tutorial how to use BLE. so to try if everything is working i used this simple program to find bluetooth device but nothing happing it found nothing. i am using python3.10 i am using mac m1 my bluetooth is open

import bleak
from bleak import BleakScanner

async def main():
    devices = await BleakScanner.discover()
    for d in devices:
        print(d,"yes i found it")

asyncio.run(main())```
MadCodex
  • 35
  • 7
  • Seems like this might be a known issue with Bleak https://github.com/hbldh/bleak/issues/635#issuecomment-988054876 – ukBaz Jan 09 '22 at 15:14

2 Answers2

2

The problem might be related to the fact that Bleakscanner.discover() finishes before the advertisement from the GoPro. As per the description that is given in the example you followed from the documentation, it only scans for 5 seconds before stopping. I suggest you use the next example and play with the sleep time to see if you have any success at all.

OJFL
  • 36
  • 2
0

Could also be caused by a bug fixed in OS X 12.3 - see https://bleak.readthedocs.io/en/latest/troubleshooting.html#no-devices-found-when-scanning-on-macos-12

Lev
  • 173
  • 7