D-Link Forums
The Graveyard - Products No Longer Supported => IP Cameras => DCS-942L => Topic started by: tomer on February 23, 2014, 02:42:08 AM
-
This has been bugging me for sometime. Only yesterday I found out about the telnet access and tried to figure out how to start a FTP service from it but no joy, as the busybox doesn't have the inetd module for a simple FTP access.
So I started meddling with its HTTP server (lighttpd) and noticed everytime I change its configuration, the service init script actually rewrites the conf. file :-\
My workaround was, to start another lighttpd server on a different port which will show the content of the SD card
and download specified directory using wget.
My camera address is 10.0.0.20
1. enable telnet server
http://10.0.0.20/cgi/admin/telnetd.cgi?command=on
2. login to cam's busybox
telnet 10.0.0.20
user: root
password: admin
3. create a new lighttpd configuration file to run on a different port (i chose port 3000)
vi /etc/lighttpd/light.conf
(press i for text insertion)
server.document-root = "/mnt/usb/dcs-942l/"
server.port = 3000
dir-listing.activate = "enable"
press esc
type :wq and enter to write the file and exit
notice - "/mnt/usb/dcs-942l" i believe is the default sd directory which is created when formatting the sd card the standard way. make sure it's the same name on your camera by typing
ls /mnt/usb
4. start the extra lighttpd daemon:
lighttpd -f /etc/lighttpd/light.conf -m /lib
you should get a message that the server started successfully.
5. exit telnet (by exit command) and browse to your newly created web server at
http://10.0.0.20:3000
you should see a list of all the directories on the SD card.
6. download a directory
i'm running Linux so I used wget, I'm sure there are other options for Windows
or you could use wget for windows http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe
wget -r -l2 --no-parent -A.avi http://10.0.0.20:3000/20140222/
r stands for recursive,
l stands for directory level,
-A.avi will download only AVI files
and the http address is an example of a certain date i downloaded,
you can get the exact http address required, from your web browser by right clicking on a directory and copy link address.
There you have it. Wget will download all video files from the directory .
don't forget to close the telnet access
http://10.0.0.20/cgi/admin/telnetd.cgi?command=off
restarting the camera will close the extra lighttpd server, i don't think it's a good idea to add it to its startup script.
-
Thanks for the steps. I like this. But is there a way to password-protect "http://10.0.0.20:3000/"?
-
yes, I improved the light.conf file since . here's the new one:
server.modules += ( "mod_auth" )
server.document-root = "/mnt/usb/dcs-942l/"
server.port = 3001
ssl.engine = "enable"
ssl.pemfile = "/tmp/server.pem"
ssl.cipher-list = "RC4-MD5 RC4-SHA AES128-SHA AES256-SHA DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA"
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/tmp/lighttpd-htdigest.user"
auth.require = (
"/" =>
(
"method" => "basic",
"realm" => "DCS-942L",
"require" => "user=admin"
)
)
dir-listing.activate = "enable"
it will only accept the admin password.
the server now listens on https port 3001
to start the sever use
lighttpd_ssl -f /mnt/usb/dcs-942l/light.conf -m /lib
i noticed that after every camera restart the file would get erased so now i'm storing it on the sd card .
also, my wget command now is
wget -r -l2 --no-parent -A.avi --http-user=admin --http-password=password --no-check-certificate https://10.0.0.20:3001/20140227
-
Thanks. Will try it soon.
-
Thank you tomer! I will try that on DCS-2332L ..
-
1. enable telnet server
http://10.0.0.20/cgi/admin/telnetd.cgi?command=on
Telnet access has been removed in V2.11.04 23 :-(
http://forums.dlink.com/index.php?topic=65669.0 (http://forums.dlink.com/index.php?topic=65669.0)
-
You could downgrade FW.
-
by any chance, do you have an older firmware saved?
-
http://support.dlink.com/ProductInfo.aspx?m=DCS-942L (http://support.dlink.com/ProductInfo.aspx?m=DCS-942L)
-
had to downgrade my rev A camera back to firmware 1.22 to get the telnet login working again . also , it asked to format the SD card
-
Glad you got it working. Seems the telnet was removed from V2.xx FW.