gopro / OpenGoPro

An open source interface specification to communicate with a GoPro camera with accompanying demos and tutorials.
https://gopro.github.io/OpenGoPro/
MIT License
707 stars 152 forks source link

How to swich to Video mode via ble #514

Closed pavlosharhan2 closed 7 months ago

pavlosharhan2 commented 7 months ago

When recording videos, sometimes user occasionally presses the side button on the camera and it switches the mode to Photo or Timelapse.

I've been using /gp/gpControl/settings/144/12 command for a long time, but now I've focused my software on bluetooth API. Is there any alternative to this legacy wifi command in Bluetooth API?

Tried to send this: 0x03U, 0x90U, 0x01U, 0x0CU to 0074(Settings) characteristic, but It doesn't work.

From the doc , I see only the ways to load specific presets, but I need It to do the same thing like when we press the side button

Thank you in ad

tcamise-gpsw commented 7 months ago

Hello. The closest way to approximate the mode button functionality in the Open GoPro API is with the "Load Preset Group" API. This is available via HTTP and BLE.

pavlosharhan2 commented 7 months ago

Thank you ! this one worked

val setSettingCmd = ubyteArrayOf(0x04U, // total number of bytes in the query 0x3EU, // command id ( load preset) 0x02U, // preset id value size (4 bytes) 0x03U, 0xE8U) // 1000 as uint16 sent to 0074 characteristic