nsh: i2c: command not found

2024-04-18 Thread Gustavo Soares
Hi everyone!

I've built an application that sends i2c set/get commands to NuttX using the 
system() function in a loop that breaks after a timer runs out. After some i2c 
requests, NuttX prompts the message 'nsh: i2c: command not found' and the only 
way to solve it is rebooting the ESP32.

This is what I tried so far:
1. Enabling i2c reset command and sending it every time i2c get/set fails, but 
it won't work because it depends on i2c driver;
2. Enabling the reboot command, but of course it resets the board so the app 
stops;

Some more details:
* I2c debug tool shows no error (only that one message);
* Killing the program and sending any i2c command from console works fine;
* Depending on the scenario, the error raises after sending around 3000 i2c 
requests.

Is there any other way how to reset the i2c driver without rebooting the board? 
Forcing a delay at every request significantly reduces the amount of i2c 
requests, but it does not solve the problem.





Run app when device starts

2024-03-18 Thread Gustavo Soares
Hello!

I've built an application to run on NuttX and I'd like to know if it's possible 
to make it start when the device starts so I don't have to connect into the 
console to run it.



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.


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 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.


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: PCF8575 driver for NuttX

2023-10-06 Thread Gustavo Soares
Hi, Alan and David!

I'm using nrf52_sx1509.c (at boards/arm/nrf62/thingy52/src) as model for my 
driver. I've attached what I have wrote so far and I'd like to know if you 
could tell me if I'm at the right direction:
[cid:efd68788-44d6-4e3f-a528-ab0fb1e35f03] (print from nrf52_sx1509.c, 
nrf52_sx1509_pinscfg() method)

My guess for what I should implement is to set the direction and option for 
every pin in PCF8575 and after that write bytes to those I set as outputs, is 
it correct?
what exactly does IOEXP_SETOPTION() do?

Thank you for the support!

De: Alan C. Assis 
Enviado: sexta-feira, 6 de outubro de 2023 10:36
Para: dev@nuttx.apache.org 
Assunto: Re: PCF8575 driver for NuttX

Hi David,

In a quick search I noticed that i2c_vbus_initialize() never was part
of NuttX, maybe it is something you created to abstract from different
MCUs initialization.

I think we can use some similar (a generic function) to create a
boards/common/ directory to keep all I2C, SPI, devices initialization
that could be common for all boards, even for boards from different
chip families or architecture.

So, i2cbus_initialize() could be just an "alias" to
stm32_i2cbus_initialize, esp32s2_i2cbus_uninitialize,
cxd56_i2cbus_initialize(), etc, depending of what is the MCU arch of
the board.

It could simplify the sensor or other devices support as in this PCF8575 case.

BR,

Alan

On 10/5/23, David S. Alessio  wrote:
> Hi, Alan,
>
> I don’t see my I2C virtual bus driver code in the current repo.  I’m not
> sure what happened, but I’d like to [re-] submit it.  Can you point me to
> how that’s done today?  (I’m sure email won’t work).
>
> The problem I see with the existing IOEXPANDER code is that I don’t believe
> it’s thread safe (multiple threads each hammering its own sensor on
> different sub buses).
>
> Cheers,
> -david
>
>
>> On Oct 5, 2023, at 6:18 AM, Alan C. Assis  wrote:
>>
>> Hi David,
>>
>> I think you figure out Gustavo's mistake.
>>
>> Gustavo, all you need to do is use the existing driver. In your code
>> you was trying to implement a low level driver to communicate with
>> your PCF8575. You don't need to do it.
>>
>> Unfortunately there is not much boards examples using IOEXPANDER (shame on
>> us).
>>
>> But I think Mateusz (raiden00) created one here:
>> boards/arm/nrf52/thingy52/src/nrf52_sx1509.c
>>
>> Just look this example and you will figure out everything.
>>
>> Basically:
>>
>> struct pcf8575_config_s g_pcf8575_cfg
>> {
>>  .address   = 0x71;  /* the I2C address returned by i2ctool */
>>  .frequency = 10;
>> };
>>
>> ...
>>
>> int stm32_pcf8575_initialize(void)
>> {
>>  struct i2c_master_s *i2c = NULL;
>>  struct ioexpander_dev_s *ioe = NULL;
>>  int  ret = OK;
>>
>>  i2c = stm32_i2c_register(I2C_BUS); /* I2C_BUS is your I2Cx bus
>> number (0, 1, etc) */
>>
>>  ioe = pcf8575_initialize(i2c, &g_pcf8575_cfg);
>>  ...
>>
>> }
>>
>> BR,
>>
>> Alan
>>
>> On 10/5/23, David S. Alessio  wrote:
>>> Hi, Gustavo,
>>>
>>> You might consider using the I2C IO expander driver I wrote some time ago
>>> to
>>> manage a multi-tiered tree of I2C bus expanders.
>>>
>>> The advantages are:
>>>  * I2C sub buses are transparently available to application space
>>> through
>>> /dev/i2c*
>>>  * transparently manages hierarch of I2C bus expanders
>>>  * downstream I2C device drivers go through the I2C character driver
>>> (pro
>>> and con)
>>>
>>> The disadvantages are:
>>>  * I2C drivers need to use the I2C character driver
>>>  * many I2C HW drivers don’t properly handle multiple command packets in
>>> I2C_TRANSFER()
>>>
>>> Example:  let’s say we have an 4-port I2C switch PCA9545A attached to
>>> /dev/i2c1 using an STM32F407 MCU.  The board initialization would be:
>>>
>>>
>>>  i2c = stm32_i2c_register(1);
>>>
>>>  /*
>>>   *support for I2C bus epander
>>>   */dev/i2c1.0 -- /dev/i2c1.3
>>>   */
>>>  ret = i2c_vbus_initialize("/dev/i2c1", 0x70, I2C_VBUS_PCA9545, 0x0f, 0,
>>> NULL);
>>>  if (ret != OK)
>>>{
>>>  syslog(LOG_ERR, "ERROR: Failed to initialize i2c_vbus %#x: %d\n",
>>> 0x70, ret);
>>>}
>>>
>>> Now the sub bus I2C segments are transparently available as /dev/i2c1.0
>>> through /dev/i2c1.3.
>&g

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gustavo Soares
Hi Greg!

Yes, if I use #include  this problem is solved, but 
then the code loses the reference to that specific struct causing another error.

And how exactly "the file does not exist"? I can open it and it is at the nuttx 
repo, I shared it's link.


From: Gregory Nutt 
Sent: Wednesday, October 4, 2023 10:52:32 PM
To: dev@nuttx.apache.org 
Subject: Re: PCF8575 driver for NuttX



>>> Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h?
>>>
>> Access to internal driver files by applications is specifically
>> forbidden.  This is part of the enforcement of the modular design to
>> assure that people do not do that kind of thing:  Applications must
>> not have access to the internal implementation of drivers.
>>
>>
> Never mind,  I misread the ultra tiny fonts in the image.
> include/nuttx/ holds the public interface to the driver (vs. the
> internal private definitions for the driver in drivers/). Anything
> under include/ should be include-able by your application.


Actually, the problem is very simple.  This file does not exist.


#include 


You probably wanted


#include 




RE: Writing in an I2C device

2023-10-03 Thread Gustavo Soares
Hi Alan!

 I enabled the PCF8575 driver on NuttX, I'll try to use it and get back to you 
if I need help.

Thank you!

De: Alan C. Assis 
Enviado: segunda-feira, 2 de outubro de 2023 11:44
Para: dev@nuttx.apache.org 
Assunto: Re: Writing in an I2C device

Hi Gustavo,

On 10/1/23, Gustavo Soares  wrote:
> Hello everyone!
>
> I have a PCF8575 IO expander with 16 channels wich I want to use 8 for write
> (P10 to P17). The hardware is already configures and all LED's connected to
> these ports are on. As you can see, NuttX sees the I2C device:
>
> [cid:ecafac4f-7e7e-4cb1-a090-ecdc0b0d942e]
>
> Also when I run the command to read it, it returns FF (255), meaning all
> LEDs are on:
>
> [cid:03315e20-c94f-4166-922a-7512f6f6fb63]
>
> For some reason the command to write into the i2c device seems not to work:
>
> [cid:39e062d1-caf0-4128-9874-a6c2792db4fd]
>
> *I tested the i2c device and the LEDs with a simple counter program using
> visuino (https://www.visuino.com/) and it worked.
> *For NuttX, I followed the steps of this
> video<https://www.youtube.com/watch?v=RzrDa4Sm1rU>.
>
> Is the i2c set command correct? Should I apply any adicional config?
>

There is already a PCF8575 driver on NuttX.

I suggest you to try using that driver instead of play with the chip
from terminal.

Probably the error is because you are reading 1 byte by time, the chip
expects 16-bit reading.

BR,

Alan


RE: different IP than expected

2023-09-21 Thread Gustavo Soares
I use those arrays to read the request and send the response, there is no stack 
overflow error. I've defined a IP value  inside the server file (#define) and 
it worked as intended, but I want to be able to read the IP from Kconfig 
instead of having it in the server file, I'll be looking for a way to do this.

Thank you all for the support!




De: Gregory Nutt 
Enviado: quinta-feira, 21 de setembro de 2023 10:45
Para: dev@nuttx.apache.org 
Assunto: Re: different IP than expected

On 9/21/2023 6:34 AM, Simon Filgis wrote:
> When I started with networking, I set the IP via kconfig. I remember that
> it was necessary to enter the same IP at two different places. Netlib and
> FTP server in my case. Maybe your IP is overwritten by another app? A
> buildin app that you use for experiments?

Something as simple as stack overflow might be the issue.  There are
some huge arrays on the stack that might be causing issues:

 struct sockaddr_in address;
 int opt = 1;
 int addrlen = sizeof(address);
/char buffer[2048] = {0};//
//char response[4096] = {0};/
 const char *file = "/data/client.html";

So it is going to need a stack allocation of something like 8Kb.


RE: different IP than expected

2023-09-21 Thread Gustavo Soares
So setting a value for the IP address in Kconfig and assigning it to 
address.sin_addr.s_addr should solve the problem?

De: Petro Karashchenko 
Enviado: quinta-feira, 21 de setembro de 2023 09:35
Para: dev@nuttx.apache.org 
Assunto: Re: different IP than expected

I think that you misunderstood the data flow a bit.

So you have
...
address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = htons(PORT);

if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0)
{
perror("bind failed");
exit(EXIT_FAILURE);
}
...
printf("waiting for requests at %s:%d...\n", inet_ntoa(address.sin_addr), 
PORT);

So you assign INADDR_ANY to a address.sin_addr.s_addrand then call "int 
bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);" that has 
"const" modifier for "addr" parameter hoping that it will modify the value that 
you just assigned. That just simply will not work.

чт, 21 вер. 2023 р. о 15:22 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
I've attached a simpler version of the server file removing the logic for the 
incoming requests so you can take a better look. How should I make the API call 
to get the device IP?

De: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Enviado: quinta-feira, 21 de setembro de 2023 09:00
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Assunto: Re: different IP than expected

Yeah,

But what is in between
[image.png]
and
[image.png]
???

Do you have any API call to get the IP? Because I read that like "int a = 10; 
printf("%d", a);"

If there is no API call to update "address" then you simply will print 
"INADDR_ANY" value.

чт, 21 вер. 2023 р. о 14:42 MIGUEL ALEXANDRE WISINTAINER 
mailto:tcpipc...@hotmail.com>> пише:
I mean, ifconfig, and capture the ip…

Enviado do meu iPhone

Em 21 de set. de 2023, à(s) 08:24, Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
escreveu:


Hi, Petro!

 I use this struct:

[image.png]

and this where I use the inet_ntoa:

[image.png]

De: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Enviado: quinta-feira, 21 de setembro de 2023 08:16
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Assunto: Re: different IP than expected

Hi,

But what do you pass to "inet_ntoa"? Maybe you get the IP of your PC or a 
default router IP and try to print it?

Best regards,
Petro

чт, 21 вер. 2023 р. о 14:06 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
I don't know if I can reproduce this in another app, but my question is why 
does the server listen to requests in one IP adress (ending with 15) and when I 
retrieve its IP it shows a different one? About the ifconfig command, this is 
the output:

[X]

the server response to the GET request (the request was sent to the configured 
IP using ifconfig):
[X]

the IP address the server returns with the inet_ntoa() method:
[X]


From: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Sent: Thursday, September 21, 2023 6:59:01 AM
To: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Subject: Re: different IP than expected

Hi,

"INADDR_ANY" definitely does not match "listens to the defined IP" statement. I 
do not understand exactly what you are trying to do, but it would be good to 
know what is the output of "ifconfig" running from NSH.
If you do not want to share code details, maybe you can check how your 
application behaves on Linux and compare to what behavior you observe with 
NuttX.
Can this somehow be reproduced with one of the apps available in the NuttX repo?

Best regards,
Petro

чт, 21 вер. 2023 р. о 03:09 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
Hello everyone!

 I configured NuttX to a certain IP address and I have a webserver which 
listens to the defined IP:

[X]

[X]

The HTML file above has a variable that contains the server IP address, but it 
is a different one:

[X]

the server replaces the text SERVER_IP_ADDRESS to it's actual IP and then sends 
the file to the client. This is the method I used to get the IP address:

[X]

Why is it a different IP? The server is listening to one but this method 
returns another one.




RE: different IP than expected

2023-09-21 Thread Gustavo Soares
I've attached a simpler version of the server file removing the logic for the 
incoming requests so you can take a better look. How should I make the API call 
to get the device IP?

De: Petro Karashchenko 
Enviado: quinta-feira, 21 de setembro de 2023 09:00
Para: dev@nuttx.apache.org 
Assunto: Re: different IP than expected

Yeah,

But what is in between
[image.png]
and
[image.png]
???

Do you have any API call to get the IP? Because I read that like "int a = 10; 
printf("%d", a);"

If there is no API call to update "address" then you simply will print 
"INADDR_ANY" value.

чт, 21 вер. 2023 р. о 14:42 MIGUEL ALEXANDRE WISINTAINER 
mailto:tcpipc...@hotmail.com>> пише:
I mean, ifconfig, and capture the ip…

Enviado do meu iPhone

Em 21 de set. de 2023, à(s) 08:24, Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
escreveu:


Hi, Petro!

 I use this struct:

[image.png]

and this where I use the inet_ntoa:

[image.png]

De: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Enviado: quinta-feira, 21 de setembro de 2023 08:16
Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Assunto: Re: different IP than expected

Hi,

But what do you pass to "inet_ntoa"? Maybe you get the IP of your PC or a 
default router IP and try to print it?

Best regards,
Petro

чт, 21 вер. 2023 р. о 14:06 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
I don't know if I can reproduce this in another app, but my question is why 
does the server listen to requests in one IP adress (ending with 15) and when I 
retrieve its IP it shows a different one? About the ifconfig command, this is 
the output:

[X]

the server response to the GET request (the request was sent to the configured 
IP using ifconfig):
[X]

the IP address the server returns with the inet_ntoa() method:
[X]


From: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Sent: Thursday, September 21, 2023 6:59:01 AM
To: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Subject: Re: different IP than expected

Hi,

"INADDR_ANY" definitely does not match "listens to the defined IP" statement. I 
do not understand exactly what you are trying to do, but it would be good to 
know what is the output of "ifconfig" running from NSH.
If you do not want to share code details, maybe you can check how your 
application behaves on Linux and compare to what behavior you observe with 
NuttX.
Can this somehow be reproduced with one of the apps available in the NuttX repo?

Best regards,
Petro

чт, 21 вер. 2023 р. о 03:09 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
Hello everyone!

 I configured NuttX to a certain IP address and I have a webserver which 
listens to the defined IP:

[X]

[X]

The HTML file above has a variable that contains the server IP address, but it 
is a different one:

[X]

the server replaces the text SERVER_IP_ADDRESS to it's actual IP and then sends 
the file to the client. This is the method I used to get the IP address:

[X]

Why is it a different IP? The server is listening to one but this method 
returns another one.


int main(int argc, char *argv[]) 
{
int server_fd, new_socket, valread;
struct sockaddr_in address;
int opt = 1;
int addrlen = sizeof(address);
char buffer[2048] = {0};
char response[4096] = {0};
const char *file = "/data/client.html";
bool executing = false;

if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0)
{
perror("socket failed");
exit(EXIT_FAILURE);
}

if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)))
{
perror("setsockopt");
exit(EXIT_FAILURE);
}

address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = htons(PORT);

if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0)
{
perror("bind failed");
exit(EXIT_FAILURE);
}
if (listen(server_fd, 3) < 0)
{
perror("listen");
exit(EXIT_FAILURE);
}

printf("waiting for requests at %s:%d...\n", inet_ntoa(address.sin_addr), 
PORT);

while (1)
{
// web server logic for requests
}

return 0;
}


RE: different IP than expected

2023-09-21 Thread Gustavo Soares
Hi, Petro!

 I use this struct:

[cid:55c45c09-3f8e-4479-9315-f70a156c8f0f]

and this where I use the inet_ntoa:

[cid:7b74168e-0e07-4c3c-ba95-32016a361340]

De: Petro Karashchenko 
Enviado: quinta-feira, 21 de setembro de 2023 08:16
Para: dev@nuttx.apache.org 
Assunto: Re: different IP than expected

Hi,

But what do you pass to "inet_ntoa"? Maybe you get the IP of your PC or a 
default router IP and try to print it?

Best regards,
Petro

чт, 21 вер. 2023 р. о 14:06 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
I don't know if I can reproduce this in another app, but my question is why 
does the server listen to requests in one IP adress (ending with 15) and when I 
retrieve its IP it shows a different one? About the ifconfig command, this is 
the output:

[cid:a8ad1b83-824f-40bd-878a-ed966f0ec86c]

the server response to the GET request (the request was sent to the configured 
IP using ifconfig):
[cid:ed334f4b-c3a6-46b2-8915-bfee764fcb45]

the IP address the server returns with the inet_ntoa() method:
[cid:0b98a371-8281-4c40-9354-7b8ed0b093aa]


From: Petro Karashchenko 
mailto:petro.karashche...@gmail.com>>
Sent: Thursday, September 21, 2023 6:59:01 AM
To: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org> 
mailto:dev@nuttx.apache.org>>
Subject: Re: different IP than expected

Hi,

"INADDR_ANY" definitely does not match "listens to the defined IP" statement. I 
do not understand exactly what you are trying to do, but it would be good to 
know what is the output of "ifconfig" running from NSH.
If you do not want to share code details, maybe you can check how your 
application behaves on Linux and compare to what behavior you observe with 
NuttX.
Can this somehow be reproduced with one of the apps available in the NuttX repo?

Best regards,
Petro

чт, 21 вер. 2023 р. о 03:09 Gustavo Soares 
mailto:gustavo.felipesoa...@hotmail.com>> 
пише:
Hello everyone!

 I configured NuttX to a certain IP address and I have a webserver which 
listens to the defined IP:

[X]

[X]

The HTML file above has a variable that contains the server IP address, but it 
is a different one:

[X]

the server replaces the text SERVER_IP_ADDRESS to it's actual IP and then sends 
the file to the client. This is the method I used to get the IP address:

[X]

Why is it a different IP? The server is listening to one but this method 
returns another one.




different IP than expected

2023-09-20 Thread Gustavo Soares
Hello everyone!

 I configured NuttX to a certain IP address and I have a webserver which 
listens to the defined IP:

[cid:820c9f69-369e-403b-8928-15a97245100a]

[cid:a42eded4-3e24-4b28-b0a7-07170d21a404]

The HTML file above has a variable that contains the server IP address, but it 
is a different one:

[cid:5e9d6cae-0b80-47cd-a05d-f9d52e1fdf80]

the server replaces the text SERVER_IP_ADDRESS to it's actual IP and then sends 
the file to the client. This is the method I used to get the IP address:

[cid:f59e2b66-2f08-4aa7-895c-936b962eab26]

Why is it a different IP? The server is listening to one but this method 
returns another one.



Re: [OT] NuttX Internation Workshop Subscription is opened

2023-09-14 Thread Gustavo Soares
Already subscribed! 😁

On Thu, Sep 14, 2023, 13:26 MIGUEL ALEXANDRE WISINTAINER <
tcpipc...@hotmail.com> wrote:

> it´s time to Gustavo to subscribe 🙂
>
> 
> De: Alan C. Assis 
> Enviado: quinta-feira, 14 de setembro de 2023 15:54
> Para: dev 
> Assunto: [OT] NuttX Internation Workshop Subscription is opened
>
> Hi NuttXers,
>
> Please help us to spread the news:
>
> https://events.nuttx.apache.org
>
> Finally after four years we will have a physical event like that in
> Gouda, Netherlands in 2019.
>
> I'm looking forward to it!
>
> BR,
>
> Alan
>


RE: File transfer

2023-09-13 Thread Gustavo Soares
Hello everyone!

 I was able to achieve my goal by using the spiflash configuration for 
esp32-devkitc. With this config, I followed this 
video<https://www.youtube.com/watch?v=Ne3SZZrwL9c> and could transfer the HTML 
file normally.
[https://i.ytimg.com/vi/Ne3SZZrwL9c/maxresdefault.jpg]<https://www.youtube.com/watch?v=Ne3SZZrwL9c>
#065: How to transfer files to NuttX over Serial 
Port?<https://www.youtube.com/watch?v=Ne3SZZrwL9c>
In this video I explain how to use ZMODEM protocol on NuttX to transfer files 
from computer to the board running it.
www.youtube.com
Thank you all for the support.

De: Petro Karashchenko 
Enviado: domingo, 10 de setembro de 2023 09:06
Para: dev@nuttx.apache.org 
Assunto: Re: File transfer

You can try searching for "CONFIG_NSH_ROMFSETC" and
"CONFIG_NSH_CUSTOMROMFS" options in the code tree.
I see that currently ESP32-C3 and SIM use it. Also I used the same with
custom board and it works pretty well.

нд, 10 вер. 2023 р. о 00:35 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 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 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 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 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<https://www.youtube.com/watch?v=Ne3SZZrwL9c> 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?


File transfer

2023-09-08 Thread Gustavo Soares
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:

[cid:26bb11cf-0359-4349-bdfb-95def0cc49a9]

Am I missing some configuration?


RE: make command error

2023-09-07 Thread Gustavo Soares
Hi Alan!

I changed the app name from 'M+++' to 'mthreeplus' but the error still appears:

[cid:35aa8eda-31a2-4d80-825e-e653c25698da]

[cid:3cb94f25-e1fc-48b8-9f8d-753d5fc09ceb]

De: Alan C. Assis 
Enviado: quinta-feira, 7 de setembro de 2023 13:10
Para: dev@nuttx.apache.org 
Assunto: Re: make command error

Hi Miguel,

It was many years ago, normally the used hello_main() etc, to avoid
main() symbol collision. Now the apps can use main() and the building
system will concatenate it automatically.

Probably the issue that Gustavo is facing is some messing with the source code.

I think he is using special symbols as App name (i.e. m++)

If that is the case, it will become m++_main(int ...) that will
confuse the compiler.

Just my 2 cents!

BR,

Alan

On 9/7/23, MIGUEL ALEXANDRE WISINTAINER  wrote:
> If I remember, your program can not have a main() function, but other name,
> because is called by other program
>
> Enviado do meu iPhone
>
> Em 7 de set. de 2023, à(s) 11:13, Gustavo Soares
>  escreveu:
>
> 
> Hello!
>
> I have an application and it was compiling normally to NuttX, but out of the
> blue an error showed up and I can not figure out what is wrong. This is the
> error message:
>
> [image.png]
>
> and this is the line 73 of the server file:
>
> [image.png]
>
> I tryied everything: rewriting the file, rewriting the line, declaring the
> main function in the start of the file (in this case the error occoured for
> this line too) and also creating another simple file with the main function
> empty. In every attempt the same error showed up. It's hard to believe that
> the error is in the make command, but I can run the application on my VM
> with no problem.
>
> Does anyone know what could be the problem?
> Thank you!
>


make command error

2023-09-07 Thread Gustavo Soares
Hello!

I have an application and it was compiling normally to NuttX, but out of the 
blue an error showed up and I can not figure out what is wrong. This is the 
error message:

[cid:96b8807a-e494-4891-b208-0b17ada218b6]

and this is the line 73 of the server file:

[cid:5e6c0c83-7a54-44a9-b553-c74432356707]

I tryied everything: rewriting the file, rewriting the line, declaring the main 
function in the start of the file (in this case the error occoured for this 
line too) and also creating another simple file with the main function empty. 
In every attempt the same error showed up. It's hard to believe that the error 
is in the make command, but I can run the application on my VM with no problem.

Does anyone know what could be the problem?
Thank you!


RE: New application to Nuttx

2023-09-03 Thread Gustavo Soares
it worked!

Thank you!

De: Alan C. Assis 
Enviado: domingo, 3 de setembro de 2023 17:06
Para: dev@nuttx.apache.org 
Assunto: Re: New application to Nuttx

Look: boards/xtensa/esp32/esp32-devkitc/configs/wifi

Use: esp32-devkitc:wifi

BR,

Alan

On 9/3/23, Gustavo Soares  wrote:
> Hi!
>
>  I checked the value of the application stack size and it was 2048 ideed, so
> I manually changed to 8000 using menuconfig and there it is:
>
> [cid:a6cbc7ca-098f-4b7a-87d5-8c8ea1a655d2]
>
>  But for some reason when I use the make command it returns an error that
> I'm trying to solve here. Meanwhile I created a new VM because of
> performance issues and I'm configuring it to be able to continue my project.
> For NuttX I followed this
> article<https://blog.espressif.com/getting-started-with-esp32-and-nuttx-fd3e1a3d182c>
> from Espressif with wapi instead of nsh in the 7th step, but this error
> shows up:
> 'Directory for esp32-devkitc:wapi does not exist.' and I don't know why this
> happens, because when I first configured it worked just fine.
>
> Does anyone know what could be causing this?
>
> PS: if I use nsh it works.
> [https://miro.medium.com/v2/resize:fit:850/1*j-XGptYZE3DQ9tV1vJY2Iw.png]<https://blog.espressif.com/getting-started-with-esp32-and-nuttx-fd3e1a3d182c>
> Getting Started with ESP32 and
> NuttX<https://blog.espressif.com/getting-started-with-esp32-and-nuttx-fd3e1a3d182c>
> Introduction
> blog.espressif.com
>
> 
> De: Tiago Medicci Serrano 
> Enviado: sexta-feira, 1 de setembro de 2023 09:09
> Para: dev@nuttx.apache.org 
> Assunto: Re: New application to Nuttx
>
> Hi!
>
> The `DEFAULT_TASK_STACKSIZE` default value is 2048, less than the one we
> know that wasn't enough. Please, stick with setting a value (instead of
> using the `DEFAULT_TASK_STACKSIZE`).
>
> Also, please double-check what I've said about changing the config and
> re-running `make menuconfig`. You need to check if the
> `EXAMPLES_M_THREE_PLUS_STACKSIZE` is set to the default value you set
> (remember: it's a default value, not necessarily it is set to it. Try to
> increase it by the `menuconfig` until you find a value enough to the app
> stack (and, after that, set this value as the default value for
> `EXAMPLES_M_THREE_PLUS_STACKSIZE`).
>
> Best regards,
>
> Em qui., 31 de ago. de 2023 às 20:21, Gustavo Soares
> mailto:gustavo.felipesoa...@hotmail.com>>
> escreveu:
> Hi!
>
>  I changed the config name as suggested:
> [cid:18a50a12968cb971f166]
>
> But when I started the application the same error showed up (User stack
> pointer is not within the stack) and the command prompt printed an undefined
> char nonstop. So I decided to change the value to the default task stack
> size:
>
> [cid:18a50a12968cb971f168]
>
> and this happened:
>
> [cid:18a50a12968cb971f167]
>
> Should I try another stack size value? Is there anyway to determine the
> correct value?
> 
> De: Tiago Medicci Serrano
> mailto:tiago.medi...@gmail.com>>
> Enviado: quinta-feira, 31 de agosto de 2023 10:01
> Para: dev@nuttx.apache.org<mailto:dev@nuttx.apache.org>
> mailto:dev@nuttx.apache.org>>
> Assunto: Re: New application to Nuttx
>
> Hi!
>
> After considering what Gustavo Nihei said, please note that you've set a
> default value, but your `defconfig` may use another one. So, run `make
> menuconfig` and ensure you've set the stack size to that config.
>
> You can check the generated `.config` file for the actual value of this
> config ;)
>
> I hope this helps.
>
> Best regards,
>
>
> Em qua., 30 de ago. de 2023 às 21:23, Gustavo Henrique Nihei
> mailto:ghni...@gmail.com>> escreveu:
> Hi Gustavo,
>
> notice that on your first screenshot you prepended the config with CONFIG_,
> but this is also done by the Kconfig tool.
> That's why NuttX set the stack size to the default value, since the
> CONFIG_EXAMPLES_M_THREE_PLUS_STACKSIZE is empty.
> In order to achieve the expect result you may either rename your Kconfig
> config to EXAMPLES_M_THREE_PLUS_STACKSIZE (best option) or the Makefile
> variable to CONFIG_CONFIG_EXAMPLES_M_THREE_PLUS_STACKSIZE (undesirable).
>
> Best regards,
> Gustavo.
>
>
> On Wed, Aug 30, 2023 at 9:09 PM Gustavo Soares
> mailto:gustavo.felipesoa...@hotmail.com>>
> wrote:
> Hi, Tiago!
>
> I'm sorry for the delay to reply your last e-mail. I tried to pass an
> alternative value to the application stack size as shown below:
>
> [cid:18a50a12968cb971f163][cid:18a50a12968cb971f164]
>
> But the stack size

New application to Nuttx

2023-08-05 Thread Gustavo Soares
Hello everyone!

I'm implementing a new application to Nuttx as my final college project: a 
assembly interpreter webserver. I've finished the code and it is running 
normally on Linux, but when I try to run the app on NuttX the following error 
occours: dump_stack: ERROR: User Stack pointer is not within the stack.

[cid:02804ca4-8157-4452-90e4-4698450b0158]

[cid:6394cebd-f2bb-415e-9655-e93ff246eeeb]
The last line in the second print is my application status.

Does anyone know what could be causing this problem? Is it possible to increase 
the stack size?


Re: undefined reference to 'inet_ntoa_r'

2023-03-17 Thread Gustavo Soares
I've defined the default gateway and the router IP in the menuconfig like
this:

Library Routines
├── NETDB Support
├── DNS Name Resolution
├── Target IPv4 address (default gateway)

Application Configuration
├── Network Utilities
├── Network Initialization
├── IP Address Configuration
├── Target IPv4 address (default gateway)
├── Router IPv4 address (router IP)

When trying to ping, it returns 'no response':
[image: ping response]

Em sex., 17 de mar. de 2023 às 12:59, Petro Karashchenko <
petro.karashche...@gmail.com> escreveu:

> Hello Gustavo,
>
> By "connected esp to the internet" do you mean that your board has public
> IP (not in the local network) or accessible via NAT?
>
> Because if you just connect board to home WiFi router that provides
> Internet, this is not "connected esp to the internet". If that is the case,
> then better try to find IP config of esp wireless interface and access
> webserver from LAN.
>
> Best regards,
> Petro
>
> On Fri, Mar 17, 2023, 5:22 PM Gustavo Soares <
> gustavo.felipesoa...@hotmail.com> wrote:
>
> > Hi, Alan!
> >
> > Thank you and Petro for the support, it's compiling now! I also connected
> > the esp to the internet, but for some reason both 'nslookup' and 'ping'
> are
> > failing and when I start the webserver it gets stuck in the 'starting
> > webserver' message.
> >
> > Em sex., 17 de mar. de 2023 às 08:52, Alan C. Assis 
> > escreveu:
> >
> > > Hi Gustavo,
> > >
> > > Enabling all the network needed features on NuttX is very time
> > > consuming, so this is a good idea to start with a working example.
> > >
> > > In this case nsh is not the recommended starting point, but wapi (wifi
> > > board profile).
> > >
> > > Try this sequence:
> > > make distclean
> > > ./tools/configure.sh esp32-devkitc:wapi
> > >
> > > Then example the webserver example.
> > >
> > > BR,
> > >
> > > Alan
> > >
> > > On 3/17/23, Gustavo Soares  wrote:
> > > > Hi, Petro!
> > > >
> > > > I'm using the latest version of NuttX.
> > > >
> > > > Em sex., 17 de mar. de 2023 01:56, Petro Karashchenko <
> > > > petro.karashche...@gmail.com> escreveu:
> > > >
> > > >> I just tried next steps:
> > > >>
> > > >> 1. tools/configure.sh esp32-devkitc:nsh
> > > >> 2. Additionally enabled via menuconfig:
> > > >> CONFIG_ESP32_EMAC=y
> > > >> CONFIG_ESP32_WIFI=y
> > > >> CONFIG_EXAMPLES_WEBSERVER=y
> > > >> CONFIG_NETUTILS_WEBSERVER=y
> > > >> CONFIG_NET_SOCKOPTS=y
> > > >> CONFIG_NET_TCP=y
> > > >> CONFIG_SCHED_HPWORK=y
> > > >> CONFIG_SCHED_LPWORK=y
> > > >> CONFIG_TLS_TASK_NELEM=1
> > > >> 3. make -j8
> > > >>
> > > >> The project compiles with errors.
> > > >> I tried that on the latest master branch. Are you using some stable
> > > >> release or the reported issue is on master?
> > > >>
> > > >> Best regards,
> > > >> Petro
> > > >>
> > > >> пт, 17 бер. 2023 р. о 05:32 Gustavo Soares <
> > > >> gustavo.felipesoa...@hotmail.com> пише:
> > > >>
> > > >>> I'm trying to compile the webserver example first. When I created
> the
> > > >>> config file, the chosen configuration for esp32 was
> > > 'esp32-devkitc:nsh'.
> > > >>>
> > > >>> Em sex., 17 de mar. de 2023 às 01:14, Petro Karashchenko <
> > > >>> petro.karashche...@gmail.com> escreveu:
> > > >>>
> > > >>>> Hello Gustavo,
> > > >>>>
> > > >>>> Are you trying to compile an example or your custom application?
> > > >>>> If you are getting started with an example, so maybe you make
> "make
> > > >>>> savedefconfig" and send it to me, so I can try locally?
> > > >>>>
> > > >>>> Best regards,
> > > >>>> Petro
> > > >>>>
> > > >>>> On Fri, Mar 17, 2023, 5:08 AM Gustavo Soares <
> > > >>>> gustavo.felipesoa...@hotmail.com> wrote:
> > > >>>>

Re: undefined reference to 'inet_ntoa_r'

2023-03-17 Thread Gustavo Soares
Hi, Alan!

Thank you and Petro for the support, it's compiling now! I also connected
the esp to the internet, but for some reason both 'nslookup' and 'ping' are
failing and when I start the webserver it gets stuck in the 'starting
webserver' message.

Em sex., 17 de mar. de 2023 às 08:52, Alan C. Assis 
escreveu:

> Hi Gustavo,
>
> Enabling all the network needed features on NuttX is very time
> consuming, so this is a good idea to start with a working example.
>
> In this case nsh is not the recommended starting point, but wapi (wifi
> board profile).
>
> Try this sequence:
> make distclean
> ./tools/configure.sh esp32-devkitc:wapi
>
> Then example the webserver example.
>
> BR,
>
> Alan
>
> On 3/17/23, Gustavo Soares  wrote:
> > Hi, Petro!
> >
> > I'm using the latest version of NuttX.
> >
> > Em sex., 17 de mar. de 2023 01:56, Petro Karashchenko <
> > petro.karashche...@gmail.com> escreveu:
> >
> >> I just tried next steps:
> >>
> >> 1. tools/configure.sh esp32-devkitc:nsh
> >> 2. Additionally enabled via menuconfig:
> >> CONFIG_ESP32_EMAC=y
> >> CONFIG_ESP32_WIFI=y
> >> CONFIG_EXAMPLES_WEBSERVER=y
> >> CONFIG_NETUTILS_WEBSERVER=y
> >> CONFIG_NET_SOCKOPTS=y
> >> CONFIG_NET_TCP=y
> >> CONFIG_SCHED_HPWORK=y
> >> CONFIG_SCHED_LPWORK=y
> >> CONFIG_TLS_TASK_NELEM=1
> >> 3. make -j8
> >>
> >> The project compiles with errors.
> >> I tried that on the latest master branch. Are you using some stable
> >> release or the reported issue is on master?
> >>
> >> Best regards,
> >> Petro
> >>
> >> пт, 17 бер. 2023 р. о 05:32 Gustavo Soares <
> >> gustavo.felipesoa...@hotmail.com> пише:
> >>
> >>> I'm trying to compile the webserver example first. When I created the
> >>> config file, the chosen configuration for esp32 was
> 'esp32-devkitc:nsh'.
> >>>
> >>> Em sex., 17 de mar. de 2023 às 01:14, Petro Karashchenko <
> >>> petro.karashche...@gmail.com> escreveu:
> >>>
> >>>> Hello Gustavo,
> >>>>
> >>>> Are you trying to compile an example or your custom application?
> >>>> If you are getting started with an example, so maybe you make "make
> >>>> savedefconfig" and send it to me, so I can try locally?
> >>>>
> >>>> Best regards,
> >>>> Petro
> >>>>
> >>>> On Fri, Mar 17, 2023, 5:08 AM Gustavo Soares <
> >>>> gustavo.felipesoa...@hotmail.com> wrote:
> >>>>
> >>>>> Hello, Petro!
> >>>>>
> >>>>> inside menuconfig IPv4 is enabled:
> >>>>> [image: image.png]
> >>>>>
> >>>>> It's also possible to see the option in the .config file:
> >>>>> [image: image.png]
> >>>>>
> >>>>> Thank you for your support,
> >>>>> Gustavo.
> >>>>>
> >>>>>
> >>>>> Em qui., 16 de mar. de 2023 22:56, Petro Karashchenko <
> >>>>> petro.karashche...@gmail.com> escreveu:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I see that both "inet_ntoa" and "inet_ntoa_r" implementations are
> >>>>>> guarded by "CONFIG_NET_IPv4" and "CONFIG_LIBC_IPv4_ADDRCONV". Could
> >>>>>> you
> >>>>>> take a look if your configuration has at least one of those options
> >>>>>> enabled?
> >>>>>>
> >>>>>> Best regards,
> >>>>>> Petro
> >>>>>>
> >>>>>> пт, 17 бер. 2023 р. о 01:57 Gustavo Soares <
> >>>>>> gustavo.fssoare...@gmail.com> пише:
> >>>>>>
> >>>>>>> Hi!
> >>>>>>>
> >>>>>>> I'm starting a new project at college using NuttX and ESP-32. I'm
> >>>>>>> trying to build a new application for NuttX: a webserver to read
> and
> >>>>>>> execute Assembly! But the following error is showing up:[image:
> >>>>>>> error description]
> >>>>>>> [image: netprocfs_inet4addresses function (netdev_statistics.c
> >>>>>>> file)]
> >>>>>>>
> >>>>>>> In menuconfig I enabled:
> >>>>>>>   Network support
> >>>>>>>  ├── Link layer support
> >>>>>>>  ├── Ethernet support
> >>>>>>>  ├── Late driver initialization
> >>>>>>>  ├── TCP/IP Networking
> >>>>>>>
> >>>>>>> Application Configuration
> >>>>>>> ├── Network utilities
> >>>>>>> ├── Network initialization
> >>>>>>> ├── Network initialization thread
> >>>>>>> ├── Hardware has no MAC Address
> >>>>>>>
> >>>>>>> Could someone help me with this?
> >>>>>>> And also, I've been searching for articles about building
> >>>>>>> applications for NuttX, but didn't find any. Does anyone know
> where I
> >>>>>>> can
> >>>>>>> find them?
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >
>