gopro/OpenGoPro

Python Tutorials Connections do not establish robustly

onigiri5884 opened this issue · 1 comments

Component

  • GoPro HERO12 Black (v02.20)
  • Python Tutorials (Windows10, Python 3.10.11)

Describe the bug

The following error occurs when executing ble_connect.py from the second time onwards.
The BLE pairing is successful but failed to notification.

INFO     15:52:17.031 Found 1 matching devices.               ble_connect.py:79
INFO     15:52:17.046 Establishing BLE connection to          ble_connect.py:84
         E4:D0:C0:26:4E:57: GoPro XXXX...
INFO     15:52:20.037 BLE Connected!                          ble_connect.py:87
INFO     15:52:20.053 Attempting to pair...                   ble_connect.py:90
INFO     15:52:20.059 Pairing complete!                       ble_connect.py:96
INFO     15:52:20.059 Enabling notifications...               ble_connect.py:99
INFO     15:52:20.059 Enabling notification on char          ble_connect.py:103
         00002a19-0000-1000-8000-00805f9b34fb
ERROR    15:53:00.046 Connection establishment failed: Could ble_connect.py:110
         not start notify on 000C: Unreachable

After resetting wireless connection on GoPro User-Setting, the script runs normally and succeeds enabling the notification.

Please tell me how to execute ble_connect.py successfully repeatedly without GoPro wireless resetting.

Unfortunately this is the current state of the Python tutorials / SDK as tracked by the pinned issue here: #487

This one in particular seems to be a bleak bug: hbldh/bleak#1473

The only current solution is to follow the troubleshooting steps from the tutorial