Page 1 of 1

T2-U开发板快速入门

Posted: 2023年 Jun 14日 16:38
by chenyisong

涂鸦 T2-U 开发板 是一款专为开发者打造的智能硬件产品原型开发板。它可与其他功能电路模组或电路板配合使用,实现各种智能硬件产品的开发。涂鸦 T2-U 开发板非常易于使用,您可以利用此开发板快速实现各种智能硬件 Demo。

Image

T2-U模组概述

涂鸦 T2-U 开发板主控采用涂鸦智能开发的一款嵌入式 Wi-Fi+蓝牙模组 T2-U。它由一个高集成度的无线射频模组 T2-U 和外围的按键、LED 指示灯、I/O 接口、电源和 USB 转串口芯片构成。

T2-U模组 内置运行速度最高可到 120 MHz 的 32-bit MCU,内置 2Mbyte 闪存和 256 KB RAM。

特性

  • 内置低功耗 32 位 CPU,可以兼作应用处理器
  • 主频支持 120MHz
  • 工作电压:3.0V-3.6V
  • 外设:
    • 6×PWM
    • 4xTimer
    • 2×UART
    • 1×SPI
    • 2xI2C
    • 1xADC
    • 19xGPIO
  • Wi-Fi 连通性
    • 802.11 b/g/n
    • 通道1-14@2.4GHz
    • 支持 WEP、WPA/WPA2、WPA/WPA2 PSK (AES) 和 WPA3 安全模式
    • 802.11b 模式下最大 +16dBm 的输出功率
    • 支持 STA/AP/STA+AP 工作模式
    • 支持 SmartConfig 和 AP 两种配网方式(包括 Android 和 iOS 设备)
    • 板载 PCB 天线,天线峰值增益 2.2dBi
    • 工作温度:-40℃ 到 105℃
  • 蓝牙连通性
    • 低功耗蓝牙 V5.2 完整标准
    • 蓝牙模式支持 6 dBm 发射功率
    • 完整的蓝牙共存接口
    • 板载 PCB 天线,天线峰值增益 2.2dBi

1、环境搭建

TuyaOS 联网单品目前只支持在 Linux 下编译,推荐使用 Ubuntu 20.04 版本进行开发。Windows 下可以使用虚拟机方式进行开发。

安装 Virtualbox 或者 VMWare 虚拟机,选用 Ubuntu 20.04 做为虚拟机系统,建议虚拟机内存(RAM)设置为 8G。

Virtualbox 虚拟机的详细安装教程可参考:https://www.tuyaos.com/viewtopic.php?t=394

Ubuntu 20.04 安装完成后,在开始编译之前,请安装 TuyaOS T2-U开发板编译需要的依赖。

在命令行下输入:

Code: Select all

$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get install -y build-essential unzip wget git python3 libc6-i386 

未安装libc6-i386会提示arm-none-eabi-gcc not found,安装libc6-i386后并先调用编译清除命令清除已生成的中间文件,再编译。

2、SDK下载

T2-U 开发板 SDK 可在 github 下载或 Tuya Wind-IDE 上下载。

  • github 下载

Code: Select all

$ git clone https://github.com/tuya/tuyaos-development-board-t2
  • Tuya Wind-IDE 下载

Tuya Wind IDE 以 Visual Studio Code 插件形式发布,支持中英双语,通过 涂鸦 IoT 开发平台 账号登录。Tuya Wind IDE 统一管理、分发及更新 TuyaOS EasyGo 相关开发资料,提供了不同主机、不同开发工具下一致的开发体验。

可参照https://developer.tuya.com/cn/docs/iot-device-dev/tuyaos-wind-ide?id=Kbfy6kfuuqqu3安装下载。

安装完成后,通过 涂鸦 IoT 开发平台 账号登录,并在 "主页" -> “新建开发框架” -> "TuyaOS OS开发" -> "联网单品开发" -> “Wi-Fi BLE双模设备开发包" -> "wireless SOC/beken/Wi-Fi/T2" 下载。

Image

Image

3、编译

T2-U 开发板出厂默认固件为 tuyaos_demo_quickstart , 位于 software/TuyaOS/apps 目录下。

3.1、 命令编译

示例工程位于apps目录下,你可以使用 tuyaos_demo_quickstart 工程快速完成编译、烧录、运行流程,在software/TuyaOS目录下使用以下命令编译:

Code: Select all

$ cd tuyaos-development-board-t2/software/TuyaOS
$ sh build_app.sh apps/tuyaos_demo_quickstart tuyaos_demo_quickstart 1.0.0

其中:

  • apps/tuyaos_demo_examples:编译工程路径

  • tuyaos_demo_examples:编译工程名称

  • 1.0.0:当前编译固件版本,可根据实际情况自行修改

3.2、 命令编译清除

如需清除编译中间文件,可使用以下命令:

Code: Select all

$ sh build_app.sh apps/tuyaos_demo_examples tuyaos_demo_examples 1.0.0 clean

3.3、 Wind-IDE 编译

Tuya Wind IDE 支持一键编译、clean 功能。

  • 选择待编译的项目(一般位于 software/TuyaOS/apps 目录下),如 tuyaos_demo_examples, 想该项目文件夹上点击右键,选择 Build Project

Image

然后在弹出的对话框中输入当前编译固件版本号,如 1.0.0

Image

编译清除可以选择 Clean Project

3.4、编译完成

编译成功后会显示如下信息:

Code: Select all

*************************************************************************
*************************************************************************
*************************************************************************
*********************tuyaos_demo_quickstart_1.0.0.bin********************
*************************************************************************
**********************COMPILE SUCCESS************************************
*************************************************************************

如发现编译错误,依次确认以下信息:

  1. tuyaos-development-board-t2/software/TuyaOS/vendor/t2 目录是否解压正常。如目录为空,请确认 Ubuntu 下是否正常安装 unzip ,可使用以下命令安装:

Code: Select all

$ sudo apt-get install -y unzip

安装完成后,可删除 vendor 目录,并重新执行编译命令。

  1. 请确认libc6-i386 是否已经安装,如未安装,可使用以下命令安装:

Code: Select all

$ sudo apt-get install -y libc6-i386 

  1. 确认 Python3.8 是否已经正常安装

Code: Select all

$ python3 --version
Python 3.8.10

如未正常显示,可使用以下下命令安装:

Code: Select all

$ sudo apt-get install -y python3

4、下载

编译后的bin文件位于 apps/tuyaos_demo_quickstart/output/1.0.0 目录下,对应文件名及作用:

固件名称使用场景烧录起始地址
tuyaos_demo_quickstart_QIO_1.0.0.bin生产固件,包括bootLoader及应用区固件,可用于新模组生产0x00000000
tuyaos_demo_quickstart_UA_1.0.0.bin应用区固件,不包含bootload0x00011000
tuyaos_demo_quickstart_UG_1.0.0.binOTA固件,可上传涂鸦云平台完成设备OTA功能不用于烧录

T2默认烧录QIO文件,烧录起始地址为 0x00000000

4.1、 GUI工具

  • 工具下载

使用 beken 原厂 Windows 版本烧录工具 bk_write_gui_v1.7.5 烧录 T2-U 。

下载地址1:https://images.tuyacn.com/rms-static/53e80a50-0a88-11ee-bee7-5de1c3a84f6c-1686729113461.zip?tyName=bk_writer_gui_V1.7.5.zip

下载地址2:https://raw.githubusercontent.com/tuya/tuyaos-development-board-t2/main/tools/bk_writer_gui_V1.7.5.zip

  • 确认烧录地址

烧录QIO文件(包括 BootLoader 和 UA 文件)时,需要把起始地址设置为:0X00000000 ,否则芯片无法正常启动。

Image

  • 选择正确的串口及波特率

    可以选择为 921600 或 1500000

Image

  • 下载

点击 Program 即可开始下载。

T2-U 开发板支持串口下载自动复位,可自动重启进入串口下载状态,或在开始下载后手工按 RST 按钮复位。

如下载超时,可更换串口号或降低波特率,再次尝试。

4.2、Wind IDE一键下载

Tuya Wind IDE 已支持 T2-U 一键下载。

  • 配置

Linux下操作串口需要 Root 权限,需先将串口操作权限加入到当前用户组

Code: Select all

$ sudo usermod -aG dialout $USER

操作完成后需要重启 Ubuntu。

  • 获取串口号

    在 Linux 命令行下,输入

    Code: Select all

      $ ls /dev/tty*
      /dev/tty    /dev/tty13  /dev/tty19  /dev/tty24  /dev/tty3   /dev/tty35  /dev/tty40  /dev/tty46  /dev/tty51  /dev/tty57  /dev/tty62    /dev/ttyACM1    /dev/ttyS12  /dev/ttyS18  /dev/ttyS23  /dev/ttyS29  /dev/ttyS6
      /dev/tty0   /dev/tty14  /dev/tty2   /dev/tty25  /dev/tty30  /dev/tty36  /dev/tty41  /dev/tty47  /dev/tty52  /dev/tty58  /dev/tty63    /dev/ttyprintk  /dev/ttyS13  /dev/ttyS19  /dev/ttyS24  /dev/ttyS3   /dev/ttyS7
      /dev/tty1   /dev/tty15  /dev/tty20  /dev/tty26  /dev/tty31  /dev/tty37  /dev/tty42  /dev/tty48  /dev/tty53  /dev/tty59  /dev/tty7     /dev/ttyS0      /dev/ttyS14  /dev/ttyS2   /dev/ttyS25  /dev/ttyS30  /dev/ttyS8
      /dev/tty10  /dev/tty16  /dev/tty21  /dev/tty27  /dev/tty32  /dev/tty38  /dev/tty43  /dev/tty49  /dev/tty54  /dev/tty6   /dev/tty8     /dev/ttyS1      /dev/ttyS15  /dev/ttyS20  /dev/ttyS26  /dev/ttyS31  /dev/ttyS9
      /dev/tty11  /dev/tty17  /dev/tty22  /dev/tty28  /dev/tty33  /dev/tty39  /dev/tty44  /dev/tty5   /dev/tty55  /dev/tty60  /dev/tty9     /dev/ttyS10     /dev/ttyS16  /dev/ttyS21  /dev/ttyS27  /dev/ttyS4
      /dev/tty12  /dev/tty18  /dev/tty23  /dev/tty29  /dev/tty34  /dev/tty4   /dev/tty45  /dev/tty50  /dev/tty56  /dev/tty61  /dev/ttyACM0  /dev/ttyS11     /dev/ttyS17  /dev/ttyS22  /dev/ttyS28  /dev/ttyS5

    其中 /dev/ttyACM0/dev/ttyACM1 就是 T2-U 开发板自带的 USB-TTL 芯片串口号 。 /dev/ttyACM0 用于串口烧录。


  • 一键下载

选择编译成功待下载的 QIO 文件,点击右键,选择 Flash App ,Wind-IDE会根据当前芯片型号下载对应的下载工具,并自动运行。

Image

在弹出的对话框中输入当前的 /dev/ttyACM0 , 输入回车后即开始串口下载。

Log显示如下:

Code: Select all

[INFO]: tyut_logger init done.
[INFO]: Run Tuya Uart Tool.
[INFO]: Use default baudrate: [921600]
[INFO]: Use default start address: [0x00]
Enter the available serial port: /dev/ttyACM0
[INFO]: Waiting Reset ...
[INFO]: link check success
[INFO]: sync baudrate 921600 success
Erasing: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 7 bytes/s   0:00:00 / 0:00:00
[INFO]: Erase flash success
Writing: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 20 bytes/s   0:00:19 / 0:00:00
[INFO]: Write flash success
CRCChecking: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0 bytes/s   0:00:04 / 0:00:00
[INFO]: CRC check success
[INFO]: Reboot done
[INFO]: Flash write done.

5、 运行

下载完成后,点击 RST 按钮即可运行。

串口运行日志输出在 /dev/ttyACM1COMx (非烧录口)。正常运行日志如下:

Code: Select all

bk_misc_init_start_type 0 0
enter driver_init !
[MEM DBG] heap init-------size:137584 addr:0x40e690---------
out driver_init !
[load]bandgap_calm=0x38->0x38,vddig=4->4
[bk]tx_txdesc_flush
tkl_ethernetif_init
tkl_ethernetif_init
tkl_ethernetif_output: invalid vif: 255!
tkl_ethernetif_output: invalid vif: 255!
[01-01 00:00:00 TUYA D][lr:0x9a64b] init fs. Path: null 
[01-01 00:00:00 TUYA D][lr:0xb0fc9] *****************kvs_init. 
[01-01 00:00:00 TUYA D][lr:0xbcdd5] protected init. addr:0x001ed000
[01-01 00:00:00 TUYA D][lr:0xbcc47] init protected data length 432
[01-01 00:00:00 TUYA N][lr:0xb344f] key_addr: 0x1ee000   block_sz 4096
[01-01 00:00:00 TUYA N][lr:0xb351d] get key:
0x3 0x55 0x98 0x39 0x77 0x3b 0x94 0x34 0x6d 0x3f 0x42 0xaf 0x11 0xa6 0x8f 0x7f 
[01-01 00:00:00 TUYA D][lr:0xbcdf1] protected verify begin
[01-01 00:00:00 TUYA D][lr:0xbce27] check [gw_bi][241]
[01-01 00:00:00 TUYA D][lr:0xbce27] check [gw_wsm][119]
[01-01 00:00:00 TUYA D][lr:0xbce63] protected verify end
[01-01 00:00:00 TUYA D][lr:0xb2649] begin try update kv version
[01-01 00:00:00 TUYA D][lr:0xb265f] pre kv version is 2
[01-01 00:00:00 TUYA D][lr:0xb3d17] 111 k=2  i=5 1
[01-01 00:00:00 TUYA N][lr:0x75535] uni_random_init...
[01-01 00:00:00 TUYA N][lr:0x6fc8d] tuya_tls_rand_init ok!
[01-01 00:00:00 TUYA I][lr:0xa28b1] mqc app init ...
[01-01 00:00:00 TUYA D][tal_thread.c:203] Thread:sys_timer Exec Start. Set to Running Stat
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:10240,priority:5
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:wq_system,stackDepth:5120,totalstackDepth:15360,priority:3
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:wq_highpri,stackDepth:4096,totalstackDepth:19456,priority:4
[01-01 00:00:00 TUYA D][lr:0xa27cf] mq_pro:5 cnt:1
[01-01 00:00:00 TUYA D][lr:0xa27cf] mq_pro:31 cnt:2
[01-01 00:00:00 TUYA D][tal_thread.c:203] Thread:wq_highpri Exec Start. Set to Running Stat
[01-01 00:00:00 TUYA D][lr:0x9edef] svc online log init success
[01-01 00:00:00 TUYA D][lr:0xa2071] read m:0 f:0 l:0
[01-01 00:00:00 TUYA D][tuya_app_main.c:396] device_init in
[01-01 00:00:00 TUYA E][tuya_app_main.c:355] mf_init APP_BIN_NAME[tuyaos_demo_quickstart] USER_SW_VER[1.0.0]
[01-01 00:00:00 TUYA N][lr:0x70cdb] have actived over 15 min, not enter mf_init
[01-01 00:00:00 TUYA N][lr:0x8a18f] wifi soc init. pid:uiiyltkjmkhwumga firmwarekey:NULL ver:1.0.0
[01-01 00:00:00 TUYA D][lr:0x8e6b7] tuya wifi link init mthd:0,wifi start mode:2
[01-01 00:00:00 TUYA D][lr:0xbcf8f] protected read [gw_wsm]
[01-01 00:00:00 TUYA D][lr:0xbd015] protected read ret:0 length:119
[01-01 00:00:00 TUYA D][lr:0x7cbc7] gw_wsm read ret:0
[01-01 00:00:00 TUYA N][lr:0x8e701] start wifi link params validate, nc_tp:2 md:0
[01-01 00:00:00 TUYA N][lr:0x8e755] gw_wsm.nc_tp:2
[01-01 00:00:00 TUYA N][lr:0x8e75d] gw_wsm.md:0
[01-01 00:00:00 TUYA D][lr:0xa5201] bt init...
[01-01 00:00:00 TUYA D][lr:0xbcf8f] protected read [gw_wsm]
[01-01 00:00:00 TUYA D][lr:0xbd015] protected read ret:0 length:119
[01-01 00:00:00 TUYA D][lr:0x7cbc7] gw_wsm read ret:0
[01-01 00:00:00 TUYA D][lr:0x91457] <__gw_upd_nc_type> bcustom_mode:0, old_wf_start_mode: 3
[01-01 00:00:00 TUYA D][lr:0x91475] <__gw_upd_nc_type> wf start mode change:0, 3->2
[01-01 00:00:00 TUYA N][lr:0xac18d] Last reset reason: 0
[01-01 00:00:00 TUYA D][lr:0xbcf8f] protected read [gw_bi]
[01-01 00:00:00 TUYA D][lr:0xbd015] protected read ret:0 length:241
[01-01 00:00:00 TUYA D][lr:0x7cd27] gw_bi read ret:0
[01-01 00:00:00 TUYA D][lr:0x6fddb] tls_ca_cnt:0 and parse:0
[01-01 00:00:00 TUYA D][lr:0xbcf8f] protected read [gw_wsm]
[01-01 00:00:00 TUYA D][lr:0xbd015] protected read ret:0 length:119
[01-01 00:00:00 TUYA D][lr:0x7cbc7] gw_wsm read ret:0
[01-01 00:00:00 TUYA N][lr:0xac21f] gw_cntl->gw_wsm.stat:0
[01-01 00:00:00 TUYA D][lr:0x7cfc1] gw_di read ret:0
[01-01 00:00:00 TUYA D][lr:0x7e829] stride from flash: 0.
[01-01 00:00:00 TUYA D][lr:0x7e841] no actived, no upgrade:0
[01-01 00:00:00 TUYA N][lr:0xac2c9] gw_cntl->gw_if.abi:0 input:0
[01-01 00:00:00 TUYA N][lr:0xac2d9] gw_cntl->gw_if.product_key:uiiyltkjmkhwumga, input:uiiyltkjmkhwumga
[01-01 00:00:00 TUYA N][lr:0xac2e3] gw_cntl->gw_if.tp:0, input:0
[01-01 00:00:00 TUYA D][lr:0x7c877] gw_ai read ret:0
[01-01 00:00:00 TUYA D][lr:0x9f731] set_dns_region:0
[01-01 00:00:00 TUYA D][lr:0x9f345] cache dns [http://a.tuyacn.com/d.json]<->[42.192.25.216]
[01-01 00:00:00 TUYA D][lr:0x9f345] cache dns [https://a3.tuyacn.com/d.json]<->[121.5.96.248]
[01-01 00:00:00 TUYA D][lr:0x9f345] cache dns [m2.tuyacn.com:1883]<->[42.192.31.85]
[01-01 00:00:00 TUYA D][lr:0x9f345] cache dns [m2.tuyacn.com:8886]<->[42.192.31.85]
[01-01 00:00:00 TUYA D][lr:0x9f345] cache dns [baal.tuyacn.com:443]<->[42.192.35.108]
[01-01 00:00:00 TUYA N][lr:0xac8bf] enter success_proc
[01-01 00:00:00 TUYA N][lr:0xac8d1] serial_no:1c90ff92eff6
[01-01 00:00:00 TUYA D][lr:0x7d439] timer ID:4354872
[01-01 00:00:00 TUYA D][lr:0xad6ed] init watchdog, interval: 60
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:0
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:1
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:2
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:3
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:4
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:5
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:6
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:7
[01-01 00:00:00 TUYA D][lr:0xad659] add new node,type:8
[01-01 00:00:00 TUYA D][lr:0xad79d] watch_dog_interval:60, monitor_detect_interval:600
[01-01 00:00:00 TUYA D][tal_thread.c:203] Thread:health_monitor Exec Start. Set to Running Stat
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:20992,priority:5
[01-01 00:00:00 TUYA D][lr:0x76e65] tuya svc upgrade init success!
[01-01 00:00:00 TUYA D][lr:0x89f2d] register wifi network monitor. interval:1
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:led_task,stackDepth:2048,totalstackDepth:23040,priority:0
[01-01 00:00:00 TUYA I][tal_thread.c:184] thread_create name:key_task,stackDepth:2048,totalstackDepth:25088,priority:0
[01-01 00:00:00 TUYA D][tal_thread.c:244] Del Thrd:tuya_app_main
[01-01 00:00:00 TUYA D][lr:0xacb07] state change from 0 to 1
[01-01 00:00:00 TUYA D][lr:0x91457] <__gw_upd_nc_type> bcustom_mode:0, old_wf_start_mode: 3
[01-01 00:00:00 TUYA D][lr:0x91475] <__gw_upd_nc_type> wf start mode change:0, 3->2
rw_ieee80211_set_country code:
code: CN
channel: 1 - 13
mode: MANUAL
bk_wlan cca closed
[01-01 00:00:00 TUYA D][tal_thread.c:219] Thread:tuya_app_main Exec Finish. Set to Del Stat
[01-01 00:00:00 TUYA D][tal_thread.c:95] del list not empty...deleting 0x42fd20, next 0x42fd88
[01-01 00:00:00 TUYA D][tal_thread.c:103] Final Free Thread:tuya_app_main, is_self:1
[01-01 00:00:00 TUYA D][tal_thread.c:107] delay to delete thread self
[01-01 00:00:00 TUYA D][tal_thread.c:118] finally delete thread self
[01-01 00:00:00 TUYA D][tal_thread.c:73] real delete thread:0x0x42ec84
[01-01 00:00:00 TUYA D][lr:0x91331] reset init mthd:0, short timer:0 long timer:0
[01-01 00:00:00 TUYA D][lr:0x918fb] nc_tp:2, md:0
[01-01 00:00:00 TUYA D][lr:0x8b2d7] type:0x10002,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10100,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10002,is_set:1
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:wq_system Exec Start. Set to Running Stat
[FUNC]intc_init
[FUNC]calibration_main
gpio_level=1,txpwr_state=15
get rfcali_mode:1
calibration_main over
uncali adc value:[00 00 00]
temp in flash is:307
xtal in flash is:23
[FUNC]func_init_extended OVER
Version:
app_init finished
ap net info ip: 192.168.176.1, mask: 255.255.255.0, gw: 192.168.176.1
ssid:SmartLife-EFF6, key:, channel: 6
[saap]MM_RESET_REQ
[bk]tx_txdesc_flush
[saap]ME_CONFIG_REQ
[saap]ME_CHAN_CONFIG_REQ
[saap]MM_START_REQ
[csa]csa_in_progress[0:0]-clear
hapd_intf_add_vif,type:3, s:0, id:0
apm start with vif:0
me_set_ps_disable:869 0 0 1 0 0
------beacon_int_set:100 TU
set_active param 0
[msg]APM_STOP_CFM
update_ongoing_1_bcn_update
vif_idx:0, ch_idx:0, bcmc_idx:1
update_ongoing_1_bcn_update
netif_is_added: 0x3f6170
netif_is_added: 0x3f6128
net_wlan_add_netif already exist!, vif_idx:0
mac 1c:90:ff:92:ef:f7
net_wlan_add_netif done!, vif_idx:0
uap_ip_start

configuring uap(with IP)def netif is sta
[01-01 00:00:01 TUYA D][lr:0x8b245] start ap success:SmartLife-EFF6
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10002,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10100,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10002,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8b2d7] type:0x10100,is_set:0
[01-01 00:00:01 TUYA D][lr:0x8f1c5] cur stat:2  0x6f0a5 -->>
[01-01 00:00:01 TUYA D][lr:0x8f1d5] wifi netstat changed to:2  -->>
[01-01 00:00:01 TUYA D][lr:0x8f1e5] report wifi netstat[2] to callback  -->>
[01-01 00:00:01 TUYA D][tuya_app_main.c:198] network status:2
[01-01 00:00:01 TUYA D][lr:0x8b439] netcfg module start type:0x10100
[01-01 00:00:01 TUYA D][lr:0x911f7] timer stated, short timer:0x0, long timer:0x0
[01-01 00:00:01 TUYA D][lr:0x91ae3] nc_tp:2, md:0
[01-01 00:00:01 TUYA I][tal_thread.c:184] thread_create name:lpc_task,stackDepth:4096,totalstackDepth:29184,priority:3
[01-01 00:00:01 TUYA N][lr:0xa5007] bt startup attr:ff
[01-01 00:00:01 TUYA D][lr:0xa5017] bt link open
[01-01 00:00:01 TUYA N][lr:0x72155] upd product_id type:0 uiiyltkjmkhwumga
[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] uuid: 20
75 75 69 64 37 61 63 34 32 39 32 61 33 31 32 30 33 62 62 66 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] devid_tmp: 16
79 e4 8d 1c a3 04 08 90 8a 0c 10 80 0c b2 cf ff 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] devid_tmp2: 20
75 75 69 64 37 61 63 34 32 39 32 61 33 31 32 30 33 62 62 66 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] dev id key: 16
73 3f 21 c6 4e 9f 2e c8 a0 7c 99 24 d9 82 27 95 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] adv_data 28
02 01 06 03 02 01 a2 14 16 01 a2 00 a9 b1 79 34 03 72 e2 8b 8e bb d1 f1 0c 0e fd 15 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] rsp_data 30
03 09 54 59 19 ff d0 07 89 03 03 00 0c 00 68 40 91 2e 73 63 37 a6 c8 79 ec 06 98 00 c1 e3 

ble mac:1c-90-ff-92-ef-f7
llm_init:312
[01-01 00:00:01 TUYA D][lr:0xb7b7b] DYNA INIT 280,264,8,16
[01-01 00:00:01 TUYA D][lr:0xb7b7b] DYNA INIT 292,276,8,16

tkl_hci_callback_register
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:host_main_threa Exec Start. Set to Running Stat
[01-01 00:00:01 TUYA I][tal_thread.c:184] thread_create name:host_main_thread_hdl,stackDepth:5120,totalstackDepth:34304,priority:9
[01-01 00:00:01 TUYA D][lr:0xba0f1] ble host stage 2 start

llm_init:312
[01-01 00:00:01 TUYA D][lr:0xc0d49] BLE HCI Version = 10
[01-01 00:00:01 TUYA I][lr:0xc0def] le acl buf sz = 251,max buf = 9 

[01-01 00:00:01 TUYA I][lr:0xc08fd] acl buf sz = 251, max pkt = 9, avail pkt = 9

[01-01 00:00:01 TUYA I][lr:0xb89b1] GAP init: stop adv
[01-01 00:00:01 TUYA I][lr:0xb9d9d] ble_hs_timer reset:100 
[01-01 00:00:01 TUYA I][lr:0xb0285] Stack sync
[01-01 00:00:01 TUYA I][lr:0xb05f3] Init/Deinit Event
[01-01 00:00:01 TUYA N][lr:0x72a07] ble sdk re_inited
[01-01 00:00:01 TUYA N][lr:0x722db] ty bt sdk init success finish
[01-01 00:00:01 TUYA N][lr:0x7289d] cur bound stat:1, update bound stat:0
[01-01 00:00:01 TUYA D][lr:0x754e9] bt active init
[01-01 00:00:01 TUYA N][lr:0xb8ed7] Start Adv
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:lpc_task Exec Start. Set to Running Stat
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:led_task Exec Start. Set to Running Stat
[01-01 00:00:01 TUYA D][lr:0x72e3f] start ble monitor
[01-01 00:00:01 TUYA N][lr:0xacb97] __devos_init_evt success
[01-01 00:00:01 TUYA D][lr:0x8b29f] start 0x10100 ret:0
[01-01 00:00:01 TUYA D][lr:0x8b439] netcfg module start type:0x10002
[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] dev id key: 16
5d 11 f6 f3 43 e9 c9 a2 b9 e8 fb 08 76 aa 73 a6 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] adv_data 28
02 01 06 03 02 01 a2 14 16 01 a2 00 75 69 69 79 6c 74 6b 6a 6d 6b 68 77 75 6d 67 61 

[01-01 00:00:01 TUYA N][tuya_ble_api.c:77] rsp_data 30
[01-01 00:00:01 TUYA I][lr:0xb9e99] ble_hs_timer_exp:
03 09 54 59 19 ff d0 07 09 03 03 00 0c 00 30 f2 32 29 de 28 6d d3 b6 3b 81 27 ca fd 63 9f 

[01-01 00:00:01 TUYA I][lr:0xb89b1] GAP init: stop adv
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:key_task Exec Start. Set to Running Stat
[01-01 00:00:01 TUYA I][lr:0xb9d9d] ble_hs_timer reset:0 
[01-01 00:00:01 TUYA N][lr:0xb8ed7] Start Adv
[01-01 00:00:01 TUYA N][lr:0x72795] ble adv && resp changed
[01-01 00:00:01 TUYA D][lr:0x8aecd] ap cfg start:65538
[01-01 00:00:01 TUYA D][lr:0x8adcf] ap netcfg server ip:192.168.176.1
[01-01 00:00:01 TUYA D][tal_thread.c:203] Thread:TCP_ap_v4 Exec Start. Set to Running Stat
[01-01 00:00:01 TUYA D][lr:0x8a927] start TCP ap thread
[01-01 00:00:01 TUYA D][lr:0x8aa4d] Waiting for a remote connection
[01-01 00:00:01 TUYA I][tal_thread.c:184] thread_create name:TCP_ap_v4,stackDepth:3584,totalstackDepth:37888,priority:5
[01-01 00:00:01 TUYA D][lr:0x8b29f] start 0x10002 ret:0
[01-01 00:00:01 TUYA I][lr:0xb9e99] ble_hs_timer_exp:
temperature_type=2
temp_code:34 - adc_code:288 - adc_trend:[13]:307->[15]:287
[01-01 00:00:04 TUYA D][lr:0x74885] open binding periond window!!
[01-01 00:00:11 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:00:15 TUYA D][lr:0xad50d] feed watchdog
[01-01 00:00:21 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:00:30 TUYA D][lr:0x7d295] set time by rtc
[01-01 00:00:31 TUYA D][lr:0x748e9] close binding periond window!!
[01-01 00:00:31 TUYA D][lr:0x8aa9b] lan listen select timeout
temp_code:38 - adc_code:280 - adc_trend:[15]:287->[16]:277
[01-01 00:00:35 TUYA D][lr:0xad50d] feed watchdog
[01-01 00:00:41 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:00:51 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:00:55 TUYA D][lr:0xad50d] feed watchdog
[01-01 00:01:00 TUYA D][lr:0x7d295] set time by rtc
[01-01 00:01:01 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:01:11 TUYA D][lr:0x8aa9b] lan listen select timeout
[01-01 00:01:15 TUYA D][lr:0xad50d] feed watchdog
[01-01 00:01:21 TUYA D][lr:0x8aa9b] lan listen select timeout