Last Updated on : 2024-11-20 08:51:50download
This topic describes how to develop with the SDK for a laser-guided robot vacuum with the Ubuntu system.
Install Ubuntu and GCC compiler. The examples in this topic use Ubuntu 18.04 and GCC 7.5.0.
Get the SDK.
Edit the demo in the SDK. Open the tuya_iot_soc_dev_entry.c and update values of PRODUCT_KEY, UUID, and AUTHKEY with those you obtained from the Tuya Developer Platform.
Check the name of the network interface on Ubuntu using a command.
Open the tuya_iot_wifi_net.c and change the value of WLAN_DEV
to the name of the Ubuntu network interface.
Run the following command to build the code.
sh build_app.sh demos/demo_soc_dev_wifi demo 1.0.0
The following table lists the description of each parameter.
Parameter name | Desription |
---|---|
build_app.sh | The build script. |
demos/demo_soc_dev_wifi | The relative path to the application code. |
demo | The name of the generated executable file. |
1.0.0 | The firmware version number. |
After the build is finished, the following information will be output.
Run the build.
./output/demo_1.0.0/demo
If the program is run well and enters the access point (AP) mode, the output will look like this:
By default, the SDK for Ubuntu only supports pairing through the AP mode.
Now, you are good to pair your device by using the mobile app. The following figure shows the pairing process.
The app will be updated from time to time with new features and improvements, so the interface on the latest app prevails.
Tap the Smart button on the app. The output on the Linux terminal will display the data point (DP) command from the cloud.
I got a 6668 error. How to fix it?
Run sudo netstat -anp |grep 6668 and terminate the process that uses the 6668
port.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback