Introduction
Imagine you have a smart device that needs to connect to your home WiFi to work, but it has no screen or keyboard to enter the password. Setting up this connection easily and securely is the challenge WiFi provisioning solves.
Imagine giving a guest a temporary key to your house so they can enter and use the WiFi. You want to hand over the key safely, make sure they use it only once, and that they can get in without trouble.
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ User Device │──────▶│ Provisioning │──────▶│ IoT Device │
│ (Phone/App) │ │ Method │ │ (Smart Device)│
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
│ Enter WiFi Info │ │
│─────────────────────▶│ │
│ │ Send Credentials │
│ │─────────────────────▶│
│ │ │
│ │ Connect to WiFi │
│ │◀─────────────────────│device.startHotspot("MyDeviceSetup", "password123")
userPhone.connectToSSID("MyDeviceSetup", "password123")
userPhone.sendWiFiCredentials("HomeWiFi", "homepass")
device.connectToWiFi()
print(device.status())
What will the printed status most likely be if the credentials are correct?device.startHotspot("SetupSSID", "pass123")
userPhone.connectToSSID("SetupSSID", "pass123")
userPhone.sendWiFiCredentials("HomeWiFi", "wrongpass")
device.connectToWiFi()
print(device.status())
What is the most likely cause of the failure?Pass the test and this pattern moves unknown