- Development board: ESP32-DevKitC
- Router: A router that can connect to the external network, since all data must be exchanged through the Aliyun server.
- Mobile phone: If you want to use the
热点配网 (Hotspot Configuration)
, which means completing the configuration through the personal hotspot of your mobile phone, a SIM card for a 4G mobile network must be inserted on your mobile phone. The device will need to connect itself to the Aliyun server through the mobile phone's hotspot, and complete the registration, bonding and so on. - Aliyun App (beta): Download it here
The configuration of the Alink embed project can be modified at make menuconfig
:
-
Go to
IoT Solution settings -> IoT Components Management -> Platforms and Clouds -> ALINK ENABLE -> ALINK_SETTINGS
, select the version of Alink (embed or SDS), and configure the key parameters of the Alink SDK, such as the connection timeout, the priority level for key tasks, the size of the used stack, the log level and so on. -
Go to
IoT Example -> smart_device
, select theDevice type
, configure the device's parameters and the Alink parameters for this device.
To run the current demo, please use the default parameters.
-
Open
Alibaba Smart Living
and log in to your Taobao account. -
Click the
+
sign in the upper right corner, and select添加设备 (Add a Device)
. -
Click
分类查找 (Search by Category)
to see all the supported device categories, and find the category named照明 (Lighting)
. -
Click
照明 (Lighting)
to see all the supported devices, and selectESP-LIGHT-DEMO-V5
. The searching may take a while, because there are many test devices in the list. -
Press the
EN
switch when the development board is powered up; then, press theboot
button for 1 to 5 seconds, and view the print log. Check if theENTER SAMARTCONFIG MODE
message is displayed, which indicates that the device has entered the configuration mode.Note: Users can enter the configuration mode by pressing the
boot
button on the development board for 1 to 5 seconds at any time. If the development board has not received the SSID and the password in 60 seconds, then the一键配网 (Auto Configuration)
is considered a timeout. At this point, the device will switch to the热点配网 (Hotspot Configuration)
mode automatically. -
Select a router on your app and enter the password, then click
搜索设备 (Search Devices)
to start the configuration. -
After the device has joined the network successfully, a
等待激活 (Waiting for Activation)
screen is displayed. Press theboot
button on the development board and trigger the activation command to activate the device. -
After the device has been activated successfully, a
开始使用 (Begin to Use)
screen is displayed. Here, you can modify the device name and assign to this device the username you prefer. Then, click开启设备 (Open Device)
to display the控制设备 (Device Control)
screen, where the user can switch on/off and control the device.
-
When the
一键配网 (Auto Configuration)
is failed (Timeout),热点配网 (Hotspot Configuration)
can also be used to complete the configuration. -
In the
热点配网 (Hotspot Configuration)
mode, your phone will create a hotspot, which has "aha" as an SSID and "12345678" as a password. The device will continue searching for this hotspot, and establish a connection with the hotspot after finding it. -
At this moment, the app will prompt you to select the router that will be used subsequently, and enter the corresponding password. The app will send the router's SSID and password to the device through the mobile phone's hotspot.
-
After successfully receiving the SSID and password, the device disconnects from the hotspot of the mobile phone and tries to connect to the designated router. The subsequent process is consistent with the
一键配网 (Auto Configuration)
mode. That is, the device connects to the router first, then to the server, and finally triggers the activation command to complete the configuration.