Camera model
GoPro Hero 12 Black
Backend used
GoPro (HERO9+)
Firmware version tested
0.1.0
Overall result
Doesn't work
What worked?
Notes, quirks, or anything that didn't work
In testing the GoPro Hero 12 Black, I'm able to connect the ESP32-S3-Zero but as soon as both the web Ui and GoPro show as paired, the connection starts to turn on and off. I also noticed that if I power down the GoPro while the ESP32-S3-Zero is still powered on, the GoPro auto powers on after a few seconds.
I'm happy to do more testing if theres any info that can help.
Update: found the cause and fixed it (in a forked version)
After adding some debug logging, the connection turned out to be healthy the whole time. The GoPro was answering every request. The drops came from a timing bug in the stale-link check in GoProCamera::poll().
What happens:
poll() stores now = millis() at the start
It then sends the status and settings queries with writeValue(..., response=true), which waits for the camera to confirm
The HERO 12 replies within about 100 ms, while those writes are still in progress, so onNotify sets lastUpdateMs to a time later than now
now - lastUpdateMs goes negative, wraps around (uint32) to about 4.29 billion, and the stale check drops a healthy link on the first poll after every connect
Fix: take a fresh millis() for the stale and no-telemetry checks, and compare as signed. It's a 3-line change.
Tested on: GoPro HERO 12 Black (stock and Labs firmware) with a Waveshare ESP32-S3-Zero-M. Before the fix it reconnected every ~5 s. After the fix it holds a stable connection, with polls answered every second, keep-alives acknowledged, and live battery/format data in the web UI.
DjiOsmoCamera.cpp and DjiActionCamera.cpp use the same capture-now-then-check-stale pattern, so they may be worth a look.
Thanks for the project!
Camera model
GoPro Hero 12 Black
Backend used
GoPro (HERO9+)
Firmware version tested
0.1.0
Overall result
Doesn't work
What worked?
Notes, quirks, or anything that didn't work
In testing the GoPro Hero 12 Black, I'm able to connect the ESP32-S3-Zero but as soon as both the web Ui and GoPro show as paired, the connection starts to turn on and off. I also noticed that if I power down the GoPro while the ESP32-S3-Zero is still powered on, the GoPro auto powers on after a few seconds.
I'm happy to do more testing if theres any info that can help.
Update: found the cause and fixed it (in a forked version)
After adding some debug logging, the connection turned out to be healthy the whole time. The GoPro was answering every request. The drops came from a timing bug in the stale-link check in GoProCamera::poll().
What happens:
poll() stores now = millis() at the start
It then sends the status and settings queries with writeValue(..., response=true), which waits for the camera to confirm
The HERO 12 replies within about 100 ms, while those writes are still in progress, so onNotify sets lastUpdateMs to a time later than now
now - lastUpdateMs goes negative, wraps around (uint32) to about 4.29 billion, and the stale check drops a healthy link on the first poll after every connect
Fix: take a fresh millis() for the stale and no-telemetry checks, and compare as signed. It's a 3-line change.
Tested on: GoPro HERO 12 Black (stock and Labs firmware) with a Waveshare ESP32-S3-Zero-M. Before the fix it reconnected every ~5 s. After the fix it holds a stable connection, with polls answered every second, keep-alives acknowledged, and live battery/format data in the web UI.
DjiOsmoCamera.cpp and DjiActionCamera.cpp use the same capture-now-then-check-stale pattern, so they may be worth a look.
Thanks for the project!