Replies: 2 comments 29 replies
-
I suggest turning on full debugging The interesting bit would be here where potentially it might not be able to allocate an LWIP arduino-pico/libraries/WiFi/src/include/UdpContext.h Lines 398 to 437 in 783bee5 Also, I would suggest checking the return values of the UDP calls. They will let you know if they have failed before getting anything to the radio. |
Beta Was this translation helpful? Give feedback.
-
One other thing would be to compare the |
Beta Was this translation helpful? Give feedback.
-
I am reading 24-bit I2S data from an ADC at 96 ks/s and sending it over WiFi using UDP on the Raspberry Pi Pico W. I am having problems with packet loss of about 1%, which for my SDR application is unacceptable. I know UDP is not guaranteed to deliver packets, but it is not the network that is causing the problem. The Pico cannot reliably send the UDP data as fast as I want it to (not very fast).
I am sure I isolated the problem I have been struggling with to the Raspberry Pi Pico WiFiUdp. I am sure it is not my router or network because I have tested the network at more than 10x the amount of data per second with 0% packet loss, but when the data is coming from the Pico W, then I get significant packet loss when I try to go faster than 427 kBytes/s ( delay less than 2 ms). I can't even get that data rate without significant packet loss if I am doing anything more complicated than my test program below. For example, if I remove the
memset(buffer, 0x00, bufferSize);
below, it has half the packet loss (about 1% as opposed to 2%).I have already gone to sending only 24-bit samples instead of 32, but my sample code is simpler with 32-bit samples, so that is what I'm showing here. I could get by without USB. Is there a way I could disable USB to remove USB interrupts? What other ways could I improve this? I saw that others using the Pico SDK were able to get significantly higher data rates over WiFi than the Arduino-Pico framework. Should I investigate that? What other advice do you have?
In case you are interested, the code I have been using to test the data rate is in Python and I will quote it below. I can also supply the code I was using to test the network if anyone wants. I am measuring the data rate using the Ubuntu System Monitor, which I have tested pretty extensively and found to be reliable.
Beta Was this translation helpful? Give feedback.
All reactions