[quote=“ak0815, post:14, topic:20299”][quote=“MrNeondal, post:13, topic:20299”]Hi all,
So I finally got the Snapshot to work.
So I did the authentication procedure and then I sent the following URL:
I did have to put “>> directory/pic.jpg” at the end of my request to save the picture in my directory.
Since this worked, I believe that we could also get the image from the other streams as specified in other product documentations by using view0, view4, and view8.
The auth process and this command is all sent via CURL in a shell script.
Make sure to use the cookies that you get form the auth process.
Thank you all so much for the help.[/quote]
Can you send me the curl script for authentication?
Sure thing, and I did do this on Ubuntu 16.04 in case you wanted that information too.
return="$(curl -k -H ‘Content-Type: text/xml’ -D ‘cookies.txt’ ‘https://GDS_IP/goform/login?cmd=login&user=GDS_USERNAME&type=1’)"
##Calculate md5 checksum
mdstr="$(echo -n $final:GDS3710lZpRsFzCbM:GDS_PASSWORD | md5sum | tr -d ‘/n’)"
M="$(echo $mdstr | cut -d’ ’ -f1 | tr -d ‘/n’)"
curl -k -H “Content-Type: text/xml” -D “cookies.txt” “https://GDS_IP/goform/login?cmd=login&user=GDS_USERNAME&authcode=$M&type=1”
##Request to take snapshot
curl -k -H “Content-Type: image/jpeg” --cookie “cookies.txt” “https://GDS_IP/snapshot/view0.jpg” >> gds_snap.jpg
Insert your GDS3710 IP, USERNAME, and PASSWORD
This has worked for me every time so if something goes wrong then I would suggest that you try each command separately.
Make sure you also have the curl and md5sum packages installed on your linux machine.
If you have anymore questions I will try to monitor this and answer.
Thank you all again for your help with this.