WiFi connection times out if credentials retrieved via serial terminal
The answer was quite simple but of the kind you need some time get find out. The issue was a hiding carriage return.

passw.trim();


Did the trick. String.trim() removes the \r and thus the password gets accepted.