Optimal way for communicating boards - DUE / RaspberryPi / Igep

Hi, I'm looking for the best way to communicate different platforms, and I wanted to know how people usually does it.

By "communicate" I mean being able to send many bytes (100) from one board to the other and viceversa, so both boards should be able of sending data, I really don't care if its under demand or freely at any time.

Rigth now I am using Serial to communicate DUE with IGEP (Igep is similar to raspberryPi, but more expensive), but its low speed and its low reliability made me think that maybe I should try different way of communication.

I said low reliability because I was having some (unfrequently) communication errors, where checksum failed, or packets lost, and slowdowns in receiving data, etc. Maybe all these is caused by my poor knowledge of Linux programming...

Well, any idea? How would you do it? Thanks!


Maybe it helps if I add some extra info...

Now I am using Serial TTL, and sending around 64 bytes of info from DUE to Igep, that Igep proceses and later sends back 24 bytes with the result, and that happens every 20 ms or so.

I am considering other options like I2C, SPI, USB Serial... Problem I see with I2C and SPI is that I find it difficult to make it a 2 ways communication with many bytes, but maybe I am wrong.

I'd like to know your experience about this... or maybe Serial TTL is the best way?

Serial is a good way..I²c and SPI would also work..I²C wich is considered a low bandwith protocol could cope with 64 + 24 bytes in 20ms. The sam3X on the arduino board has an I²C controler that can work up to 400kHZ. SPI can be much faster.

But if your serial works, you should stick with it i think. What is strange is that you have numerous checksum errors. Igep (if similar to raspberry pi) is not running on a real time OS, so that might be the problem. Specially if other demanding programs are running at the same time. There must be a way to give a higher priority to your program but i can't help you ! I'm also a newbie at programming Linux program. Keep me posted if you can. I'm curious to know how you will solve that.