File Transfer (peer to peer) using two motes

After receiving requests from so many people, I thought of writing this simple application which can transfer file between two computers

  1. Environment used is: TinyOS 2.1.0 with Ubuntu
  2. Knowledge to compile "BaseStation" application (coming with TinyOS) with a modification in Makefile : CFLAGS += - TOSH_DATA_LENGTH
  3. Basic understanding of file operations in Java
  4. No other nodes are in the vicinity which are transmitting data at that time
  5. Run SerialForwarder with Java applications in TinyOS
  6. Transfer is only for "text files"
If not, please refer my previous posts on these topics or read from tinyos wiki/documentation

  1. Download the code from here
  2. Install BaseStation in two motes
  3. Put one mote in computer 1 and other in computer 2.
  4. Run the SerialForwarder

Sender /Receiver
  1. ECopy the FileSender folder
  2. Open a shell, navigate to this above folder
  3. Type in CLASSPATH=/opt/tinyos-2.1.0/support/sdk/java/tinyos.jar:.
  4. Type in make
  5. Type in java FileSender
  6. Repeat the same with Receiver
  7. Enter the file name with absolute path and extension at sender side
  8. Wait for the message "File ended"
That is all folks :-)

  1. Please come up with a reliable file transfer (like ftp)
  2. Please fix this code for any (byte) file instead of text files
  3. If you do any/both, please upload and post the link here