9 years, 4 months ago.

How to read/ write into file.txt on Personal Computer?

Hi all, I'm new to mbed and I need to write/read values into file.txt in my computer. I have a NUCLEO-F401RE board and I can't use the libray LocalFileSystem (LocalFileSystem is only implemented on the original LPC1768/LPC11u24 mbeds). I would like to know if there is some possibility to do that without to use, for example, a SD card to storage data. Thank you in advance!!

Question relating to:

2 Answers

9 years, 4 months ago.

Yes, you can
- use a transmission between Mbed and Pc, for instance serial
- write a program on the mbed, who send or receive messages
-the corresponding program on the pc
-design your messages...
This is possible...Another way is http://developer.mbed.org/cookbook/Interfacing-Using-RPC Good luck !

Accepted Answer

Thank you!! I'm starting to try to implement your advice... I Hope to achieve the goal!!

posted by Gaetano Randazzo 17 Dec 2014
9 years, 4 months ago.

Could there be a pendrive? Just for Nucleo F401 there is a library with MSD USB host. It works for me. See: http://developer.mbed.org/users/va009039/code/F401RE-USBHostMSD_HelloWorld/

Thank you for your answer! Yes, you are right and may be it is the best way... But I would like to understand if is possible to read/write data directly from/to a saved file.txt in my computer where the NUCLEO mbed is connected!! Could you give me some suggest about how to do that or I'm obligated to use an USB flash memory?

posted by Gaetano Randazzo 16 Dec 2014

Maybe one of file transfer protocols for serial (xmodem, Ymodem etc.)? From the side of Windows or Linux, there is a lot of applications that support these protocols. From the side of ARM, I suspect that they are ready implementations also in C or C ++.

posted by Nothing Special 16 Dec 2014

You can write a file on the mbed that the PC can read (USB MSD or SD card) or you can use serial or USB (or ehternet on some boards) to talk to a program running on the PC that then reads or writes the files.

You can't directly write to the computers hard drive. Letting USB devices autonomously modify files on the computer would be just about the biggest security flaw ever created.

posted by Andy A 17 Dec 2014