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:

1
  • @jsotola, thanks for your suggestion. I condensed it.
    – Sterling
    Sep 15, 2022 at 23:14

1 Answer 1

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'])
4
  • 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 1, 2022 at 22:13
  • This looks very promising! I'll plan on giving it a try with Eduroam
    – Sterling
    Dec 4, 2022 at 5:46
  • Still planning to try, but I'm not seeing some of the WLAN class properties that were listed above docs.micropython.org/en/latest/library/network.WLAN.html
    – Sterling
    Jan 24, 2023 at 2: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. Jan 25, 2023 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.