tags:

views:

86

answers:

4

Hi

I am running some experiments on an embedded platform. The problem is, that the memory ressources are limited; hence, I am thinking of writing the output into a file on a remote machine. I am wondering what is the best way to realise that? I am using C++ on the embedded platform. I was thinking of communicating over a TCP/IP socket with the host machine where I wanna store my file. Obviously, I would then also need to write a socket application for the host PC that handles the incoming data stream. But I am wondering if maybe WIN XP or Linux offers some kind of support for my needs so that I do not need to write a socket application for the host.

Thanks for some guideline in this matter.

A: 

You could make the embedded program act as an FTP client and run an FTP server on the main machine.

Zifre
Here is a C++ FTP library http://www.chilkatsoft.com/ftp-library.asp
Thomas
A: 

You could try Linux for Embedded Systems, look here for further infos:

Open Directory Embedded Systems

Wikipedia Entry

There's a lot of work that was already done by someone else. If avaliable I would use 'scp' for your purpose. If not there try to solve it with C++ and TCP/IP socket.

cb0
+2  A: 

I had a similar problem previously. I decided to use shfs to mount the remote file system and then just wrote to a file on it like normal.

mrduclaw
+2  A: 

On the host:

nc -l -p 9999 > log.txt

Then from the embedded system write to port 9999 of your logging host.

nc is netcat and can be found in most (Linux) distributions or here : http://nc110.sourceforge.net/

rve
next time I will spare myself writting a python tcp server ;)
neuro
+1 as you answer the question. Do not check it works :)
neuro
Just as a note, netcat generally comes with an additional parameter to make it stay listening for another connection after it's serviced someone. On my Ubuntu box, it's -k, and it'd look something like:nc -lkp 9999 >> log.txtThat might help the experiment so you wouldn't have to keep restarting netcat. And log.txt would just keep appending.
mrduclaw