aster94 / GoProControl

Arduino library to interface with GoPro cameras
GNU General Public License v3.0
121 stars 21 forks source link

Fixes for Hero4, 5, 7, Fusion #5

Closed KonradIT closed 5 years ago

KonradIT commented 5 years ago

Problem with current implementation is the HTTP requests end up in 400 BAD REQUEST. Changed library to HTTPClient which works with Hero4, 5, (probably 6), 7 and Fusion.

KonradIT commented 5 years ago

Quick to-do list:

KonradIT commented 5 years ago

WoL confirmed working with HERO4

KonradIT commented 5 years ago

Another note: controls work perfectly on Hero4 and Hero7, Hero5 says connection lost.

aster94 commented 5 years ago

Later this month I will test the changes to the gopro hero 3+, I will also add a nested list of #ifdef to use only the minimum necessary libraries (i still didn't added the libraries for the ESP32)

If I am not wrong the friend I was going to ask his gopro has a gopro 5 so I can investigate on this.

About this:

Send Keep Alive message every 2.5 seconds on a background thread

it is possible. But at this point I wouldn't say that the freeRTOS on the arduino framework is for every user, so for now I would just make a simple keepAlive that check if the camera is connected and if yes it send a packet

KonradIT commented 5 years ago

I bought a "NodeMcu V3 Lua WeMos WiFi Wireless Module CH340 Development Board ESP8266 ESP12E" which arrived today, nicer than my original Wemos D1 Mini ESP8266 board since it has more pins and come already soldered. It's also got Lua 5.1 on it.

I have HERO4 Black, HERO5 Black, HERO7 and Fusion ready to test and implement more features. I'm also starting code at https://github.com/konradit/gopro-rc to emulate the Smart Remote from GoPro and send commands to multiple cameras at the same time.

aster94 commented 5 years ago

since you are a python developer i would suggest you also to try the esp32, there are a few modules around like the lolin32 and some of them have also a small lcd screen which could be very useful.

I was also planning to build a remote control for the wemos D1, it is so small that is perfect! i will also draw a pcb with two buttons and two leds (one for connect and one to start/stop recording) ✌️ Just to know: why in your gopro-rc you didn't use this library? I think it will ease the work! :D

KonradIT commented 5 years ago

I will eventually add a patch to this library so it works with gopro-rc. Just needs a modifier for the IP address.

Some notes here: https://github.com/KonradIT/GoProStream/issues/27

I am still not able to send commands to any camera because I need to implement the DCHP server and bind IP addresses.

KonradIT commented 5 years ago

There's also a Bluetooth API if you're interested:

https://github.com/KonradIT/gopro-ble-py

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

The ESP32 seems to support BLE which would make it an ideal candidate for a low power control solution. On BLE mode the GoPro can shutoff WiFi and work off BLE.

aster94 commented 5 years ago

@KonradIT I come back to this project, honestly when I merged this PR I didn't tested the code, and only now i realized that it doesn't even compile 😅

you settled a few errors in your repo and added unwanted files and removed some needed: you should edit your gitignore and remove the whole folder .vscode then in the examples you add one header which there isn't in the repo but only in your local pc because you said to gitignore to don't upload it, see https://github.com/aster94/GoProControl/blob/master/examples/GoProControl/GoProControl.ino#L3 and https://github.com/aster94/GoProControl/blob/master/.gitignore#L9 same for the MultiCam example

also the method sendWoL is not defined in the .cpp file (https://github.com/aster94/GoProControl/blob/master/examples/GoProControl/GoProControl.ino#L48) could you fix these little problems? thanks!

KonradIT commented 5 years ago

Weird, I'll check it out later on. I have 3 boards to test now: ESP8266 NodeMCU (same as yours), ESP8266 Wemos D1 Mini, ESP32

aster94 commented 5 years ago

ok perfect let me know!

for now don't test the ESP32, it won't work because it needs a few libraries defined in the cpp file, i will manage the right includes with a couple of precompile options

KonradIT commented 5 years ago

PR here: https://github.com/aster94/GoProControl/pull/6

All tested on my LoLin NodeMCU ESP8266.