• March 28, 2024, 08:43:23 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: Download SD-Card content - my workaround solution  (Read 12155 times)

tomer

  • Level 1 Member
  • *
  • Posts: 7
Download SD-Card content - my workaround solution
« 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.













« Last Edit: February 23, 2014, 03:10:13 AM by tomer »
Logged

muzzee

  • Level 1 Member
  • *
  • Posts: 2
Re: Download SD-Card content - my workaround solution
« Reply #1 on: May 11, 2014, 08:27:01 AM »

Thanks for the steps. I like this. But is there a way to password-protect "http://10.0.0.20:3000/"?
Logged

tomer

  • Level 1 Member
  • *
  • Posts: 7
Re: Download SD-Card content - my workaround solution
« Reply #2 on: May 11, 2014, 08:43:46 AM »

yes, I improved the light.conf  file since . here's the new one:

Code: [Select]
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




« Last Edit: May 11, 2014, 08:48:09 AM by tomer »
Logged

muzzee

  • Level 1 Member
  • *
  • Posts: 2
Re: Download SD-Card content - my workaround solution
« Reply #3 on: May 11, 2014, 09:49:24 PM »

Thanks. Will try it soon.
Logged

fousa

  • Level 2 Member
  • **
  • Posts: 45
Re: Download SD-Card content - my workaround solution
« Reply #4 on: June 06, 2014, 07:43:07 AM »

Thank you tomer! I will try that on DCS-2332L ..
Logged

sillywalks

  • Level 1 Member
  • *
  • Posts: 1
Re: Download SD-Card content - my workaround solution
« Reply #5 on: May 02, 2017, 09:19:37 AM »

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
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Download SD-Card content - my workaround solution
« Reply #6 on: May 02, 2017, 10:56:13 AM »

You could downgrade FW.

Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.

tomer

  • Level 1 Member
  • *
  • Posts: 7
Re: Download SD-Card content - my workaround solution
« Reply #7 on: May 03, 2017, 12:11:15 AM »

by any chance, do you have an older firmware saved?
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.

tomer

  • Level 1 Member
  • *
  • Posts: 7
Re: Download SD-Card content - my workaround solution
« Reply #9 on: May 06, 2017, 05:49:34 AM »

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
« Last Edit: May 06, 2017, 05:51:47 AM by tomer »
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Download SD-Card content - my workaround solution
« Reply #10 on: May 06, 2017, 09:31:30 AM »

Glad you got it working. Seems the telnet was removed from V2.xx FW.
Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.