How can i send a (file) from PC to Arduino Yun at running time ?
There's a way to send some commands via Serial. But how would a whole file goes ? Assuming the file can take place at RAM without any problems.
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It only takes a minute to sign up.Sign up to join this community
The first question is what do you want to do with your image : Arduino Yun has a Linux chip & an Arduino chip. And I don't think that image treatment must happen in the Arduino side... So you can send your image with scp to Linux side, then do what you want with it and perhaps, eventually, send the result for action to the Arduino part.
Back in the mists of time (late 1990s, if anyone's counting), there existed a file transfer protocol called XMODEM that was used to send a file across a link normally used for a terminal, on small, publicly available systems known as Bulletin Board Systems, or BBSes. XMODEM divided a file into packets of 129 bytes, sent and acknowledged one packet at a time. It had a simple 8-bit checksum to verify the file contents which was just "ok" over a reasonably reliable line, line and inadequate on a noisy one. But it was one of the first experimenter-built and widely used protocols.
As it was pushed harder and harder (larger file sizes, higher line speeds intolerant of the small, single-packet handshake) and its weaknesses became more problematic,a number of derivatives were developed to address the weaknesses.
ZMODEM was one of those, which allowed the sender a "sliding window" of packets, so it could keep sending packets (up to the window maximum) without stopping to wait for each acknowledgement, and could use larger packet sizes, among other improvements.
They are relatively easy to implement, XMODEM more-so, and source code or specs can be found by looking around.
If your files aren't horrendously large and the lines are fairly reliable, even XMODEM may be adequate.