An example program for SerialFileTransfer, receives files from a java application and stores them on the LocalFileSystem

Dependencies:   MODSERIAL SerialFileTransfer SimpleSerialProtocol mbed

SerialFileReceiver allow the mbed to receive a file using binary packets over the serial connection,

you can test the library with this java application /media/uploads/p3p/mbedserialfiletransfer.zip

the arguments to the command are, Comport Baudrate file to see the console output use java, not javaw

Example command: java -jar SerialTransfer.jar com3 115200 test.bin

Files at this revision

API Documentation at this revision

Comitter:
p3p
Date:
Fri Sep 19 15:56:23 2014 +0000
Parent:
3:116c45e2a41e
Commit message:
SimpleSerialProtocol api change (default codec used automatically)

Changed in this revision

SimpleSerialProtocol.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/SimpleSerialProtocol.lib	Thu Sep 18 17:49:08 2014 +0000
+++ b/SimpleSerialProtocol.lib	Fri Sep 19 15:56:23 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/p3p/code/SimpleSerialProtocol/#43794e0b738f
+http://mbed.org/users/p3p/code/SimpleSerialProtocol/#5caff50e14a7
--- a/main.cpp	Thu Sep 18 17:49:08 2014 +0000
+++ b/main.cpp	Fri Sep 19 15:56:23 2014 +0000
@@ -9,9 +9,8 @@
 SFTProtocol fileAcceptor;
 
 int main() {
-    //initialise the comm port at 155200 baud and use the default codec
-    SimpleSerialProtocol::Codec codec;
-    comms.initialise(115200, &codec);
+    //initialise the comm port at 155200 baud
+    comms.initialise(115200);
     //listen for packets of type 1 and relay the data to the onFileStart callback in SFTProtocol
     comms.receiveCallback(1, &fileAcceptor, &SFTProtocol::onFileStart);
     //listen for packets of type 3 and relay
--- a/mbed.bld	Thu Sep 18 17:49:08 2014 +0000
+++ b/mbed.bld	Fri Sep 19 15:56:23 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file