WPA Enterprise support is here! We have a pre-release firmware version 0.7.0-rc.x that is waiting for you to start using now. Also remember that it is not ready for production until it’s defaulted to 0.7.0.
Purpose
This thread will serve the purpose of creating a place to provide instructions for the WPA Enterprise setup process as it evolves, and help to answer any questions that come up about the process. Currently as of this writing we have two ways to run setup: 1) Serial setup over USB without the CLI, and 2) CLI support with v1.23.1 via particle serial wifi.
Required
WPA Enterprise requires a capable access point and a separate authentication server. We would love to see you try the various test methods below, and of course chime in and let us know if it’s working well in your already established WPA Enterprise environment (campuses, workplace, etc…).
Test Methods
Setting up a WPA2 Enterprise Test Environment with Raspberry Pi Instructions Below
Setting up a WPA2 Enterprise Test Environment with a local computer via Docker image Instructions Below
Share your own test method! Please let us know which authentication types you used and what issues you might have run into.
In terminal, navigate to this directory: cd particle-wpa-enterprise-docker/files/etc/freeradius/certs/
Finally copy the files: scp -rv * root@<ip_address>:/etc/freeradius/certs2
Edit the users file
nano /etc/freeradius/users
add to bottom and save with CTRL+X then ENTER
particle Cleartext-Password := "particle2017"
Restart freeradius in debugging mode so we can see what's going on
service freeradius stop
/usr/sbin/freeradius -X
Now let's switch the WAP to use WPA Enterprise
Switch the Wireless Authentication Type to WPA2 Enterprise (apply)
Under RADIUS Setting configuration:
Server IP Address: Enter the IP address of the radiusserver (our RasPi)
Server Port: 1812
Connection Secret: particle
Setup the Photon/P1
Connect via USB cable
Enter Listening Mode
Connect via serial (screen /dev/cu.usbmodemXXXX on Mac or use Tera Term VT on Windows)
Press w
Example PEAP/MSCHAPv2 LOGIN / PASSWORD based setup (NOT SECURE!)
Note: This is the easiest setup method to gain a connection, however be warned it is not secure. Use certificates to ensure maximum security.
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 0 <ENTER>
Username: particle <ENTER>
Password: particle2017 <ENTER>
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <ENTER>
Example PEAP/MSCHAPv2 LOGIN / PASSWORD with Root CA based setup (SECURE!)
SSID: <WAP_SSID> <ENTER>
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 0 <ENTER>
Username: particle <ENTER>
Password: particle2017 <ENTER>
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <copy/paste in file ca.crt> <ENTER>
-----BEGIN CERTIFICATE-----
MIIFlDCCA3ygAwIBAgIJAI01a4ML65mlMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV
...
-----END CERTIFICATE-----
Example EAP-TLS with Client Cert., Client Key and Root CA based setup (SECURE!!!)
SSID: <WAP_SSID> <ENTER>
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 1 <ENTER>
Client certificate in PEM format: <copy/paste in file client1.crt>
-----BEGIN CERTIFICATE-----
MIIE3DCCAsSgAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwVzELMAkGA1UEBhMCVVMx
...
-----END CERTIFICATE-----
Private key in PEM format: <copy/paste in file client1.key>
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAy42H10w6nntp+Ti7Ts/czel8Gw4mz8Mh3N0R/sapRNLyznom
...
-----END RSA PRIVATE KEY-----
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <copy/paste in file ca.crt>
-----BEGIN CERTIFICATE-----
MIIFlDCCA3ygAwIBAgIJAI01a4ML65mlMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV
...
-----END CERTIFICATE-----
OUTPUT in all cases
Thanks! Wait while I save those credentials...
Awesome. Now we'll connect!
If you see a pulsing cyan light, your device
has connected to the Cloud and is ready to go!
If your LED flashes red or you encounter any other problems,
visit https://www.particle.io/support to debug.
Particle <3 you!
If you are still SSH'd into your RasPi, you should see activity from the freeradius process, and your device should have an internet connection.
If you don't see any activity, try rebooting your RasPi
Run the Docker Image (you should see debugging output from the FreeRADIUS process)
docker run -p 0.0.0.0:1812:1812/udp particle-wpa-enterprise
Now let's switch the WAP to use WPA Enterprise
Switch the Wireless Authentication Type to WPA2 Enterprise (apply)
Under RADIUS Setting configuration:
Server IP Address: Enter the IP address of the Local Machine
Server Port: 1812
Connection Secret: particle
Setup the Photon/P1
Connect via USB cable
Enter Listening Mode
Connect via serial (screen /dev/cu.usbmodemXXXX on Mac or use Tera Term VT on Windows)
Press w
Example PEAP/MSCHAPv2 LOGIN / PASSWORD based setup (NOT SECURE!)
Note: This is the easiest setup method to gain a connection, however be warned it is not secure. Use certificates to ensure maximum security.
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 0 <ENTER>
Username: particle <ENTER>
Password: particle2017 <ENTER>
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <ENTER>
Example PEAP/MSCHAPv2 LOGIN / PASSWORD with Root CA based setup (SECURE!)
SSID: <WAP_SSID> <ENTER>
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 0 <ENTER>
Username: particle <ENTER>
Password: particle2017 <ENTER>
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <copy/paste in file ca.crt> <ENTER>
-----BEGIN CERTIFICATE-----
MIIFlDCCA3ygAwIBAgIJAI01a4ML65mlMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV
...
-----END CERTIFICATE-----
Example EAP-TLS with Client Cert., Client Key and Root CA based setup (SECURE!!!)
SSID: <WAP_SSID> <ENTER>
EAP Type 0=PEAP/MSCHAPv2, 1=EAP-TLS: 1 <ENTER>
Client certificate in PEM format: <copy/paste in file client1.crt>
-----BEGIN CERTIFICATE-----
MIIE3DCCAsSgAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwVzELMAkGA1UEBhMCVVMx
...
-----END CERTIFICATE-----
Private key in PEM format: <copy/paste in file client1.key>
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAy42H10w6nntp+Ti7Ts/czel8Gw4mz8Mh3N0R/sapRNLyznom
...
-----END RSA PRIVATE KEY-----
Outer identity (optional): <ENTER>
Root CA in PEM format (optional): <copy/paste in file ca.crt>
-----BEGIN CERTIFICATE-----
MIIFlDCCA3ygAwIBAgIJAI01a4ML65mlMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV
...
-----END CERTIFICATE-----
OUTPUT in all cases
Thanks! Wait while I save those credentials...
Awesome. Now we'll connect!
If you see a pulsing cyan light, your device
has connected to the Cloud and is ready to go!
If your LED flashes red or you encounter any other problems,
visit https://www.particle.io/support to debug.
Particle <3 you!
If you still have the Docker process in Terminal open, you should see activity from the freeradius process, and your device should have an internet connection.
If you don't see any activity, try restarting the Docker image (see kill command below, run is above).
If you'd like to terminate the Docker image, follow these steps:
Run:
docker ps
Find the Container ID for the particle-wpa-enterprise Image.
This all looks very promising, will anybody be altering the SoftAP example to support this?
I would imagine it would need the user to have the key and certificate stored as files on their device and then a way of uploading them, tapping them in on a phone would be a disaster!
Oh holy cow I am happy about this. I haven’t tested it yet, and I have the infrastructure to test ALL of the scenarios you’ve (very helpfully) outlined.
not much of a requirement for me, but I suspect the next ask you’re going to receive in terms of enterprise compatibility is going to be proxy support. not everyone uses transparent proxies.
@Viscacha actually I misinterpreted something and SoftAP HTTP Pages doesn’t require any firmware changes, just the example needs to be updated. Pull requests to the Docs repo for this example would be very welcome
I figured I could probably call the relevant functions if I added them to the page but my HTML skills date back to the use of tags like <FRAME>`` and `` <BLINK>
I’m having an issue on a Photon that I’ve upgraded to 0.7.0 with an ST-Link. I always get an error when it tries to save the credentials I have entered. No one else is reporting this (that I’ve found) so I’m pretty sure it’s something I’ve done wrong. I don’t know what it could be, though.
I can’t recall the error at the moment, and it is related to not being able to save the configuration. I can’t find one now to test with, and the one I’m having an issue with is at work. I’ll get you the exact error message tomorrow.
I'm trying to connect my Photon to the WiFi of my university using WPA2-Enterprise/PEAP/MSCHAP2.
My code seems fine, I'm using the 0.7.0-rc2 firmware, but I get the following log:
@naikrovek This one may indicate that you are out of heap needed for WPA Enterprise. Try reducing some of the static ram allocation in your user app, possibly moving things to flash with const. You can also use the System.freeMemory() to get an idea of where you are at.[quote="Visionary, post:20, topic:34167"]
Sometimes i get a 1025 result, sometimes 1024 and sometimes 1006. But I don't even know if these numbers are relevant.
[/quote]
@Visionary would you please try a few things for me? I'd like to know if you get the same issue if you use the serial based setup (see above). Also if you move to different locations on campus do you still have problems? What is the signal strength of the network as reported by your computer? Try commenting out credentials.setOuterIdentity("anonymous"); as well and leave this as the default setting. When trying serial based setup, just press enter for Outer Identity vs. typing "anonymous" first.