Possible transferrate via Ethernet

Hello everybody!
Currently I am working on a project to control devices over an network by a self designed generic and dynamic porotocol. As soon as it will be ready I'll release the git repository of the library.

Hardware I may use for development:

  • Arduino Uno, Duemilanove, Mega ADK Boards
  • Redfly-Shield (wlan)
  • GSM Shield

Details:

  • Arduino + Shield for Internetconnection acts as Client
  • Connects to Server and receives instructions via my protocol

My first steps are to get to know how much is possible on the Arduino and the Redfly shield. My plan is to make my protocol/lib compatible to the Uno/Duemilanove especially regarding the RAM-usage.

Since I am quite new to Arduinos and also a starter in C++ languages it is hard for me to measure the Hardware limits.
It would be really nice to get some input what is possible and where the limits are. Thank you very very much for any hint, experience and so on!!

Questions (no. 1 is the more important question for me):

  1. How much payload may I send via TCP (or, if there are big advantages via http) and still be able to process it with the Arduino? In other words: How many bytes may I send to the Arduino (estimated) without breaking the total limits of ram? Has anyone any suggestions what would be a good maxium value?

  2. Would plain TCP (I guess this is what the 'normal' ethernet methods offer) be the best way for it? (I do not really like UDP since I need some reliability but if it's worth the price I would also take this one)

Again, Thanks for any answer!! :slight_smile:

Regards,
themilkman

Edit: In the Webclient example of the redfly shield I found an char Array which is initialized with the size of 1024. Is it correct that this means that an receive-Cache of 1024 chars is possible and realistic?
Edit2: Seller/maybe Dev of the Redfly Board also responded me and said that this should not be a problem at all.

Questions (no. 1 is the more important question for me):

  1. How much payload may I send via TCP (or, if there are big advantages via http) and still be able to process it with the Arduino? In other words: How many bytes may I send to the Arduino (estimated) without breaking the total limits of ram? Has anyone any suggestions what would be a good maxium value?

  2. Would plain TCP (I guess this is what the 'normal' ethernet methods offer) be the best way for it? (I do not really like UDP since I need some reliability but if it's worth the price I would also take this one)

You may send as much as you like, but the payload depends on packetsize. If you send char by char it will have much overhead, if you send blocks of 1024 bytes the overhead will be 1000 times less. HTTP and TCP are typical same order of performance (HTTP is a protocol above TCP so it is in fact slower) UDP is faster than TCP but as it is a user datagram protocol packets may be dropped. Thats why it sometimes is refered to as unreliable datagram protocol. (TCP does a handshake whcih checks that a packet arrives at theother side. SO it uses minimal 3 packets wher UDP only uses 1. Does not mean that it is 3x as slow but ...

In my experiences the practical limit is around 4000-5000 bytes per second. The amount of RAM of the Arduino does not limit the amount you can send or receive, it limits the amount you can buffer to process.

Question is how much data do you think you will send?

NB you can send easily 10K per second over the serial line to a PC which can do far more internet packets ....but that adds a PC to your system...

Hi Rob,
thanks for your detailed response!

Sounds like my problem should be solvable through good Data processing.
Anyway caching data of about max 1024 Bytes also shouldn't be the biggest problem I hope.
Since I want to control the Arduino I'll have to send a bucket of commands and some event registration but there should be a way to compress the overhead.

TCP will be the better choice for what I do.

Best Regards and thanks again!

You are welcome,

Do you have estimates about the bytes/second you want to send?

robtillaart:
Do you have estimates about the bytes/second you want to send?

I want to set up some kind of remote control for Arduino Boards. Therefore I need to submit controll statements to the Arduino, parse and process them. Those Data will I send via TCP I guess.

Best Regards,
themilkman

OK, let me rephrase, do you have an estimate about the number of commands per second? 1,10,100,1000 (and that is about the limit)

robtillaart:
OK, let me rephrase, do you have an estimate about the number of commands per second? 1,10,100,1000 (and that is about the limit)

I guess I will set a practical limit of about 1024 Bytes in my protocol specification. Depending on usage there could be multiple requests in a time - e.g. within one second. But that's just an edge case.

So, all in all there will be about max. 1024 Byte at once (for e.g. 30 seconds).

Regards,
themilkman

1KB /sec should be no problem at all.

robtillaart:
1KB /sec should be no problem at all.

Thanks for this information! :slight_smile: