-
hi everyone, I need help with reading files from ESP32 on Windows. I use nf-debugger to write a software settings file to the ESP32 flash and then read that file when the ESP32 boots. To write the file I use the "DeleteStorageFile" and "AddStorageFile" functions from DebugEngine, but there is no function in DebugEngine to read the file if I want to change the settings. I am currently using Debug.WriteLine to send the content of the file from the ESP32 to the Windows application every 5 seconds, but it would be better to read the file only on demand.
One more thing I want to mention: If I compile the code in Release, the "Debug.WriteLine" function stops working, so I have to compile it in Debug to be able to use this function. And sorry for my bad english. Edit: Using System.IO.SerialPort on ESP32 is not an option for me because all ESP32 pins are used. To open the SerialPort from nanoFramework on default RX/TX pins is also not an option because I can not upload the nanoframework projects anymore if the port is used for something else... Edit 2: I managed to do it like this: nanoFramework code:
Windows C# code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To read the file, you can easily write a small program that will download and read the file. For security reasons we've decided not to implement a too easy way to read the files at flash time.
Yes, because that's for debug :-) Use |
Beta Was this translation helpful? Give feedback.
To read the file, you can easily write a small program that will download and read the file. For security reasons we've decided not to implement a too easy way to read the files at flash time.
Yes, because that's for debug :-) Use
Consile.WriteLine
instead ;-) Those always stays regardeless if you are on Debug or Release modes.