• April 16, 2024, 04:52:27 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Restart DCS-932L using Curl/Wget/Http Command  (Read 13919 times)

sip06pp

  • Level 2 Member
  • **
  • Posts: 26
Restart DCS-932L using Curl/Wget/Http Command
« on: December 25, 2014, 01:29:26 AM »

Good day,

I have several DCS932L Cameras and sometimes they freeze randomly. Upon restart everything is fixed.
Can someone please tell me what command i should use to restart them ?

Can be anything, wget, curl or http command. Commands like this are used to connect and control using 3rd party software.
Example would be : http://192.168.1.100:80/cgi-bin/rtpd.cgi?reboot but no reboot command exists.

I searched the forum but no command like above to restart camera
« Last Edit: December 25, 2014, 02:14:35 AM by sip06pp »
Logged

RYAT3

  • Level 10 Member
  • *****
  • Posts: 2254
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #1 on: December 25, 2014, 06:18:12 AM »

If your camera is unresponsive how is it going to respond to a http request?

Anyways, Dlink and others have power control switches.

http://www.cnet.com/products/d-link-wi-fi-smart-plug/

One of my dlink cameras has a power cycle function you can set for daily reboot. That's located in the firmware menus. I guess that only works if the camera is still responsive.

You might be trying to do too much with your camera that it's locking up? Or is it just defective?
Logged

sip06pp

  • Level 2 Member
  • **
  • Posts: 26
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #2 on: December 26, 2014, 12:00:01 PM »

Hi,

I plan to automate command to reboot at regular intervals to avoid this camera freeze. Not attempt to perform after camera freeze.

Does anybody know this remote command to reboot ?
Logged

sip06pp

  • Level 2 Member
  • **
  • Posts: 26
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #3 on: December 30, 2014, 11:40:44 AM »

Forum admins,

any ideas ?
Logged

JavaLawyer

  • BETA Tester
  • Level 15 Member
  • *
  • Posts: 12190
  • D-Link Global Forum Moderator
    • FoundFootageCritic
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #4 on: December 30, 2014, 02:22:17 PM »

The DCS-932L does not contain a "Reboot on a Schedule" function. Some users successfully use a house timer to force a scheduled power cycle.
Logged
Find answers here: D-Link ShareCenter FAQ I D-Link Network Camera FAQ
There's no such thing as too many backups FFC

paulanthony12

  • Level 1 Member
  • *
  • Posts: 1
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #5 on: July 22, 2015, 05:36:39 AM »

I am trying to do exactly the same thing.  Searching around the internet I found the following command line for another d-link camera but unfortunately I can't get it to work on my DCS-932L.

wget –http-user=admin –http-password=YOUR-PASSWORD -O /dev/null –post-data=”Reset= Yes ” http://camera1/Reply.html

Did anyone get this working?  I plan to set up a scheduled task locally to run this command once every 24 hours to [hopefully] stop my cameras from being unresponsive.
Logged

meh

  • Level 1 Member
  • *
  • Posts: 8
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #6 on: August 02, 2015, 02:41:44 PM »

I am trying to do exactly the same thing.  Searching around the internet I found the following command line for another d-link camera but unfortunately I can't get it to work on my DCS-932L.

wget –http-user=admin –http-password=YOUR-PASSWORD -O /dev/null –post-data=”Reset= Yes ” http://camera1/Reply.html

Did anyone get this working?  I plan to set up a scheduled task locally to run this command once every 24 hours to [hopefully] stop my cameras from being unresponsive.

I find a healthy reboot around 1-2 weeks keep's them responding.  Otherwise as previous posters have said they just hard lock and a complete power cycle is required.

Linux with curl:

[command - ideally crontab]
curl --max-time 3 --connect-timeout 1 -u username:password -p -X POST http://IP_ADDRESS_HERE/setSystemReboot
[/command]


Logged

meh

  • Level 1 Member
  • *
  • Posts: 8
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #7 on: August 03, 2015, 12:45:05 PM »

While I'm here too;

If your having trouble trying to find the correct url for any other camera models.  Then a quick and dirty way of finding the URL is simply enable developer mode in say firefox and take a look at the transaction as it happens while your browsing.  You should have no problem seeing any uri post to a given script/function.

If all else fails use wireshark and packet trace directly.


EDIT:

93x Range Model (Revision A Hardware)

Linux with curl:

[command - ideally crontab]
curl --max-time 3 --connect-timeout 1 -u username:password -p -X POST http://IP_ADDRESS_HERE/setSystemReboot
[/command]

93x Range Model (Revision B Hardware - new style firmware)

Linux with curl:

[command - ideally crontab]
curl --max-time 3 --connect-timeout 1 -u username:password http://IP_ADDRESS_HERE/www/setSystemReboot
[/command]


The above is called on the rootfs at "/etc_ro/web/"  but on the newer firmware revision B hardware;  "/etc_ro/web/setForm/setSystemreboot"
« Last Edit: August 11, 2015, 02:47:55 PM by meh »
Logged

belnox

  • Level 1 Member
  • *
  • Posts: 1
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #8 on: November 20, 2016, 06:17:35 PM »

After some experimentation I've crafted the following command to reboot a camera from a command line using curl

curl --max-time 3 --connect-timeout 1 -p -X POST -H "Host: <IP>" -H "Referer: http://<IP>/file.htm" -H "Authorization: Basic <AuthCode>" --data "ReplySuccessPage=reboot.htm&ReplyErrorPage=reboot.htm&Reset=Reboot+the+Device" http://<IP>/setSystemReboot

Things to change:
<IP> - Multiple times in command, the IP (or hostname) for the Camera
<AuthCode> - I got this from the headers using the FireFox Debugger (F12)

Tested on:
DCS-930L FW v1.16
Logged

acellier

  • Level 4 Member
  • ****
  • Posts: 417
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #9 on: November 24, 2016, 05:33:02 PM »

@belnox -
Please, how do you find the <AuthCode> using FireFox DeBugger?
I can't find that value. Which camera page in the browser? What does it look like?
with various guesses, all I get is
     <html><body><h1>The request is forbidden.</h1></body></html>
Thanks.
Logged

rjms

  • Level 1 Member
  • *
  • Posts: 13
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #10 on: November 28, 2016, 09:21:46 AM »

You might use the Firefox Network tool instead (Tools > Web Developer > Network), where the Headers will be displayed (select one of the GET line, e.g. the first)

Another way is to use the Firefox Console (Tools > Web Developer > Web Console)
Let's say your password is "1234abc"; then write and execute this in the console:

Code: [Select]
btoa("admin:1234abc")
That should give you the <AuthCode> (the example above gives "YWRtaW46MTIzNGFiYw==" which is just an encoded form of "admin:1234abc")

As for "The request is forbidden" message, this is from DLink developers that fudged the web UI (which is why belnox needed to include the Referer string in his example above, a spoofing that nullifies any pretension of security from DLink).
You can go to the home page of your camera, (http://YOUR_CAMERA_IP) from which you can access the other pages. The home page is sufficient to extract the AuthCode from the Headers (if you're not comfortable with the Console trick above).
« Last Edit: November 28, 2016, 09:25:49 AM by rjms »
Logged

acellier

  • Level 4 Member
  • ****
  • Posts: 417
Re: Restart DCS-932L using Curl/Wget/Http Command
« Reply #11 on: November 30, 2016, 01:53:24 PM »

@rjms -
Thanks for that sample, I found it!
Mine was the same up through YWRtaW46, then different.
Finally realized that I needed to delete the "<" and ">" symbols. Then it worked from my Mac's Terminal.
You guys (mch, belnox, rjms) are truly awesome.
Logged