Read response from console

2023-12-18 Thread Gustavo Soares
Hello everyone!

 I have some i2c devices connected to my ESP32 and I can get their values by 
using the i2c get command from NuttX. Now I need my app to extract the value 
from the response, so I enabled the popen() and pclose() functions but it still 
not possible to use them, is there any other config that must be enabled? Even 
the popen example can't find the method reference.

[cid:c47aa0c4-2e02-4f17-bd1f-886978ab8b37]

BR,
Gustavo.


Re: Read response from console

2023-12-20 Thread Alan C. Assis
Hi Gustavo,

Do you mean apps/examples/popen is not working?

I remember using popen() in the past to get the result of other program
output.

Best Regards,

Alan

On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares <
gustavo.felipesoa...@hotmail.com> wrote:

> Hello everyone!
>
>  I have some i2c devices connected to my ESP32 and I can get their values
> by using the i2c get command from NuttX. Now I need my app to extract the
> value from the response, so I enabled the popen() and pclose() functions
> but it still not possible to use them, is there any other config that must
> be enabled? Even the popen example can't find the method reference.
>
>
> BR,
> Gustavo.
>


RE: Read response from console

2023-12-20 Thread Gustavo Soares
Hi Alan!

 Yes, this message pops up when trying to compile:
[cid:cab804ea-8ff5-474e-8b8c-9a7ea51df5ad]

the problem seems to be in the apps/system/popen.
Should any other configuration be applied besides enabling the popen()/pclose() 
functions?


De: Alan C. Assis 
Enviado: quarta-feira, 20 de dezembro de 2023 08:15
Para: dev@nuttx.apache.org 
Assunto: Re: Read response from console

Hi Gustavo,

Do you mean apps/examples/popen is not working?

I remember using popen() in the past to get the result of other program output.

Best Regards,

Alan

On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
wrote:
Hello everyone!

 I have some i2c devices connected to my ESP32 and I can get their values by 
using the i2c get command from NuttX. Now I need my app to extract the value 
from the response, so I enabled the popen() and pclose() functions but it still 
not possible to use them, is there any other config that must be enabled? Even 
the popen example can't find the method reference.

[cid:ii_18c86ec0f0ccb971f161]

BR,
Gustavo.


Re: Read response from console

2023-12-20 Thread Alan C. Assis
That is because you forgot to enable:

Device Drivers --->
[*] FIFO and named pipe drivers  --->

Remember: "git grep" is your friend!

BR,

Alan

On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares <
gustavo.felipesoa...@hotmail.com> wrote:

> Hi Alan!
>
>  Yes, this message pops up when trying to compile:
>
> the problem seems to be in the apps/system/popen.
> Should any other configuration be applied besides enabling the
> popen()/pclose() functions?
>
> --
> *De:* Alan C. Assis 
> *Enviado:* quarta-feira, 20 de dezembro de 2023 08:15
> *Para:* dev@nuttx.apache.org 
> *Assunto:* Re: Read response from console
>
> Hi Gustavo,
>
> Do you mean apps/examples/popen is not working?
>
> I remember using popen() in the past to get the result of other program
> output.
>
> Best Regards,
>
> Alan
>
> On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares <
> gustavo.felipesoa...@hotmail.com> wrote:
>
> Hello everyone!
>
>  I have some i2c devices connected to my ESP32 and I can get their values
> by using the i2c get command from NuttX. Now I need my app to extract the
> value from the response, so I enabled the popen() and pclose() functions
> but it still not possible to use them, is there any other config that must
> be enabled? Even the popen example can't find the method reference.
>
>
> BR,
> Gustavo.
>
>


Re: Read response from console

2023-12-20 Thread Nathan Hartman
So, in Kconfig, Example/popen should "depends on" FIFO and named pipe
drivers?


On Wed, Dec 20, 2023 at 2:08 PM Alan C. Assis  wrote:

> That is because you forgot to enable:
>
> Device Drivers --->
> [*] FIFO and named pipe drivers  --->
>
> Remember: "git grep" is your friend!
>
> BR,
>
> Alan
>
> On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares <
> gustavo.felipesoa...@hotmail.com> wrote:
>
>> Hi Alan!
>>
>>  Yes, this message pops up when trying to compile:
>>
>> the problem seems to be in the apps/system/popen.
>> Should any other configuration be applied besides enabling the
>> popen()/pclose() functions?
>>
>> --
>> *De:* Alan C. Assis 
>> *Enviado:* quarta-feira, 20 de dezembro de 2023 08:15
>> *Para:* dev@nuttx.apache.org 
>> *Assunto:* Re: Read response from console
>>
>> Hi Gustavo,
>>
>> Do you mean apps/examples/popen is not working?
>>
>> I remember using popen() in the past to get the result of other program
>> output.
>>
>> Best Regards,
>>
>> Alan
>>
>> On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares <
>> gustavo.felipesoa...@hotmail.com> wrote:
>>
>> Hello everyone!
>>
>>  I have some i2c devices connected to my ESP32 and I can get their values
>> by using the i2c get command from NuttX. Now I need my app to extract the
>> value from the response, so I enabled the popen() and pclose() functions
>> but it still not possible to use them, is there any other config that must
>> be enabled? Even the popen example can't find the method reference.
>>
>>
>> BR,
>> Gustavo.
>>
>>


RE: Read response from console

2023-12-20 Thread Gustavo Soares
After enabling 'FIFO and named pipe drivers' I was able to use popen() and 
pclose() functions. Just like Nathan said... shouldn't appear it's dependency 
on this config?

Thank you!

De: Nathan Hartman 
Enviado: quarta-feira, 20 de dezembro de 2023 16:40
Para: dev@nuttx.apache.org 
Assunto: Re: Read response from console

So, in Kconfig, Example/popen should "depends on" FIFO and named pipe drivers?


On Wed, Dec 20, 2023 at 2:08 PM Alan C. Assis 
mailto:acas...@gmail.com>> wrote:
That is because you forgot to enable:

Device Drivers --->
[*] FIFO and named pipe drivers  --->

Remember: "git grep" is your friend!

BR,

Alan

On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
wrote:
Hi Alan!

 Yes, this message pops up when trying to compile:
[cid:ii_18c889f1d5ccb971f162]

the problem seems to be in the apps/system/popen.
Should any other configuration be applied besides enabling the popen()/pclose() 
functions?


De: Alan C. Assis mailto:acas...@gmail.com>>
Enviado: quarta-feira, 20 de dezembro de 2023 08:15
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Assunto: Re: Read response from console

Hi Gustavo,

Do you mean apps/examples/popen is not working?

I remember using popen() in the past to get the result of other program output.

Best Regards,

Alan

On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
wrote:
Hello everyone!

 I have some i2c devices connected to my ESP32 and I can get their values by 
using the i2c get command from NuttX. Now I need my app to extract the value 
from the response, so I enabled the popen() and pclose() functions but it still 
not possible to use them, is there any other config that must be enabled? Even 
the popen example can't find the method reference.

[cid:ii_18c889f1d5bcb971f161]

BR,
Gustavo.


Re: Read response from console

2023-12-20 Thread Gregory Nutt
Might be easier to use if the OPEN option SELECTED the FIFO and named 
pipes.  That way the POPEN option will appear in the menus when FIFOs 
are disabled.



On 12/20/2023 1:45 PM, Gustavo Soares wrote:
After enabling 'FIFO and named pipe drivers' I was able to use popen() 
and pclose() functions. Just like Nathan said... shouldn't appear it's 
dependency on this config?


Thank you!

*De:* Nathan Hartman 
*Enviado:* quarta-feira, 20 de dezembro de 2023 16:40
*Para:* dev@nuttx.apache.org 
*Assunto:* Re: Read response from console
So, in Kconfig, Example/popen should "depends on" FIFO and named pipe 
drivers?



On Wed, Dec 20, 2023 at 2:08 PM Alan C. Assis  wrote:

That is because you forgot to enable:

Device Drivers --->
    [*] FIFO and named pipe drivers  --->

Remember: "git grep" is your friend!

BR,

Alan

On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares
 wrote:

Hi Alan!

 Yes, this message pops up when trying to compile:

the problem seems to be in the apps/system/popen.
Should any other configuration be applied besides enabling the
popen()/pclose() functions?


*De:* Alan C. Assis 
*Enviado:* quarta-feira, 20 de dezembro de 2023 08:15
*Para:* dev@nuttx.apache.org 
    *Assunto:* Re: Read response from console
Hi Gustavo,

Do you mean apps/examples/popen is not working?

I remember using popen() in the past to get the result of
other program output.

Best Regards,

Alan

On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares
 wrote:

Hello everyone!

 I have some i2c devices connected to my ESP32 and I can
get their values by using the i2c get command from NuttX.
Now I need my app to extract the value from the response,
so I enabled the popen() and pclose() functions but it
still not possible to use them, is there any other config
that must be enabled? Even the popen example can't find
the method reference.


BR,
Gustavo.


Re: Read response from console

2023-12-20 Thread Alan C. Assis
Exactly!

Gustavo, could you please submit a patch?

Case you cannot, I can do it.

BR,

Alan

On Wed, Dec 20, 2023 at 5:36 PM Gregory Nutt  wrote:

> Might be easier to use if the OPEN option SELECTED the FIFO and named
> pipes.  That way the POPEN option will appear in the menus when FIFOs are
> disabled.
>
>
> On 12/20/2023 1:45 PM, Gustavo Soares wrote:
>
> After enabling 'FIFO and named pipe drivers' I was able to use popen()
> and pclose() functions. Just like Nathan said... shouldn't appear it's
> dependency on this config?
>
> Thank you!
> --
> *De:* Nathan Hartman  
> *Enviado:* quarta-feira, 20 de dezembro de 2023 16:40
> *Para:* dev@nuttx.apache.org  
> *Assunto:* Re: Read response from console
>
> So, in Kconfig, Example/popen should "depends on" FIFO and named pipe
> drivers?
>
>
> On Wed, Dec 20, 2023 at 2:08 PM Alan C. Assis  wrote:
>
> That is because you forgot to enable:
>
> Device Drivers --->
> [*] FIFO and named pipe drivers  --->
>
> Remember: "git grep" is your friend!
>
> BR,
>
> Alan
>
> On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares <
> gustavo.felipesoa...@hotmail.com> wrote:
>
> Hi Alan!
>
>  Yes, this message pops up when trying to compile:
>
> the problem seems to be in the apps/system/popen.
> Should any other configuration be applied besides enabling the
> popen()/pclose() functions?
>
> --
> *De:* Alan C. Assis 
> *Enviado:* quarta-feira, 20 de dezembro de 2023 08:15
> *Para:* dev@nuttx.apache.org 
> *Assunto:* Re: Read response from console
>
> Hi Gustavo,
>
> Do you mean apps/examples/popen is not working?
>
> I remember using popen() in the past to get the result of other program
> output.
>
> Best Regards,
>
> Alan
>
> On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares <
> gustavo.felipesoa...@hotmail.com> wrote:
>
> Hello everyone!
>
>  I have some i2c devices connected to my ESP32 and I can get their values
> by using the i2c get command from NuttX. Now I need my app to extract the
> value from the response, so I enabled the popen() and pclose() functions
> but it still not possible to use them, is there any other config that must
> be enabled? Even the popen example can't find the method reference.
>
>
> BR,
> Gustavo.
>
>


RE: Read response from console

2023-12-21 Thread Gustavo Soares
Hi!

I've opened an issue on github about popen()/pclose() functions and 'FIFO and 
named pipes drivers' option dependecy:
https://github.com/apache/nuttx/issues/11435
[https://opengraph.githubassets.com/2024b48250bb10d4358854e050b2313fb90bac648f5884ae80f495f4348981d2/apache/nuttx/issues/11435]<https://github.com/apache/nuttx/issues/11435>
Make OPEN option select FIFO and named pipes configuration · Issue #11435 · 
apache/nuttx<https://github.com/apache/nuttx/issues/11435>
When enabling open()/pclose() functions, in order to use them, 'FIFO and named 
pipes drivers' option must be enabled but there is no sign of its dependecy. 
Making 'popen()/pclose() Functions' optio...
github.com


De: Alan C. Assis 
Enviado: quarta-feira, 20 de dezembro de 2023 22:50
Para: dev@nuttx.apache.org 
Assunto: Re: Read response from console

Exactly!

Gustavo, could you please submit a patch?

Case you cannot, I can do it.

BR,

Alan

On Wed, Dec 20, 2023 at 5:36 PM Gregory Nutt 
mailto:spudan...@gmail.com>> wrote:

Might be easier to use if the OPEN option SELECTED the FIFO and named pipes.  
That way the POPEN option will appear in the menus when FIFOs are disabled.


On 12/20/2023 1:45 PM, Gustavo Soares wrote:
After enabling 'FIFO and named pipe drivers' I was able to use popen() and 
pclose() functions. Just like Nathan said... shouldn't appear it's dependency 
on this config?

Thank you!

De: Nathan Hartman <mailto:hartman.nat...@gmail.com>
Enviado: quarta-feira, 20 de dezembro de 2023 16:40
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
<mailto:dev@nuttx.apache.org>
Assunto: Re: Read response from console

So, in Kconfig, Example/popen should "depends on" FIFO and named pipe drivers?


On Wed, Dec 20, 2023 at 2:08 PM Alan C. Assis 
mailto:acas...@gmail.com>> wrote:
That is because you forgot to enable:

Device Drivers --->
[*] FIFO and named pipe drivers  --->

Remember: "git grep" is your friend!

BR,

Alan

On Wed, Dec 20, 2023 at 9:53 AM Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
wrote:
Hi Alan!

 Yes, this message pops up when trying to compile:
[cid:ii_18c8a10674acb971f161]

the problem seems to be in the apps/system/popen.
Should any other configuration be applied besides enabling the popen()/pclose() 
functions?


De: Alan C. Assis mailto:acas...@gmail.com>>
Enviado: quarta-feira, 20 de dezembro de 2023 08:15
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Assunto: Re: Read response from console

Hi Gustavo,

Do you mean apps/examples/popen is not working?

I remember using popen() in the past to get the result of other program output.

Best Regards,

Alan

On Mon, Dec 18, 2023 at 3:39 PM Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
wrote:
Hello everyone!

 I have some i2c devices connected to my ESP32 and I can get their values by 
using the i2c get command from NuttX. Now I need my app to extract the value 
from the response, so I enabled the popen() and pclose() functions but it still 
not possible to use them, is there any other config that must be enabled? Even 
the popen example can't find the method reference.

[cid:ii_18c8a10674bcb971f162]

BR,
Gustavo.