Project builds ok but doesn't run on Pico W #19
Replies: 5 comments 26 replies
-
Hi Jason, The recipe you listed seems to be OK, but you didn't mention what the problem is... The Firmware doesn't start at all ? You don't see the time on the clock ? Or you're not able to access your network ? Have you wrote your credentials (SSID and password) in the place reserved for that for that in the code ? Also, you must be aware that you may have problems with USB CDC with the Pico W. When the CYW43 is being initialized, USB serial communication often get lost. Is your problem related to that ? André Just for my curiosity, may I ask you in which country you are ? |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. Only things changed:
Compilation goes fine but the clock doesn't boot at all. Commenting back the #define PICO_W makes things work (but without the NTP obviously). |
Beta Was this translation helpful? Give feedback.
-
Hi all, Unfortunately I haven't had much time to spend on this due to other commitments. However, this is what I have tried: My initial though was that because my main WiFi password had a '%' character in it this was causing problems with the sprintf at line 2127 in Pico-Clock-Green.c. To try and get around this I replaced sprintf with strcpy. I appended '\0' to all strings to make sure there were no buffer overflows etc. That didn't work so tried the following:
Still it will not connect. Have tried several power cycles but still nothing. My next step is write a small program to just connect to WiFI. Hopefully this will help me get to the bottom of the issue and then I can feedback my results. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi André I have tried the %% approach but still no connect. There is no % in my guest WiFi network. The code below based on code from here does connect to my WiFi (the main one with % in password). My next plan is to use some of the debug serial port facility to see what is happening and when. I may also get one of these and do some inline debugging to try and get a handle on what is going on. Thank you for your continued support and discussion. I am sure we will crack this! Best regards, Jason #include <stdio.h>
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
int setup(
uint32_t country,
const char *ssid,
const char *pass,
uint32_t auth)
{
int retVal;
if (cyw43_arch_init_with_country(country))
{
retVal = 1;
}
else
{
cyw43_arch_enable_sta_mode();
if (cyw43_arch_wifi_connect_blocking(ssid, pass, auth))
{
retVal = 2;
}
}
return retVal;
}
char ssid[] = "MySSID";
char pass[] = "MyPassword";
uint32_t country = CYW43_COUNTRY_UK;
uint32_t auth = CYW43_AUTH_WPA2_MIXED_PSK;
int main()
{
stdio_init_all();
setup(country, ssid, pass, auth);
while (true)
{
sleep_ms(1);
}
} |
Beta Was this translation helpful? Give feedback.
-
Hi I have exactly the same issue as the others in this discussion in that it builds ok but fails to run on the PicoW. On power up nothing happens at all and I’ve left it for around five minutes. if I use the precompiled Pico W version it works and if I compile the Pico version it works. It’s only when I compile the Pico W version it fails. I have uncommented the #define PICO_W line. The precompiled code is 806400 bytes but my version is 870400 bytes. Cheers Paul |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
Firstly, thank you André for this fabulous firmware! I've been running the non 'W' firmware for a while and thought maybe I'd use the PicoW to make a NTP version. Happily I see that it's already been done. Excellent!
The problem I have is my build will not run on the PicoW. The Pico-Green-Clock.uf2.PicoW file included with the checkout runs fine on my PicoW hardware. I get the flashing LED and debug messages about network attempt to connect and fail attempts via the serial port. I need to get my build to run as I don't want to manually enter my 63 digit random character WiFi key :-)
This is my process:
Any ideas on what the problem could be would be most welcome.
Many thanks and best regards,
Jason
Beta Was this translation helpful? Give feedback.
All reactions