Fundamentals 12 min read

Master Embedded Wi‑Fi Provisioning: SmartConfig, SoftAP, Combo & SmartLink

This article explores various network provisioning methods for embedded devices—including SmartConfig, SoftAP, Combo, NFC, and acoustic techniques—covers essential Wi‑Fi concepts and terminology, and provides a hands‑on guide to implementing SmartLink on Linux with code examples and packet analysis.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Embedded Wi‑Fi Provisioning: SmartConfig, SoftAP, Combo & SmartLink

Provisioning Schemes Overview

Embedded devices often need to obtain Wi‑Fi credentials (network provisioning) before they can communicate with cloud services. The most common schemes are:

SmartConfig (SmartLink)

Device listens to wireless frames broadcast by a mobile phone, extracts SSID and password, and joins the target network.

Advantages: simple user interaction, works in complex Wi‑Fi environments.

Disadvantages: requires good radio reception; parsing may fail.

SoftAP

Device creates its own Wi‑Fi hotspot; the user connects with a phone or PC and manually enters the target network credentials.

Advantages: no external network needed, straightforward.

Disadvantages: each provisioning session forces the device into AP mode, and hotspot coverage is limited.

Combo (Wi‑Fi + Bluetooth)

Bluetooth is used to transfer SSID and password; Wi‑Fi provides high‑speed data after provisioning.

Advantages: low‑power, reliable short‑range transfer; higher success rate.

Disadvantages: higher hardware cost, increased software complexity.

Other Methods

NFC provisioning : tap an NFC‑enabled phone to the device to transfer credentials.

Acoustic provisioning : encode credentials into sound waves that the device receives via a microphone.

Wi‑Fi Fundamentals

Wi‑Fi is based on the IEEE 802.11 family (a/b/g/n/ac/ax). Different amendments operate on 2.4 GHz or 5 GHz bands and provide various data rates (e.g., 802.11a – 5 GHz, up to 54 Mbps; 802.11b – 2.4 GHz, up to 11 Mbps).

Key terminology:

LAN – Local Area Network.

WAN – Wide Area Network.

Band – Frequency range (2.4 GHz or 5 GHz).

Channel – Specific frequency slice within a band.

Channel Width – Bandwidth of a channel (20 MHz, 40 MHz, 80 MHz, etc.).

AP (Access Point) – Device that bridges wireless clients to a wired network.

STA (Station) – Wireless client (phone, laptop, etc.).

SSID – Service Set Identifier, the network name.

BSSID – MAC address of the AP.

BSS – Basic Service Set (AP + associated stations).

MAC – Media Access Control address, hardware identifier.

SmartLink Practical Guide (Linux Implementation of SmartConfig)

https://github.com/jolin90/smartconfig

Build and Run

make CC=arm-linux-gnueabihf-gcc

Transfer the generated smartlink executable to the target board and run it with the network interface name, for example: ./smartlink wlan0 Re‑compile after source changes:

make clean
make

Network Card Modes

Broadcast mode – receives frames with destination MAC ff:ff:ff:ff:ff:ff.

Multicast mode – receives all multicast frames regardless of group membership.

Promiscuous mode – receives every frame passing the NIC.

Direct mode – receives only frames addressed to its own MAC.

Toggle promiscuous mode with ifconfig:

ifconfig wlan0          # view current mode
ifconfig wlan0 promisc  # enable promiscuous mode
ifconfig wlan0 -promisc # disable promiscuous mode

Multicast Packet Format

SmartLink uses 6‑byte multicast packets to convey the SSID and password.

Bytes 1‑3: fixed multicast address 0x01 0x00 0x5e.

Byte 4: packet sequence number.

Bytes 5‑6: payload data (part of the credential string).

Example for SSID TP‑LINK_hys and password 12345678 (hex representation):

0x01 0x00 0x5e 0x00 0x48 0x35
0x01 0x00 0x5e 0x01 0x68 0x2b
... (subsequent packets carry the remaining characters)

The first three packets encode the multicast MAC derived from the IP address (last 23 bits). Packet 4 carries the length of SSID and password; packets 5‑15 carry the actual characters; packet 16 contains a CRC checksum calculated as:

Crc = Crc ^ 0x01 ^ 0x5e ^ 0x40

Usage Example

On a PC, compile the provided mcast_app (simulates the mobile app) and run it with the target SSID and password: ./mcast_app Tenda_552F18 0987654321 Then start smartlink on the device: ./smartlink wlan0 The device prints the received SSID and password when the transmission succeeds.

Reference Materials

https://blog.csdn.net/wjz110201/article/details/114628203
Multicast MAC mapping diagram
Multicast MAC mapping diagram
SmartConfigEmbedded LinuxComboIoT networkingSmartLinkSoftAPWiFi provisioning
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.