(optional) Ensure you can access the WiFi AP by connecting to it from a laptop/phone
Edit the /lib/secrets.py
file on your SAM32 and update ssid
to be the broadcast name of your WiFi access point and password
to be the corresponding password. If the AP doesn't have a password (is an "Open" network), set the password
field to be empty like this:
'password' : '',
Make sure your ssid and password are strings (enclosed in quotes or in apostrophes) and then save the file.
⚠BE CAREFUL⚠ sharing secrets.py
! your credentials are stored in plain text!
Open a serial console and start the SAM32 REPL (Accessing the Serial Console)
Press Ctrl
+ D
to reboot the board, then Ctrl
+ C
to halt it
Type:
>>> from sam32lib import sam32
>>> sam32.esp_init()
>>> sam32.wifi()
See the Testing Your Connection section below
eduroam is an "enterprise" access point and must be handled differently than a standard WPA2-esque connection.
/lib/secrets.py
file on your SAM32 and update ent_user
to be your university email address and ent_password
to be the password corresponding with the account. Save the file. You don't need to update any other fields unless your enterprise AP is not named "eduroam"⚠BE CAREFUL⚠ sharing secrets.py
! your credentials are stored in plain text!
3. Open a serial console and start the SAM32 REPL (Accessing the Serial Console)
4. Press Ctrl
+ D
to reboot the board, then Ctrl
+ C
to halt it
5. Type:
```bash
>>> from sam32lib import sam32
>>> sam32.esp_init()
>>> sam32.wifi(enterprise=2)
```
setting `enterprise=2` is what tells the ESP32 to handle this connection differently than normal.
After following one of the procedures above for connecting to an AP (and assuming you didn't receive any error messages), there are multiple ways to check if you're connected: