0

I want to read a file from my computer and display it on the board. But we are facing a problem while reading the file as the board is constantly resetting. (The Watchdog is off)

Can anyone help?

1
  • Please post some code to give us an idea what your program is doing. Jul 5, 2013 at 17:28

1 Answer 1

0

Here are the steps to upload a file:

If you want to read a file from your local drive only way to do it by uploading the file into coffee file system (cfs) first than read the file using cfs library such as cfs_open, cfs_seek, and cfs_read as a reference have a look into this link: https://github.com/contiki-os/contiki/wiki/Coffee-filesystem-guide

Modify the program ".c" file you are working to initialize the base64 and coffee commands in the shell by adding:

shell_base64_init();

shell_coffee_init();

Compile and upload via the command: make TARGET=platformuaresingnow example.upload

to read/upload .txt file by modifying some bash code. To do so, add the following lines

%.shell-upload: %.txt

 ``(echo; sleep 4; echo "~K"; sleep 4;``

     ``echo "dec64 | write $*.txt | null"; sleep 4; \``

 ``../../tools/base64-encode < $<; sleep 4; ``

    `` echo ""; echo "~K"; echo "read $*.txt | size"; sleep 4) | make login``

Now you can upload any .txt file to the coffee filesystem of the currently connected mote node using the command:

make testfile.shell-upload

Hope that it 'll solve your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.