Wifi conect to WPA example is not working

If your hardware is working, that would indicate:

  1. you have entered the incorrect SSID or passphrase
    or
  2. the security type on the wireless network with that SSID is not WPA PSK.

This example connects to an unencrypted Wifi network.

The same router with the same SSID?

edit: Added PSK (Pre-Shared Key). This library does not support WPA enterprise.
And there is this in the hardware reference page. Maybe WPA is not supported?

Encryption types: WEP and WPA2 Personal