-
Notifications
You must be signed in to change notification settings - Fork 422
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
Pi PICO-W WifiServer example code failure #860
Comments
The issue you referenced had his async code running on this core for >1 day, and I've done my own "testing" (well, just starting it up and checking this afternoon) which also seems fine after 8hrs of runtime w/the non-async version here. I think you may just have some interaction between the WiFi blob/chip here and your router's WiFi chipset. While I understand your pain (ask me about the ESP8266 and random WiFi things!), there's really nothing we can do here, sorry. |
OK. Was suspecting something like that. Tends to make the PI PICO somewhat useless as a wifi device if it is so unstable with off the shelf routers (TP-LINK Archer VR600, Firmware 0.2.0 0.9.1 v0074.0 Build 170504 Rel.68210n [Latest]). But I do not understand why code using Micropython (my own test code, so functionally different to the CPP example code, but tries to present a simple web page with live data) appear to run without Wifi issues. I assume that the FIRMWARE on the PI PICO-W wifi chip is different between the Micropython uf2 file and my CPP compiled program, otherwise my issue would have to be with the application code, i.e. the example code which works for other users!!! I also question possible Geographic location. I am in UK, but the example programs do not appear to care about location, so I would take a guess that all things default to USA as the initial location, are there any settings, function calls that really should be added to the test code to correctly configure WiFi parameters? |
I add a brief note here, in response to khoih-prog's reply. But: Today I have had two PI PICO's running two different MICROPYTHON programs, they have both been running for over 8 hours now, without issues. I do see in my MICROPYTHON code that both programs I have the following startup: =-=== Note the specific selection of UK for the country. The (your) example CPP code is using "WiFi.h" and "WiFiServer", but I have not seen any country selection. Also what do I need to add to set the country code? As I think that would be a good next step, though I have also just updated the Arduino IDE to the latest 2.5.4 release of the RP2040 codebase, so probably should re-run my test code unchanged just to confirm the code still has problems. =-======== =-====== |
Please test the new AsyncWebServer_RP2040W v1.0.3 with way to modify and display Release v1.0.3
|
Hi, @earlephilhower , I started a thread over on raspberrypi.com, the following link, Title: Pico-W web server stability issues when using CPP code VS Micropython I have now had confirmation from another UK user, who is also seeing the same problems with loss of access to Pico when using the RP2040 core example code : AdvancedWebServer.ino (File-Examples-Examples For Raspberry Pi Pico-W-Wifo-WifiServer). So far, the only common points between my setup and the other is, So there must be some issue that is being triggered, though what and how to isolate it is the big question. Are there any other lighter libraries that could be used in place of WifiServer/WifiClient that would exercise the lower level driver and firmware code? |
Hi @revell1 Just released the AsyncWebServer_RP2040W v1.1.0. Be sure to use with the latest AsyncTCP_RP2040W v1.1.0+. I've been testing using Firefox (in Ubuntu,not Windows 10) for many hours and still OK. Please test there to see if there still more issues. Release v1.1.0
|
I have been trying to resolve an issue with Wifi on PI PICO-W, originally posted over at:
github.com/khoih-prog/AsyncWebServer_RP2040W : Under Issue 3
It would be nice to resolve this issue, but can see that there is little to go on to identify either the failure mode or a solution, so am raising this issue in the hope that other users may be able to add to the available knowledge.
The history so far:
+++++++++++++++++++++
But have now concluded that the issue is not directly related to that Library, but must be an underlying issue with the
RP2040 PI Pico-W wifi functionality.
My hardware/software used:
Arduino IDE : 1.8.19
github: earlephilhower/arduino-pico library version : 2.5.2
Windows 10 Laptop, (Also later tested with old Linux Mint 19.2 Laptop)
PI PICO-W x3off (all have same problem)
Original issue reported to:
https://github.com/khoih-prog/AsyncWebServer_RP2040W/
Under ISSUE 3
As was having problems with that library.
Later switched to your AdvancedWebServer.ino (File-Examples-Examples For Raspberry Pi Pico-W-Wifo-WifiServer)
as this was nearly identical application code, just using your non-async server, hoping I could eliminate the RP2040
Arduino support as possible cause.
This also exhibited same lost response/connection issues.
Dug out 15 Year old laptop with Linux Mint 19.2 after updates and installing Arduino IDE (1.8.19) [installed first time with no issues unlike Windows10] built same code.
Compared uf2, map and a few other files against Windows 10, not quite the same, Windows u2f file
was 56 Bytes larger in Prog, and 4 bytes larger in Data, but probably not significant, so probably eliminates Windows 10 build system.
Then stepped back to Micropython (rp2-pico-w-20220914-unstable-v1.19.1-409-g0e8c2204d.uf2) and created a similar app to repeatedly request web page, but used AJAX and Java to request data packets, and also identical SVG file transfers on 3+4 second basis. [Note your example uses "meta http-equiv='refresh'" to get frequent updates].
This Micropython version has been running for several hours with no drops or lost responses.
I am starting to think there must be an issue with the Arduino/RP2040 CPP support of the PI PICO,
though do not understand how Khoi Hoang has managed to get his setup to run for 38+ Hours using the same
code and target hardware.
The only difference have to be with real world WiFi and Router, but so far Micropython has shown no issues!
On one occasion with Arduino code running, and with Wireshark monitoring network managed to catch a failure.
Packet capture indicated that failure occured during SVG image file response. Response that was recieved consisted of
two packets, the first packet was the [200, "image/svg+xml"] response packet,
while the second packet was ONLY the first line of data from the code in the drawGraph() function:
out += "<svg xmlns="http://www.w3.org/2000/svg\" version="1.1" width="310" height="150">\n";
out += "<rect width="310" height="150" fill="rgb(250, 230, 210)" stroke-width="2" stroke="rgb(0, 0, 0)" />\n";
out += "<g stroke="blue">\n";
No other data was sent and no further responses for HTTP data could be obtained, but the device still responded to PING's,
though I am guessing that PING replies may well be handled internally by the firmware in the CYW43439, also as I had modified
code to provide LED flash when Wifi requests were received by the code, the LED indicated that no further requests or responses were being received or sent in the software.
Also the heartbeat serial(USB) port debug was still occuring, so the code had not crashed.
The fact that the start of the reply occured must indicate that drawGraph() must have completed, also as a minimum there
should have been the 3 blocks of data from the (out+=) part of the code, so how has only one been sent, is that an internal
failure between the RP2040 processor and the CYW43439 that somehow chunked the data at a "\n" character, or something
internal to the CYW43439.
I am at a loss to understand, or see a way forward. I am currently forced to use Arduino IDE and CPP due to lack of suitable Python library support for other hardware that I am intending to use such as MPU6050 (all Python Libraries are incomplete and do not use the MPU processor).
The text was updated successfully, but these errors were encountered: