WPA2 Enterprise

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
BlackLyger
Posts: 1
Joined: Wed Nov 24, 2021 9:20 pm

Re: WPA2 Enterprise

Post by BlackLyger » Wed Nov 24, 2021 9:35 pm

chibill wrote:
Tue Jul 27, 2021 7:17 pm
I can provide a binary built with WPA2 support and also some information on how to use it. I am still working on figuring out how to properly make a PR for Micropython to get it into the main repo.
Hello @chibill. I am currently working on a project where I need to connect to a WPA2 Enterprise network using an ESP32. Is it possible for you to send me a recent and working version of a Micropython binary with WPA2 Enterprise support?

Thanks in advance.

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: WPA2 Enterprise

Post by chibill » Fri Nov 26, 2021 6:02 pm

Possibly, I have to pull the latest branch and make sure it still works. Also I still haven't really gotten it to be "safe" yet. Having issues figuring out how to do the error checking stuff.

freak42
Posts: 3
Joined: Thu Jan 27, 2022 6:07 pm

Re: WPA2 Enterprise

Post by freak42 » Thu Jan 27, 2022 6:12 pm

chibill wrote:
Tue Jul 27, 2021 7:17 pm
I can provide a binary built with WPA2 support and also some information on how to use it. I am still working on figuring out how to properly make a PR for Micropython to get it into the main repo.
@ChillBill
Building my own ESP32 firmware is way above my skills. If you happen to have a build with WPA enterprise support laying around:I would gladly take it so I can connect to my schools WiFi.

freak42
Posts: 3
Joined: Thu Jan 27, 2022 6:07 pm

Re: WPA2 Enterprise

Post by freak42 » Tue Feb 08, 2022 1:39 pm

I have now managed to 'forward' port the patch to MP v1.18 and hence i finally have enterprise support in a MP v1.18 version. So I don't need a firmware from anyone else anymore.

Geranimo
Posts: 2
Joined: Mon Apr 04, 2022 6:40 am

Re: WPA2 Enterprise

Post by Geranimo » Mon Apr 04, 2022 6:44 am

Hello everybody

@freak: Could you kindly show me with which code you managed to connect to a enterprise network?

I googled alot, but could not find a Micropython example for Enterprise Network.

Thanks alot and have a nice day.

MATTYGILO
Posts: 12
Joined: Tue Apr 05, 2022 3:03 pm

Re: WPA2 Enterprise

Post by MATTYGILO » Tue Apr 05, 2022 3:06 pm

freak42 wrote:
Tue Feb 08, 2022 1:39 pm
I have now managed to 'forward' port the patch to MP v1.18 and hence i finally have enterprise support in a MP v1.18 version. So I don't need a firmware from anyone else anymore.
Could you share your solution?

@freak42

Geranimo
Posts: 2
Joined: Mon Apr 04, 2022 6:40 am

Re: WPA2 Enterprise

Post by Geranimo » Fri Apr 08, 2022 6:10 am

I clearly see that there is something with Enterprise, but i sadly cant find a example how to use it.

>>> dir(network)
['__class__', '__init__', '__name__', 'AP_IF', 'AUTH_MAX', 'AUTH_OPEN', 'AUTH_WEP', 'AUTH_WPA2_ENTERPRISE', 'AUTH_WPA2_PSK', 'AUTH_WPA2_WPA3_PSK', 'AUTH_WPA3_PSK', 'AUTH_WPA_PSK', 'AUTH_WPA_WPA2_PSK', 'ETH_CONNECTED', 'ETH_DISCONNECTED', 'ETH_GOT_IP', 'ETH_INITIALIZED', 'ETH_STARTED', 'ETH_STOPPED', 'LAN', 'MODE_11B', 'MODE_11G', 'MODE_11N', 'PHY_DP83848', 'PHY_IP101', 'PHY_LAN8720', 'PHY_RTL8201', 'PPP', 'STAT_ASSOC_FAIL', 'STAT_BEACON_TIMEOUT', 'STAT_CONNECTING', 'STAT_GOT_IP', 'STAT_HANDSHAKE_TIMEOUT', 'STAT_IDLE', 'STAT_NO_AP_FOUND', 'STAT_WRONG_PASSWORD', 'STA_IF', 'WLAN', 'phy_mode']

MATTYGILO
Posts: 12
Joined: Tue Apr 05, 2022 3:03 pm

Re: WPA2 Enterprise

Post by MATTYGILO » Mon Jun 20, 2022 5:09 pm

For anyone interested these are the micropython network values

Code: Select all

__class__ <class 'module'>
__init__ <function>
__name__ network
AP_IF 1
AUTH_MAX 9
AUTH_OPEN 0
AUTH_WAPI_PSK 8
AUTH_WEP 1
AUTH_WPA2_ENTERPRISE 5
AUTH_WPA2_PSK 3
AUTH_WPA2_WPA3_PSK 7
AUTH_WPA3_PSK 6
AUTH_WPA_PSK 2
AUTH_WPA_WPA2_PSK 4
MODE_11B 1
MODE_11G 2
MODE_11N 4
PPP <function>
STAT_ASSOC_FAIL 203
STAT_BEACON_TIMEOUT 200
STAT_CONNECTING 1001
STAT_GOT_IP 1010
STAT_HANDSHAKE_TIMEOUT 204
STAT_IDLE 1000
STAT_NO_AP_FOUND 201
STAT_WRONG_PASSWORD 202
STA_IF 0
WLAN <function>
phy_mode <function>

MATTYGILO
Posts: 12
Joined: Tue Apr 05, 2022 3:03 pm

Re: WPA2 Enterprise

Post by MATTYGILO » Mon Jun 20, 2022 5:25 pm

Ok micropython has a function called

network.phy_mode([mode])

and these methods

network.MODE_11B – IEEE 802.11b - IEEE 802.11n-1999
network.MODE_11G – IEEE 802.11g - IEEE 802.11g-2003
network.MODE_11N – IEEE 802.11n - IEEE 802.11n-2009

Doing some research I have found out that
In enterprise mode, designed for larger wireless networks with multiple users, WPA and WPA2 leverage the IEEE 802.1x authentication mechanism using EAP.
I don't really know if this changes anything just documenting it here

MATTYGILO
Posts: 12
Joined: Tue Apr 05, 2022 3:03 pm

Re: WPA2 Enterprise

Post by MATTYGILO » Mon Jun 20, 2022 5:38 pm

Ok Doesn't work I now realise that this must be for another port

probably:
https://docs.micropython.org/en/latest/ ... NWiPy.html

Post Reply