I'm very interested to know the maximum transfer speeds that have been achieved by Arduino acting as a file server using the various network protocols such as RS232 vs Bluetooth vs TCP vs FTP vs Wifi. If someone has done a proper comparison I'd love to see it.
I've been scouring the net over the last few weeks and have found various webserver examples, and implemented a few myself, but I still can't seem to get the transfer speeds I need. The BEST rate I've got so far is 80kB/s via ethernet webserver, and about 2kB/s via WiFi. I've read of people getting 240kB/s via ethernet on custom light FTP servers so I know it's got to be possible to improve my speeds. I'm guessing it's my newb SPI and buffering code that might be inefficient. I've outlined some summary info below. I'd really appreciate any input on this from the pros!
And just to clarify - the arduino is the file server not the client for this scenario, and is serving files from the SD card to a client computer.
My Setup Ethermega (ATMega256) SD Card (via SPI) ATWINC1500 WiFi (IEEE 802.11 b/g/n running on SPI). File Serve Method: HTTP Webserver accessed by a client browser (Console access for RS232).
MAXIMUM SPEEDS ACHIEVED
RS232: 14kB/s Via console I can serve large files direct from the SD card at around 14KB/s at 115200 baud (which is essentially the bit rate in short distance digital serial comms). As expected.
Bluetooth: ? Not tested yet. I understand the bluetooth protocol supports up to 50Mbit/s in theory, however in reality Bluetooth 4.1 you can get about 1Mb/s (125kB/s) and the upcoming Bluetooth 5 is touted for 2Mb/s (333kB/s) max throughput (wikipedia). I suspect performance may also be severely constrained on a microcontroller like arduino. I'm guessing you might double 114200baud speeds to say 30kB/s?
HTTP webserver - Ethernet (TCP/IP): 80kB/s I implemented Sean Ashton's WebDAVNav web based file server and modified it to server HTML not XML. Got it serving files from the SD card at 80kB/s. Tried to get sirleech's Webduino server going to no avail.
HTTP webserver - WiFi (TCP/IP): 2kB/s I modified standard WiFi Webserver and coded SPI handling to share the SPI Wifi and SD card to serve files via HTTP GET method. It worked but is horrendously slow. Suspect my buffering code. I also looked at the Jaycar example of a WiFi webserver, however it uses the older style WiFi shield that uses serial, not SPI. So it's limited to serving at 500bytes/second.
Ethernet FTP fileserver (TCP/IP): ? Not tested. I haven't implemented a light FTP server. I've read of people claiming 255kB/s transfer speeds using a Due. This is impressive. Also note another few FTP file servers I found: https://github.com/mihaigalos/FTPino http://github.com/gallegojm/Arduino-Ftp-Server
Summary Basically I'm trying to get the best possible wireless transfer speeds, preferably by a simple WiFi HTTP file server, so the client browser can rapidly download files from the arduino SD card.
Thanks everyone :) Dan