How configure wi-fi on headless embedded Linux?

I attended a Mender / Variscite webinar today.

The Mender presenter thought a solution already existed in yocto some where. I expect this has been done many times for IOT devices and I do not want to “re-invent the wheel”. He suggested I ask the question here.

I am using a VAR-SOM-6UL with Wi-Fi and Bluetooth. I am seeking a solution that will not confuse our typical non-technical customer.

Question: How to configure wi-fi on a headless embedded Linux to connect to a network?

Thanks in advance,

-Ed

Hi @edOfTheMountain that would have been me presenting the webinar today. Glad you attended.

There are quite a few options in Yocto for configuring wifi. I gave a talk about some of the options a few years ago and generate this forum post about the details.

Now, that doesn’t answer the question of how do your users configure the credentials. The package I was thinking of when I mentioned the device setting up an ad-hoc Wifi Network was wifi-connect. But I would love to hear possible solutions from other users.

Drew

1 Like

This is probably not relevant for you, but we make our own products, and the way we approach it is to have a hardware gpio button built into the back of the device which uboot records it’s boot state, and a systemd service to action the users request to enable hostapd on demand.

1 Like

I was hoping there was a canned solution to “how do users configure the credentials”. I figure this has been done a thousand times.

I started building a NodeJs app:

  1. User must connect iPhone to hostapad running on device
  2. I had to create a web server and UI for user to interface SSID and credentials on device
  3. Web server must use connmanctl to scan and configure networking ( tedious )
  4. User must disconnect from device and reconnect to their normal wi-fi
  5. Device then connects to configured SSID with credentials.

This was a lot of work. My concern was our customers may not be technical enough to handle this.

Are there any canned solutions or easier approaches? Common approaches for other IOT type devices?

Something that is reasonably successful with non-technical customers?

A mobile app that configures device wi-fi via Bluetooth Low Energy (BLE) interface?

Thanks in advance,

-Ed

Hi @edOfTheMountain I’ve only used wifi-connect for this but I suspect there are other options.

Drew

Our customers have mobile apps available to download an install for their mobile phones which automates most of what you have outlined and allows them to manage all of our devices that they may have. Maybe try wifi-connect as mentioned by @drewmoseley as that seems on paper to take some of the leg-work out of the process, although I have no experience with it.

It sounds like creating my own mobile app that configures device wi-fi via Bluetooth Low Energy (BLE) interface is a reasonable solution. I was hoping for a “canned solution” of some sort.

My TP-LINK smart-plug uses a mobile app, to connect to the smart-plug AP, which user then configures the smart-plug for which home wi-fi to connect to.

A mobile app that configures device wi-fi via Bluetooth Low Energy (BLE) interface seems superior as the customer does not have to select the smart-plug AP like you must do on iOS. Android may not require the manual selection of the AP like iOS requires.

-Ed

1 Like

I didn’t go into to much detail as your requirement was headless. Our devices are not headless and customers activate AP mode by pressing a hard button on the device which presents a QR code on screen with AP SSID and one time random psk encoded in it. With our mobile apps they only need to scan the QR code to connect to the device which re-enforces the security that you must have physical access to the device to be able to connect to the device during setup.