-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect socket details for 'net' and 'http' on pico-w board #549
Comments
@c6fc Could you share the source code you tested? I want to reproduce the same issue on my setup. |
Sure thing. These are both after a lot of iterations during testing, so they're super ugly, but it should be reproducible for you: https://gist.github.com/c6fc/49d27fb60b8313029d756e497a6b7bfd |
@c6fc Thank you for your information. I found some issues on the current FW. |
if I use the uf2 I built with If I switch back to the public release pico-w-1.1.0-beta.1 UF2, I don't get this error. Are there additional arguments required for the pico-w build to get the drivers passed into it? |
@c6fc It's strange. there's no changes related to the wifi driver. And please use attached uf2 file which I used for this test. |
@communix I just gave this latest uf2 a try. For both I'm just using the example code from the docs. Appreciate your work on this!! |
I have the same issue. Tried it both with the current FW and kaluma-rp2-pico-w-1.1.0-beta.1_pico_w_test_0118.uf2.zip I also appreciate your work on this! |
@etx @emerson-a Thank you for your feedback. let me check it. |
@emerson-a @etx |
I got the same issue than @emerson-a and @etx . After one connection, I can't make another connection. I try to debug it but I am really struggling. It seems to have a link with the code using the listen fd to manage the connection with the client. Changing : kaluma/src/modules/pico_cyw43/module_pico_cyw43.c Lines 680 to 683 in 192154e
by static err_t __tcp_server_accept_cb(void *arg, struct tcp_pcb *newpcb,
err_t err) {
if (err == ERR_OK) {
// test create fd
uint8_t *oldFd = (uint8_t *)arg;
int fdV = km_get_socket_fd();
uint8_t *fd = &fdV;
memcpy(&__socket_info.socket[*fd], &__socket_info.socket[*oldFd], sizeof(__socket_data_t));
__socket_info.socket[*fd].fd = fdV; (Sorry for the really bad code!) I am able to connect again with another client but i can't connect two client in parallel. |
I have tested this but the same issue occurs. I can only make one http connection. Thanks again for your work on this! |
@emeson-a, @K4ST0R Thank you for your feedback. I think the remaining issue issue is two client support. I have created new issue about is (#557), So let's discuss this issue at #557. I'll close this issue. |
@communix Could you post the JS file you're flashing to test http.createServer? I'm still having a hard time getting it to work. Thank you! |
@etx I'm testing with the @emerson-a 's code. https://gist.github.com/emerson-a/d48df41f8431ebcb3ed516f17485d7ef |
Using the kaluma-rp2-pico-w-1.1.0-beta.1.uf2 release, the 'createServer' method for 'net' and 'http' modules shows incorrect details for connected sockets:
In both cases, calls to '.write()' methods fail to deliver the data back to the client, but no errors are returned and the callbacks for both '.write()' and '.end()' execute normally. I haven't been able to verify what the outbound packet from the pico-w look like (so I don't know if injecting the correct raddr and rport will cause the data to be delivered), but at the moment it seems that the incorrect socket details are preventing server responses from reaching the client.
The text was updated successfully, but these errors were encountered: