1

For a teaching demo about autonomy in scientific research, it will likely be a major blocker if students cannot connect the Pico W to their school's WiFi.

Someone suggested MAC spoofing, and I agree that this seems the easiest way to go; however, I also wonder if there's a way to connect a Pico W via WPA authentication to a network more directly.

Any additional thoughts or suggestions here? Any example code? I'd like to minimize the number of additional steps that a user needs to take to set up a network connection.

Related:

Sterling
  • 111
  • 4

1 Answers1

1

I found something that could be of help

https://docs.pycom.io/tutorials/networks/wlan/#connecting-to-a-wpa2-enterprise-network

Connecting with EAP-TLS:

Before connecting, obtain and copy the public and private keys to the device, e.g. under location /flash/cert. If it is required to validate the server’s public key, an appropriate CA certificate (chain) must also be provided.

from network import WLAN

wlan = WLAN(mode=WLAN.STA) wlan.connect(ssid='mywifi', auth=(WLAN.WPA2_ENT,), identity='myidentity', ca_certs='/flash/cert/ca.pem', keyfile='/flash/cert/client.key', certfile='/flash/cert/client.crt')

Connecting with EAP-PEAP or EAP-TTLS:

In case of EAP-PEAP (or EAP-TTLS), the client key and certificate are not necessary, only a username and password pair. If it is required to validate the server’s public key, an appropriate CA certificate (chain) must also be provided.

from network import WLAN
wlan = WLAN(mode=WLAN.STA)
wlan.connect(ssid='mywifi', auth=(WLAN.WPA2_ENT, 'username', 'password'), [identity='myidentity', ca_certs='/flash/cert/ca.pem'])
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – Chenmunka Dec 01 '22 at 22:13
  • This looks very promising! I'll plan on giving it a try with Eduroam – Sterling Dec 04 '22 at 05:46
  • Still planning to try, but I'm not seeing some of the WLAN class properties that were listed above https://docs.micropython.org/en/latest/library/network.WLAN.html – Sterling Jan 24 '23 at 02:22
  • 1
    From what I understand and I am a noob at this. It's not possible to have eduroam on Pi Pico because the Micropython SDK for Pi Pico has not made that class and the C/C++ SDK has not either. Whereas the MicroPython SDK developed by Expressif who makes ESP32 has, so it's just not possible on a Pico. It has been demanded since 2019 I believe. Sad but true. – Zayyan Masud Jan 25 '23 at 14:33