On Fri, Apr 26, 2024 at 09:17:30PM +0200, Bernd Walter wrote:
> On Fri, Apr 26, 2024 at 07:58:00PM +0200, Tomek CEDRO wrote:
> > Can you please elaborate more on why / how system hangs?

I've found two bugs in my http code related to that.
I have had random hangs when doing a ping, however, without a ping the
system seems to be stable.
Will have to see what happens with a ping.
Maybe it was something unrelated - a browser window was still opened
and did a retry on a critical webpage or something.

The bugs hadn't been in the NuttX code, but since it might trap others
as well.

1. I did write into a const struct.
The server code has a struct to assign file endings to content type.
Something to be assumed const and to save RAM when I converted it from
NutOS I added a const in the declaration.
However, a 3rd entry is a parser function and I assigned some.
On the ARM it was ignored, but not noticed because I never used this
content type.

2. strcmp with NULL parameter, which is undefined and worked on ARM,
but failed on the ESP32
For dynamic data on a main page I used a GET argument to switch between menu
points.
An initial request is without this parameter and the function to return the
value of that argument returned NULL, which I had put into strcmp to check
if a given menu was selected.

Next thing will be to find out on how to use the code flash for configdata.
It seems there is filesystem support for that.
Normaly I would add an 24*16 chip and be done with it, but the ESP32 has
so little available GPIO when using ethernet...

And then trying to get WiFi running.
I do get the following message on the console:
ERROR: Failed to initialize wireless subsystem=-12
But I'm sure that's my fault.

-- 
B.Walter <be...@bwct.de> https://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.

Reply via email to