There is an issue that a 'connect' with the wrong password will appear to connect but I am not sure if that's because the Pico W has not been rebooted and is maintaining a previous connection, is ignoring the new connect or not caring the password is wrong. There appears to be more work to be done to determine the exact behaviour and characteristics in various situations where something funky is going on.
It is somewhat difficult to tell what may be going on except by investigating from a known starting position and it may be possible that some things appear to be other things until it is figured out. That was certainly the case for unexpected occurrences I was experiencing.
One tip I do have is to power-cycle the Pico W or issue a 'machine.reset()' before testing code. Especially after a Ctrl-C, even after a Ctrl-D soft reboot. If not, the wireless side of things isn't initialised as it would be from a reboot, and it seems it will be in some sort of already initialised, perhaps connected or active, state.
The best approach I have found is to identify what is correct behaviour, then try to determine when and why incorrect behaviour is seen. I am working my way through issues seen so I hope to investigate this 'connect' issue soon. But don't let that stop others from doing their own investigations.
It is somewhat difficult to tell what may be going on except by investigating from a known starting position and it may be possible that some things appear to be other things until it is figured out. That was certainly the case for unexpected occurrences I was experiencing.
One tip I do have is to power-cycle the Pico W or issue a 'machine.reset()' before testing code. Especially after a Ctrl-C, even after a Ctrl-D soft reboot. If not, the wireless side of things isn't initialised as it would be from a reboot, and it seems it will be in some sort of already initialised, perhaps connected or active, state.
The best approach I have found is to identify what is correct behaviour, then try to determine when and why incorrect behaviour is seen. I am working my way through issues seen so I hope to investigate this 'connect' issue soon. But don't let that stop others from doing their own investigations.
Statistics: Posted by hippy — Sat Jan 27, 2024 1:23 am