Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Storage / Re: Long file name reading with SdFat on: August 25, 2014, 10:51:45 am
Hi ViviKFF
Did you read this post?
http://forum.arduino.cc/index.php?topic=171663.0
You can loop into a directory until you find the long name (or the short name) of the file/subdirectory you are looking for.
Then you can open it using his short name and the normal functions of the library.
2  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: August 22, 2014, 11:01:02 am
Quote
Now I use DUE board and able to be compiled with no error.
Previously I used UNO board.
This is good news.
Do not hesitate to let me know of other doubts.
3  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: August 13, 2014, 01:05:03 pm
Hi badank
I use ide version 1.5.6-r2.
Don't forgot than each time you use a new ide, you have to update the content of the 'libraries' directory.
And to make thinks a little more confusing, some libraries, like the one for Ethernet, had change their location along the different versions of ide.
I told you that, because the first lines of the code for EthernetServer.cpp that you copy in your third post let me think they belong to an older version of the ide:
Quote
#include "w5100.h"
#include "socket.h"
This was correct when Ethernet library was at arduino-1.5.2/hardware/arduino/sam/libraries/Ethernet (example of ide 1.5.2)

In the last versions of ide, file EthernetServer.cpp begin with:
Quote
#include "utility/w5100.h"
#include "utility/socket.h"
This is the case with ide 1.5.7. the code of library for ethernet used by ide 1.5.7 is at arduino-1.5.7/libraries/Ethernet/src

This is what drew my attention and let me think you may be don't modify the correct files. Can you check this and tell me the result?

(In case I am right, remember that you have to modify the new file, not copy the old version to the new directory.)
4  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: August 12, 2014, 04:57:15 pm
Hi badank
Your modification to EthernetServer.cpp looks like correct.
I guess you modify too EthernetServer.h and that you restart the ide in order to take in account your modifications.
So I don't see why the error persists.
Unless you have multiple versions of the ide and you don't modify the one you are using?
By the way, what version are you using?
5  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: August 12, 2014, 09:01:17 am
Quote
C:\Program Files\Arduino\libraries\BS_Arduino-Ftp-Server-master\FtpServer.cpp: In member function 'void FtpServer::service()':
C:\Program Files\Arduino\libraries\BS_Arduino-Ftp-Server-master\FtpServer.cpp:121:24: error: 'class EthernetServer' has no member named 'connected'
     client = ftpServer.connected();
                        ^

Hi badank
Did you modify EthernetServer.h and EthernetServer.cpp as I explain in FtpServer.ccp on lines  11 to 32 ?
Remember to restart the ide after you make the modification.
6  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 25, 2014, 12:15:45 pm
Quote
I spent some time debugging this FTP server library after the RX poor performances.

After reading your post I make the following comparative test:
I run the ftp server on three hardware configurations:
 - Arduino Mega 2560 with Arduino Ethernet shield ( based on Wiznet 5100 )
 - Arduino Due with the same Arduino Ethernet shield
 - Arduino Due with Wiz820io module ( based on Wiznet 5200 )
The Wiz820io module is not 5V compliant, so  I can't connect it to the Mega 2560.
In all configurations I upload the same file of 3,7 Mega bytes from a FtpRush client.
The results:
   time   speed
Mega + W5100   8m 44s   7,33 kbytes/s
Due + W5100   8m 43s   7,33 kbytes/s
Due + W5200   22,12s   173,5 kbytes/s

Using the Wiznet 5100, I obtain the same speed with both boards, so it is obvious the Wiznet 5100 is the bottleneck. You get the same conclusion:
Quote
this function is called many times, waiting the W5100 to have something in his RX buffer

With Arduino Due, Wiznet 5200 is approximately 20 times faster than Wiznet 5100. According to the documentation, this is mainly due to the High Speed Serial Peripheral Interface (SPI Mode 0,3) of the Wiznet 5200. I read somewhere than the SPI frequency of Wiznet 5200 is 80 MHz anf only 4 MHz for Wiznet 5100. That is the same ratio than I get with my test.
But replacing the Wiznet 5100 by a Wiznet 5200 on an Arduino Mega 2560 would not increase the speed so much. Because the next limitation would be the max speed of the SPI interface of the ATmega2560. As it is clocked to 16MHz, I guess the speed limit of the SPI interface is the half, 8 MHz.

So, "the RX poor performance", as you say, is due to your hardware.

Note that they are now several manufacturers of shields equiped with the Wiznet 5200, so you don't need to adapt a Wiz820io as I do. And they work with 5V or 3,3V boards.
7  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 14, 2014, 08:03:57 pm
Quote
Could You tell me which libraries you used.
you need to install SdFat and Streaming libraries

Use version 1.5.6-r2 of Arduino IDE
Don't forget to modify iostream.h  of SdFat library as explained in Reply #17
And modify EthernetServer.h and EthernetServer.cpp as explained in the header of FtpServer.cpp
8  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 10, 2014, 09:19:56 pm
I upload to GitHub the last version of my Ftp Server.
It now also works with Arduino Mega2560
The software is on GitHub at http://github.com/gallegojm/Arduino-Ftp-Server
9  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 09, 2014, 03:25:29 pm
Quote
My Arduino IDE is 1.0.5 version Windows and try this with Mega2560
I suggest you to download version 1.5.6-r2 of Arduino Software
They said it is beta but it is really stable.
I probe just now to compile FtpServeur.ino selecting Arduino Mega2560 with no problem
Remember to make the change suggested by Thierry:
Code:
FtpServer.cpp : line 101 : millisTimeOut = FTP_TIME_OUT * 60 * 1000 => millisTimeOut = (uint32_t)FTP_TIME_OUT * 60 * 1000;
10  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 09, 2014, 02:22:01 pm
Quote
But only see this error compiling FTPServeur:

In file included from D:\Arduino\arduino-1.0.5\libraries\SdFat/SdStream.h:27,
                 from D:\Arduino\arduino-1.0.5\libraries\SdFat/SdFat.h:39,
                 from /FtpServer.h:31,
                 from FtpServer.cpp:20:
D:\Arduino\arduino-1.0.5\libraries\SdFat/iostream.h: In function 'ostream& endl(ostream&)':
D:\Arduino\arduino-1.0.5\libraries\SdFat/iostream.h:40: error: 'ostream& endl(ostream&)' redeclared as different kind of symbol
D:\Arduino\arduino-1.0.5\libraries\Streaming/Streaming.h:100: error: previous declaration of '_EndLineCode endl'

You right.
I forgot to mention that endl is defined twice: once in Streaming.h (line 100) and again in iostream.h of SdFat library.
So you have to eliminate one of this definition.
I comment lines 40 to 43 in iostream.h
Code:
/** insert endline
 * \param[in] os The Stream
 * \return The stream
 */
 /*             <==  ADD THIS LINE
inline ostream& endl(ostream& os) {
  os.put('\n');
#if ENDL_CALLS_FLUSH
  os.flush();
#endif  // ENDL_CALLS_FLUSH
  return os;
}
*/            <==  AND THIS
The error must disappear, keep me informed
11  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: June 07, 2014, 05:36:35 pm
Remember you need to install SdFat and Streaming libraries in order to run this sketch
Have a look a this link if you don't know how to install libraries: http://arduino.cc/en/Guide/Libraries
12  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: May 20, 2014, 07:30:54 pm
Quote
Concerning the change I made :
FtpServer.cpp : line 101 : millisTimeOut = FTP_TIME_OUT * 60 * 1000 => millisTimeOut = (uint32_t)FTP_TIME_OUT * 60 * 1000;
I did that because the timeout systematically triggered because millisTimeOut was not casted to uint32.
Thank you Thierry for the correction.
It is not necessary with the 32 bit CPU of a Due but needed with the Mega.
Speaking of Due and Mega... I think that once you have replaced the ethernet controller with a W5200, throughput will be limited by the speed of the ATmega2560. Maybe you have to consider the use of an Arduino Due
By the way, your project looks great!
13  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: May 16, 2014, 11:30:37 pm
Quote
I made some debugging and found that the data.read call in FtpServer::doStore very often returns 0 meaning the Arduino board is waiting for the FTP client to send something

More precisely, the Arduino is waiting for the ethernet controller to receive data. The latter is the bottleneck, not the FTP client.
14  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: May 16, 2014, 11:53:50 am
First of all, I am happy to know that this application runs on an Arduino Mega.
Secondly, I would like more clarification on the 'tiny bug fix'. Is it specific to Mega?
There certainly has room for improvement in my code, or to correct errors.
About the transfer velocity, as you know, this is the slowest link which affects the final speed.
Here, I think the most penalizing links are ethernet controller, memory card and how it is connected to the microcontroller.
With a Wiznet Wiz820io and a generic micro SDHC card connected directly to the SPI bus of an Arduino Due (only possible with 3V3 micros, don't try this with your Mega!) I get write transfers above 130 Kbytes per second speeds on files of several mega size, using FTP Rush
I made my first test with an ethernet shield equipped with the W5100 controller and I remember that the bitrate was in the order you specify.
You can now find shields equipped controller W5200, without the necessity to adapt a Wiz820io yourself as I do
About Filezila: do you have the same problem as me, about the fact that FileZila seeks to reconnect before starting a transfer?
Thank you for your interest in my library
15  Using Arduino / Networking, Protocols, and Devices / Re: Ftp Server on Arduino on: May 16, 2014, 11:51:56 am
I receive this message from Thierry and I think this discussion may be of interest to other people, so I transcribe his message:
Quote
Hi,

I recently had to implement a FTP server on a Arduino Mega board and I found yours very interesting !
It works fine after a tiny bug fix (timeout casting).

My problem now is that it is quite slow when storing data on my embedded SD card.
I made some debugging and found that the data.read call in FtpServer::doStore very often returns 0 meaning the Arduino board is waiting for the FTP client to send something. I tried with several FTP Client as Filezila running on a PC and it seems the consequence of this is that the maximum rate is abouty 10 KBits/s...

Did you face this kind of problem as well ?

Thanks for your help and, once again, thanks a lot for your hard work on the FTP protocol implementation !

Regards,
Thierry
Pages: [1] 2 3 ... 5