Well, that explains where -7 came from. Now why couldn't I find that in the pico-sdk files? Age and confusion, I suspect!The code tries to convert to "standard" pico error codes for reasons that escape me...
enum pico_error_codes {
PICO_OK = 0,
PICO_ERROR_NONE = 0,
PICO_ERROR_TIMEOUT = -1,
PICO_ERROR_GENERIC = -2,
PICO_ERROR_NO_DATA = -3,
PICO_ERROR_NOT_PERMITTED = -4,
PICO_ERROR_INVALID_ARG = -5,
PICO_ERROR_IO = -6,
PICO_ERROR_BADAUTH = -7,
PICO_ERROR_CONNECT_FAILED = -8,
PICO_ERROR_INSUFFICIENT_RESOURCES = -9,
};
It might be worth adding some logging to cyw43_cb_process_async_event to work out where this is coming from. I seem to remember there's something funny about the state machine, it gets a bad auth followed by a good auth (see WIFI_JOIN_STATE_BADAUTH)
I will add some logging when I next get some time to tinker with it. If I make any progress I may come back and update this.
Right now I am upgrading some of the house infrastructure, such as moving the DNS and DHCP server from 32-bit bullseye to 64-bit bookworm. It's only one Pi4, but it does run dnsmasq and mosquitto, so I do need to get it right. At least it's on removable media, and not flashed somewhere difficult to back up/switch out....
Statistics: Posted by SteveSpencer — Fri Mar 22, 2024 1:13 pm