Adafruit_CircuitPython_ESP32SPI on network with MAC, not pas

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Adafruit_CircuitPython_ESP32SPI on network with MAC, not pas

Post by gallaugher »

I'm trying to use CircuitPython's Adafruit_CircuitPython_ESP32SPI library to connect to a university network that has non-computer devices connect by registering the Mac address. Once an address is registered, the device should be able to simply connect. This technique is used to allow devices like Alexa's, Google Home, game consoles, etc., to use the campus network. No separate login required, I assume since the website that approves the MAC address requires network member login & any activity from that MAC address device can be traced back to a user's account.

I'm working with an Arduino Nano RP2040 Connect & following this guide:
https://learn.adafruit.com/circuitpytho ... nnect/wifi
Part of the code uses
esp.connect_AP
passing in the ssid & password from the secrets file. But there's no password for the way this kind of device accesses this network. Here's the block of code in the sample code:

while not esp.is_connected:

Code: Select all

    try:
        esp.connect_AP(secrets["ssid"], secrets["password"])
    except RuntimeError as e:
        print("could not connect to AP, retrying: ", e)
        continue
I have been able to find the MAC for my Arduino Nano RP2040 & have gotten it approved for network use. I've looked at the readthedocs for the module but am unsure how to proceed. It looks like most of the "connect" related methods refer to ssid and password or passphrase. Any suggestions on how I might modify code that uses the snippet above to work on a network that allows any approved mac address device to connect w/o a password?

BTW: I've used CircuitPython on Raspberry Pis on this network via a similar scheme. The Pis connect to the network, though, using the spa_supplicant.conf file, not anything in CircuitPython. If it helps, here's what I need to include in the wpa_supplicant.conf file to get a Pi that has had its MAC address pre-approved, to connect to the university's Wi-Fi:

Code: Select all

network={
    ssid="BostonCollege"
    key_mgmt=NONE
    id_str="location1"
}
Thanks for helping me understand this.
John

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit_CircuitPython_ESP32SPI on network with MAC, not

Post by mikeysklar »

John,

What are you seeing on the REPL when trying to connect?

Are you running esp32spi_simpletest.py and do you have the secrets.py setup?

https://github.com/adafruit/Adafruit_Ci ... n/examples

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”