OpenGoPro icon indicating copy to clipboard operation
OpenGoPro copied to clipboard

Python SDK BLE Protobuf: connecting to a new network doesn't work

Open pavlosharhan2 opened this issue 2 years ago • 0 comments

Abstract:

PythonSDK - can't connect to a new netork MacOS Hero10,12

Description:

I've started playing around with COHN, but stuck with connecting to network:

I am using python SDK on mac, I am not able to send RequestConnectNew message to the gopro to connect to unprovisioned network.

Connecting to already provisioned network works. For example: I connect the network using quick app, then power off- power on the gopro and send RequestConnect command using Python SDK - and it successfully connects to the network.

The error i get Is: "bleak: Device disconnected. Error writing to characteristic".

I can't understand what is happening. Looks like the gopro is dropping BLE connection or something, and the mobile is able to handle it somehow, but Python sdk - doesn't.

I see the same behaviour on both Hero 10 And hero 12.

The code i use:

`async def main():

async with WirelessGoPro(enable_wifi=False) as gopro:

    
    result = await gopro.connect_to_access_point("ssidname", "password")`

One more thing to add: I had to increase BLE Write timeout from 5 to 20 sec inside the module, otherwise even scanning didn't work for me on.

pavlosharhan2 avatar Jan 05 '24 15:01 pavlosharhan2