Code Monkey home page Code Monkey logo

Comments (14)

aster94 avatar aster94 commented on June 1, 2024

Ciao roberto,

what you are asking, i guess, is feasible. Can you post here the response you get before and after taking a picture from the http://10.5.5.9:8080/gp/gpMediaList command?

from goprocontrol.

roberto1963 avatar roberto1963 commented on June 1, 2024

I finally succeed to modify your library, and I have added this small code :
uint8_t GoProControl::mediaList() {
_request = "/gp/gpMediaList" ;
return sendHTTPRequest(_request); }

When ESP32 call mediaList , it make EPS32 to reboot ...
Backtrace: 0x4008c7e0:0x3ffb1bf0 0x4008ca11:0x3ffb1c10 0x400dcd00:0x3ffb1c30 0x400d2efa:0x3ffb1c50 0x400d2ff7:0x3ffb1c90 0x400d32fd:0x3ffb1cc0 0x400d208e:0x3ffb1cf0 0x400d581f:0x3ffb1fb0 0x4008877d:0x3ffb1fd0
Rebooting...

when I try http://10.5.5.9:8080/gp/gpMediaList with my browser , answer is of gopro hero 3 is:
404 Not Found
The requested URL /videos was not found on this server.
Cherokee web server 1.2.101b121212_5bf2ec1 (UNIX), Port 80

In browser , http://10.5.5.9:8080/ gives the Ambarella home page of gopro .

Trying shoot command gives : 403 Forbidden

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

Ok, if you are able to make it working I will add to the library, unfortunately I don't have time to focus on this

from goprocontrol.

KonradIT avatar KonradIT commented on June 1, 2024

I'll give it a spin, ideally this would interface with whatever Arduino library can write to SD cards as well.

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

That is external to the library, however, when it will work, an example could be written

from goprocontrol.

roberto1963 avatar roberto1963 commented on June 1, 2024

This request (http://10.5.5.9:8080/gp/gpMediaList) is it ok for gopro hero 3 ?
It doesn't seems to works for me when I test it with my brower ... why ?

from goprocontrol.

KonradIT avatar KonradIT commented on June 1, 2024

Weird, it worked on my HERO2 and HERO3 when I had them.

from goprocontrol.

roberto1963 avatar roberto1963 commented on June 1, 2024

So I made a error in my test ...
I will made other tries as soon as possible.
Using a browser is it the easiest solution to test this ?

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

@roberto1963 done, now there is a funtion called getMediaList() check it from the example.
However I choosed to do not implement a json parser for the status and for the media list because the library is already enough memory hungry

from goprocontrol.

roberto1963 avatar roberto1963 commented on June 1, 2024

Great !!!
Many thanks !
I will test it in the next days .
I will try to write a small piece of code to get the number of pictures , so I would be able to check if a picture is done or not .

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

great, i will be happy to integrate it in the examples, i would suggest you to have a look at this code https://arduinojson.org/v6/example/parser/
Almost the same code could be used for getStatus()

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

@roberto1963 I made a lot of improvements, have a look at the arduinoJson example. It is working everything but to get the number of picture/video taken you will need to discover a little more how arduinojson manages the json files

This is an example from getMediaList()

{"id":"240009376192920323","media":[{"d":"100GOPRO","fs":[{"n":"GH010043.MP4","cre":"1585310042","mod":"1585310042","glrv":"1271358","ls":"-1","s":"14389838"},{"n":"GH010044.MP4","cre":"1585310152","mod":"1585310152","glrv":"2568816","ls":"-1","s":"27142182"},{"n":"GH010045.MP4","cre":"1585311234","mod":"1585311234","glrv":"3620178","ls":"-1","s":"40970466"}]}]}

every picture is one of these blocks: {"n":"GH010043.MP4","cre":"1585310042","mod":"1585310042","glrv":"1271358","ls":"-1","s":"14389838"} so in the above example there are 3 pictures, I didn't find a way to count them
you may wish to ask to someone who knows that library. I will wait to your response to update the example

from goprocontrol.

roberto1963 avatar roberto1963 commented on June 1, 2024

Hello Aster94,
I have made many tries since some days but I didn't succeed to get a medialist json message with my gopro hero 3 :
Here what I receive :

Start response body
HTTP/1.1 ⸮⸮Allow: GET
Accept-Ranges: bytes
Cache-Control: no-cache
Cache-Control: no-store
Connection: Keep-Alive
Server: GoPro Web Server v1.0
Content-Type: text/plain
Content-Length: 2
End response body

The json message is it in _response_buffer array ?

I would like to search for .JPG occurences in json message to get the number of pictures.

Roberto

from goprocontrol.

aster94 avatar aster94 commented on June 1, 2024

roberto, the response you are receiving doesn't seem correct, have you tried to send a few times the request and did you get always this answer?

HTTP/1.1 ⸮⸮Allow: GET this is indeed quite strange

The json message is it in _response_buffer array ?

yes, also, but it is returned by the getMediaList() which in your case won't return nothing because there is any media list

from goprocontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.