D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-320L => Topic started by: QM75 on February 21, 2016, 02:10:43 AM

Title: FTP Step by step
Post by: QM75 on February 21, 2016, 02:10:43 AM
Thanks to all who helped me sort me finding my Dlink again :)

I am now looking to setup FTP, so I can connect my external Foscam IP Camera's.. Please does anyone have a step by step? As I don't know where to get the IP from, ect..

Thanks ;)
Title: Re: FTP Step by step
Post by: QM75 on February 21, 2016, 04:04:52 AM
I got as far as setting some things up, but get the below error when trying to connect

Error:   Disconnected from server: ECONNABORTED - Connection aborted
Error:   Failed to retrieve directory listing
Title: Re: FTP Step by step
Post by: QM75 on February 21, 2016, 09:13:16 AM
Been trying all day, but nothing stops this error... I feel that I'm nearly there, but somethings blocking me and I cannot think what?? :(
Title: Re: FTP Step by step
Post by: FurryNutz on February 21, 2016, 09:57:48 AM
http://forums.dlink.com/index.php?topic=64407.0 (http://forums.dlink.com/index.php?topic=64407.0)
Title: Re: FTP Step by step
Post by: QM75 on February 21, 2016, 10:18:41 AM
Cheers, did a search on the forum and looked at everything.. But nothing is working??
Title: Re: FTP Step by step
Post by: ivan on February 21, 2016, 01:55:40 PM
Before we can begin to help you more information is needed.

1) Are the camera and nas on the same network subnet (192.168.xxx.yyy  where the xxx are the same on both units)?

2) Do you have a manual for the camera and what model is it?  This is needed to find out how the camera uses FTP to communicate.

3) How do you setup the camera to send data over FTP to the nas?  Does it have an FTP server built in or does it rely on the FTP server of the nas?  This setup is very important because there will be a delay before the nas responds especially if it is sleep mode and this delay must be allowed for.

If you have a manual for the camera in PDF format could you PM me and I will give you an e-mail address to send a copy to, or can you give me the camera manufacturers site URL so I can see if I can download a copy from there.
Title: Re: FTP Step by step
Post by: QM75 on February 22, 2016, 12:13:46 AM
Yep, both on the same network.. I currently have my cam going to another FTP (I pay monthly) so wanted to stop that and do it myself.. So I know the C1 Lite Foscam camera works over FTP.. I have port forward setup in my BTHomehub5 and I think the settings are correct on my NAS..

But when trying to connect to my NAS with CuteFTP I get as far as per the above message..

Thanks all
Title: Re: FTP Step by step
Post by: ivan on February 22, 2016, 04:28:22 AM
OK with that information I downloaded the manual for your camera and section 4.4.8 FTP gives all the information you need assuming that you have setup the NAS FTP server correctly.

NAS FTP.
Log in to the nas web UI. 
Go to 'Management' --> 'Application Management'
Select FTP and fill in as necessary.
Then SAVE.
Next go back to 'Management' and select 'Account Management'
Select 'Network Shares'
Make sure you have the required share name and have selected FTP for that share.
log out of the NAS.

Now test to see if you have the nas FTP server up and running by downloading FileZilla and installing it.
Open FileZilla and fill in the IP address of your NAS, then the user name and password (the port can be left blank if it is 21), then click connect.
This should bring up the shate on the nas in the right hand section of the display.
If there are any problems read the connection log - top section.

IF you were able to login to the nas share with FileZilla you then use the same settings in the FTP dialogue on your camera - with the addition of changing 'FTP Mode' to PASV.
Click the test button and hopefully it will connect in which case you are up and running. 

This assumes that they are both on the same network and subnet. There are no changes that need to be made to the router because it is only acting as a switch and passing the data between the camera and nas.  The nas is the FTP server with the camera being the FTP client.

The only other thing I should say is that both the NAS and camera should have fixed IP addresses as this simplifies working together.

BTW, when you mention CuteFTP is that an addon or the one built into the nas (all of our nas boxes announce themselves as PureFTP)?
 
Title: Re: FTP Step by step
Post by: QM75 on February 22, 2016, 04:36:43 AM
Cheers mate.. I think the issue must be my NAS.. As everything is setup correctly on my cam
Title: Re: FTP Step by step
Post by: ivan on February 22, 2016, 04:41:23 AM
That is why I said use FileZilla to test the connection to the nas.  It gives all the logon/handshake information as it attempts to logon which will tell you where and what is going wrong.
Title: Re: FTP Step by step
Post by: QM75 on February 22, 2016, 06:21:07 AM
The error message I am getting is by using an FTP prog, sorry prob not super clear in the messages..

Cheers
Title: Re: FTP Step by step
Post by: ivan on February 22, 2016, 06:52:37 AM
OK.

For this to work you need to use the built in FTP server of the nas.  That way you end up like this:

IP Camera (FTP client) ----> Router ---->  DNS-320L (FTP server) with first ----> being wire or wireless. 

This is standard FTP usage over the local network.  Given the correct settings, any FTP client on the network can connect to the FTP server.
Title: Re: FTP Step by step
Post by: QM75 on February 22, 2016, 08:37:14 AM
Cheers.. Sorry to be a pain :) But would you be able to add a screen image of this in the NAS? As really stabbing in the dark here..:)

Thank you
Title: Re: FTP Step by step
Post by: ivan on February 22, 2016, 09:03:00 AM
I will put together a set of pictures later this evening (I'm night shift again) using the standard settings.  I will also include settings for your camera taken from the manual.
Title: Re: FTP Step by step
Post by: QM75 on February 22, 2016, 10:13:17 AM
Amazing :) thanks
Title: Re: FTP Step by step
Post by: ivan on February 22, 2016, 03:31:21 PM
Let me see if this works and makes sense to you.

Setting up the NAS FTP Server


Logon to the NAS and select Management.


(http://i63.tinypic.com/rau4oh.jpg)


Select Account Management, then Users/Groups and if necessary create a user  (I have os2 as the user because that is the catch all user here at work).


(http://i67.tinypic.com/16hnrch.jpg)


Now select Network Shares and make sure you have a Share Name and Path (create as necessary for your camera) them make sure it is shared over FTP (mine shows CIFS as well because this is our catch all NAS unit).


(http://i67.tinypic.com/2hphr8z.jpg)


Now go to Application Management and select FTP Server.  The default settings as shown in the picture should work (they do for us so we have never changed them).   Don't forget to save settings.


(http://i66.tinypic.com/98evrs.jpg)


You can log out of the nas at this point.


Testing the FTP Server is next.

Start FileZilla and fill in the Host (shown, 192.168.0.32 the default for the NAS box - you need to use whatever you have set your NAS box to), Username and Password then click Quickconnect.


(http://i63.tinypic.com/zj6vpx.jpg)


You should see very close to what is shown in the status box at the top.  If it connects it will show, as the remote site your nas FTP shares (in this example it is the root directory and then Volume_1)

The following is another FTP client connecting to the test NAS.


(http://i64.tinypic.com/qnwuit.jpg)


Assuming you were able to connect to the NAS using FileZilla we come to the FTP settings for the camera.


(http://i65.tinypic.com/25ul9cn.jpg)


In this I have used the same settings as in FileZilla for FTP server (Host), username and password, because this is the only way for the camera to see the FTP server.

Ftp mode is set to PASV,  This is the only extra setting you need.

Then click the test button and you should get the Success indication.

If you do, then your camera is talking with your NAS box and what is sent is up to you to set.


I do hope this will help you but as usual, if you have any questions please ask.  Also note the nas settings pages are from a DNS-320 not a DNS-320L so there might be slight differences.

Title: Re: FTP Step by step
Post by: QM75 on February 23, 2016, 10:06:21 AM
Hi mate, great work.. loving it..

The FTP connection works in Filezilla, but when I try adding the same details into the camera settings, I get an error saying: "FTP server address error" so not sure whats wrong??
Title: Re: FTP Step by step
Post by: QM75 on February 23, 2016, 10:38:38 AM
I assume I would also need to set a DIR on the NAS for the camera to save to? How do I make this DIR accessible online for the camera?
Title: Re: FTP Step by step
Post by: ivan on February 23, 2016, 11:00:30 AM
Good, at least we know the NAS FTP Server is up and running.

You should have set up a share directory in the 'Network Shares' section.  May I suggest something like 'camera' with its own user and password (the user and password would be the ones in the camera FTP setup.

Now I will try and guess what the people that wrote the camera software were thinking.  In the example they give for the FTP Server it starts with ftp:// so you could try, as my example ftp://192.168.0.32/  This should get you to the server with the user/password defining the directory (at least that is how it works for our security cameras and we don't need the ftp:// either).  Normally you only need the ftp:// in front of the IP address if you are trying to connect via a browser but then I am not going to try and get into the mind of Chinese programmers.

If you are still not able to connect to the NAS, try using ftp://192.168.0.32/camera and see what happens.
   
Title: Re: FTP Step by step
Post by: QM75 on February 23, 2016, 11:35:34 AM
Success!! Amazing mate.. Cheers for everything :) :)
Title: Re: FTP Step by step
Post by: ivan on February 23, 2016, 11:43:03 AM
Glad to have been of help.

Out of curiosity what did the camera FTP client need to be able to see the NAS?

Asked in order that it might help someone else.
Title: Re: FTP Step by step
Post by: QM75 on February 23, 2016, 12:09:16 PM
Added the FTP:// bit before the url