Skip to content

Python Bluetooth controller for GoPro cameras with BLE connection

Notifications You must be signed in to change notification settings

KonradIT/gopro-ble-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopro-ble-py

Python Bluetooth controller for GoPro cameras starting from the HERO5 Black (successfully tested with the HERO5 Black, HERO6 Black, HERO7 Black, MAX, HERO9 Black)

Important note regarding OpenGoPro:

GoPro released a proper BLE documentation over at opengopro and it matches what I've reverse engineered in the past. But they've done so much stuff I missed, such as getting the status of the camera and doing Protobuf decoding. Their examples are extremely well programmed too.

How to run:

First pairing:

Enable Wireless Connections on the GoPro and go to connect > connect new > GoPro APP

Then connect your device to the camera via Bluetooth.

On Windows, make sure when you connect to wait for the PC to successfully pair with the camera:

The camera should return to the last mode and exit the pairing screen.

Then run:

python main.py

Then enter the commands.

>> record start
[recv] ...

Usage:

Commands available:

  • record start
  • record stop
  • mode video
  • mode photo
  • mode multishot
  • poweroff
  • tag
  • wifi off
  • wifi on
  • set (will prompt you to enter settings)
  • exit (disconnect && exit)

Settings are parsed as constant strings from my library gopro-py-api.

Settings available:

  • video:
    • resolution
    • framerate
    • fov
    • lowlight
    • protune
    • white_balance
    • color
    • iso_limit
    • sharpness

Multi-camera:

Video demo

Pass a list of Bluetooth MAC addresses in the --address parameter to control multiple cameras.

Using via CLI:

By default this script runs in interactive mode, but to control camera aspects via the command line or a bash script pass --address and/or --command

Scripting possiblilities:

Commands can be passed using the --command parameter (multi camera supported)

python .\main.py --verbose --address "XX:XX:XX:XX:XX:XX" --command "record start"

python .\main.py --verbose --address "XX:XX:XX:XX:XX:XX" --command "wifi on"

What happened to the old version?

It relied on gatt library and bluetooth library, and it was a PITA to work on and install. I decided to move to bleak which works perfectly on Windows and Raspbian.

Sources:

https://github.com/KonradIT/goprowifihack/blob/master/Bluetooth/Platforms/RaspberryPi.md

https://gethypoxic.com/blogs/technical/gopro-hero5-interfaces

About

Python Bluetooth controller for GoPro cameras with BLE connection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages