Connecting a device to a WiFi network without keying its password

Thread Starter

cmartinez

Joined Jan 17, 2007
6,871
Ok, here's my conundrum:

I've designed a device with an internal WiFi module that works like a charm. The module responds to AT commands, and among its instructions, it has one for listing available WiFi networks.

Here's the deal: The device has no keyboard and no display and only a single, lonely button that is used for testing and diagnostics. I could program said button to do anything I want. For instance, press and hold would do one thing, pressing it twice another thing etc...

I would like to connect my device to my WiFi network, but since the device has no other way to interact with its user, I cannot key in the network's password.

Question: Is there a way to write some sort of software that would discover my device and allow it to connect to the network? I read that letting the router know its MAC address might do the trick, but can something like that be done via a custom written software? My goal is to allow the device connect to a network with as little assistance as possible from the user. That is, I want to avoid the need of assistance from a specialist for this simple purpose.

Ideally, I'd like to make a program that when run would allow me to reach the device via WiFi and let it know the password to access said network.
 

joeyd999

Joined Jun 6, 2011
4,370
Ideally, I'd like to make a program that when run would allow me to reach the device via WiFi and let it know the password to access said network.
Absolutely not! That'd be a huge security risk.

Protected networks are not going to offer up their passwords to someone just for asking.

Edit: Solution -- add a Bluetooth radio. You can transmit the password and other settings via a mobile device.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
6,871
Absolutely not! That'd be a huge security risk.

Protected networks are not going to offer up their passwords to someone just for asking.

Edit: Solution -- add a Bluetooth radio. You can transmit the password and other settings via a mobile device.
Thanks for your reply, Joey. I'm aware that you're quite experienced in this subject and appreciate your help.

What I've been looking at is, adding a usb to uart chip to my device (such as the cheap-o CH330N) and connect it directly to an Android phone. Then a simple app might allow the user to config the device, telling it which network to use and its password.

OTH your suggestion sounds plausible. About how much would the simplest bluetooth module cost?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
6,871
So the WiFi module, as is, can only connect to networks with no password?
It's not that, it's that I have to login to the module, and transmit parameter data (i.e. network id and password) through it UART so that then it can connect. What I'd like to do is somehow let it know those parameters without adding extra components such as a display and a keyboard.

But I just thought that the module supports direct WiFi (AdHoc) connection. Maybe that way I can connect it to a phone pressing the only button it has, and then have the phone work as a terminal that will transmit those parameters to the MCU, and from there to the module after the AdHoc connection is terminated.
 

wayneh

Joined Sep 9, 2010
16,384
Not sure it’s relevant at all but I have a few smart home devices such as switched outlets and a thermostat. They all require a connection to the home LAN WiFi. This is accomplished using a custom helper app on a smartphone also connected to the home LAN. You usually capture a photo of the S/N on the packaging or maybe a QR code, and the device is magically added to the home WiFi network. Somehow the WiFi login credentials are transferred to the device and you’re done.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
6,871
Not sure it’s relevant at all but I have a few smart home devices such as switched outlets and a thermostat. They all require a connection to the home LAN WiFi. This is accomplished using a custom helper app on a smartphone also connected to the home LAN. You usually capture a photo of the S/N on the packaging or maybe a QR code, and the device is magically added to the home WiFi network. Somehow the WiFi login credentials are transferred to the device and you’re done.
That's more or less what I want. I wonder how that works.
 
Top