Hi there,
I think the read() and write() system calls are broken for socket file descriptors. If I use read() and write() in a function compiled with my app_main, when I look at the assembly, I see that apparently the read and write calls are getting mapped directly onto lwip_read_r and lwip_write_r, which is almost certainly wrong, even though it 'works'. HOWEVER, when I move that function into a component and pass in the file descriptor I see that they are getting mapped to something inside libc, as I would have expected. Unfortunately this causes crashes and I don't know why, because my JTAG pins are taken up by an SD card.
Can someone please fix this! It's really a problem to have to re-write all my library code to use send/recv when it doesn't have to care about the difference between files and sockets.
socket file descriptors seem broken inside components
Re: socket file descriptors seem broken inside components
There's an open issue about this, https://github.com/espressif/esp-idf/issues/273.
We do have this planned, but not for the next version (2.1). Will likely be done in the one after that.
We do have this planned, but not for the next version (2.1). Will likely be done in the one after that.
Who is online
Users browsing this forum: No registered users and 36 guests