RE: File transfer

2023-09-09 Thread Gustavo Soares
Do you have any example of how it should be done?

De: Gregory Nutt 
Enviado: sábado, 9 de setembro de 2023 13:51
Para: dev@nuttx.apache.org 
Assunto: Re: File transfer

On 9/9/2023 9:43 AM, Gustavo Soares wrote:
> So I have to create and mount a directory to my HTML file and tranfer it to 
> this directory? Even if I have the HTML file embedded on compile?
No transfer is necessary.  The ROMFS file system can be built into the code.


Re: File transfer

2023-09-09 Thread Gregory Nutt

On 9/9/2023 9:43 AM, Gustavo Soares wrote:

So I have to create and mount a directory to my HTML file and tranfer it to 
this directory? Even if I have the HTML file embedded on compile?

No transfer is necessary.  The ROMFS file system can be built into the code.


RE: File transfer

2023-09-09 Thread Gustavo Soares
So I have to create and mount a directory to my HTML file and tranfer it to 
this directory? Even if I have the HTML file embedded on compile?

De: Gregory Nutt 
Enviado: sábado, 9 de setembro de 2023 12:33
Para: dev@nuttx.apache.org 
Assunto: Re: File transfer

On 9/9/2023 9:21 AM, Gustavo Soares wrote:
> Maybe I don't have to transfer the file to the tmp folder. I think the folder 
> the app is reading is not the app folder but the root, so it won't find the 
> file. Is it possible to access the built-in apps folder on NuttX?  So I can 
> make the app to read its folder.

I don't understand this.  There is no built-in apps folder??? This works
just like it does in Linux:

A folder is a directory in a volume.  You must explicitly mount the
volume using the mount() interface (or perhaps the NSH mount command).
Often mount() is called from board level logic on power up using a file
system image in memory or on media like an SD card.  There are lots of
examples in the board directory.

Only your logic knows where you mounted the volume.

Even the tmp/ directory will not exist unless you create and mount it
yourself at tmp/.  It does not appear magically.



Re: File transfer

2023-09-09 Thread Gregory Nutt

On 9/9/2023 9:21 AM, Gustavo Soares wrote:

Maybe I don't have to transfer the file to the tmp folder. I think the folder 
the app is reading is not the app folder but the root, so it won't find the 
file. Is it possible to access the built-in apps folder on NuttX?  So I can 
make the app to read its folder.


I don't understand this.  There is no built-in apps folder??? This works 
just like it does in Linux:


A folder is a directory in a volume.  You must explicitly mount the 
volume using the mount() interface (or perhaps the NSH mount command).  
Often mount() is called from board level logic on power up using a file 
system image in memory or on media like an SD card.  There are lots of 
examples in the board directory.


Only your logic knows where you mounted the volume.

Even the tmp/ directory will not exist unless you create and mount it 
yourself at tmp/.  It does not appear magically.




RE: File transfer

2023-09-09 Thread Gustavo Soares
Maybe I don't have to transfer the file to the tmp folder. I think the folder 
the app is reading is not the app folder but the root, so it won't find the 
file. Is it possible to access the built-in apps folder on NuttX?  So I can 
make the app to read its folder.

De: Gregory Nutt 
Enviado: sábado, 9 de setembro de 2023 11:34
Para: dev@nuttx.apache.org 
Assunto: Re: File transfer


>
> *And about rz, do use the same console of shell ? Zmodem*
>
> Yes.

That might be a problem with tat?  In the past, NSH used special logic
that to handle the requirements of a COOKED mode terminal: character
echo, CR-LF expansion, etc.  These changes were implemented (mostly) in
NSH so that NSH could share the terminal with applications that needed
RAW mode.

But that has changed recently.  The serial console is now in a true
COOKED mode that is in the serial driver level and independent of NSH.
That means that if you want to run the console in RAW mode, you will
need to use termios commands to explicitly switch to RAW mode like:

  * Save current termios settings
  * Force RAW mode

And when finished:

  * Return to COOKED mode (using saved settings)

Do you think that could be part of the issue?


Re: File transfer

2023-09-09 Thread Gregory Nutt




*And about rz, do use the same console of shell ? Zmodem*

Yes.


That might be a problem with tat?  In the past, NSH used special logic 
that to handle the requirements of a COOKED mode terminal: character 
echo, CR-LF expansion, etc.  These changes were implemented (mostly) in 
NSH so that NSH could share the terminal with applications that needed 
RAW mode.


But that has changed recently.  The serial console is now in a true 
COOKED mode that is in the serial driver level and independent of NSH.  
That means that if you want to run the console in RAW mode, you will 
need to use termios commands to explicitly switch to RAW mode like:


 * Save current termios settings
 * Force RAW mode

And when finished:

 * Return to COOKED mode (using saved settings)

Do you think that could be part of the issue?


RE: File transfer

2023-09-09 Thread Gustavo Soares
why do need transfer during execution and not embbed on compile ?

 I don't need to transfer during execution, I need to transfer the file to the 
tmp folder once to read it every time a request is made. Also, I actually have 
the HTML file in the same folder as the main application file, but the server 
app fails to read it as if the file didn't exist.

And about rz, do use the same console of shell ? Zmodem

Yes.

De: MIGUEL ALEXANDRE WISINTAINER 
Enviado: sábado, 9 de setembro de 2023 08:36
Para: dev@nuttx.apache.org 
Assunto: Re: File transfer

Two question, why do need transfer during execution and not embbed on compile ?
And about rz, do use the same console of shell ? Zmodem

Enviado do meu iPhone

Em 9 de set. de 2023, à(s) 00:30, Gustavo Soares 
 escreveu:


Hi!

 My new application has a html file and in order to access it I need to 
transfer the file to the tmp directory on NuttX. I have configured NuttX 
according to this video but when 
running rz command and CTRL + A + Z the screen in the video does not appear, 
this is what happens instead:

[image.png]

Am I missing some configuration?