Hi ,
I ran the latest code (2026.3.23) compiled for the ESP32S3 core board and executed the switch_demo. After following the official instructions and entering the authentication and pressing the button three times, I entered the network configuration mode. However, when the phone started to configure the network, it kept showing an abnormal ble data packet size error, and eventually the pairing failed. I tried replacing the Xiaomi phone, Huawei phone, and Apple phone, but the phenomenon was the same - it seemed to be an abnormal ble communication issue.
The operation log is as follows:
I (27) boot: ESP-IDF v5.4-dirty 2nd stage bootloader
I (27) boot: compile time Mar 24 2026 10:31:38
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (30) boot: efuse block revision: v1.3
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode : DIO
I (41) boot.esp32s3: SPI Flash Size : 16MB
I (45) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (52) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (65) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (72) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (78) boot: 3 ota_0 OTA app 00 10 00010000 00180000
I (85) boot: 4 ota_1 OTA app 00 11 00190000 00180000
I (91) boot: 5 tuya Unknown data 01 aa 003b0000 00028000
I (98) boot: 6 factory_nvs WiFi data 01 02 003e0000 00004000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=00010020 vaddr=3c0d0020 size=2b798h (178072) map
I (146) esp_image: segment 1: paddr=0003b7c0 vaddr=3fc9da00 size=04858h ( 18520) load
I (151) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=ca940h (829760) map
I (297) esp_image: segment 3: paddr=0010a968 vaddr=3fca2258 size=00d1ch ( 3356) load
I (298) esp_image: segment 4: paddr=0010b68c vaddr=40374000 size=19990h (104848) load
I (324) esp_image: segment 5: paddr=00125024 vaddr=600fe100 size=0001ch ( 28) load
I (334) boot: Loaded app from partition at offset 0x10000
I (334) boot: Disabling RNG early entropy source...
I (344) octal_psram: vendor id : 0x0d (AP)
I (344) octal_psram: dev id : 0x02 (generation 3)
I (344) octal_psram: density : 0x03 (64 Mbit)
I (346) octal_psram: good-die : 0x01 (Pass)
I (351) octal_psram: Latency : 0x01 (Fixed)
I (355) octal_psram: VCC : 0x01 (3V)
I (359) octal_psram: SRF : 0x01 (Fast Refresh)
I (364) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (369) octal_psram: BurstLen : 0x01 (32 Byte)
I (373) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (379) octal_psram: DriveStrength: 0x00 (1/1)
I (383) MSPI Timing: PSRAM timing tuning index: 5
I (387) esp_psram: Found 8MB PSRAM device
I (391) esp_psram: Speed: 80MHz
I (394) cpu_start: Multicore app
I (409) cpu_start: Pro cpu start user code
I (409) cpu_start: cpu freq: 160000000 Hz
I (409) app_init: Application information:
I (409) app_init: Project name: tuya_open_sdk
I (413) app_init: App version: v1.1.0-100-gf5ce809
I (418) app_init: Compile time: Mar 24 2026 10:31:22
I (423) app_init: ELF file SHA256: 6ece57b31...
I (427) app_init: ESP-IDF: v5.4-dirty
I (432) efuse_init: Min chip rev: v0.0
I (435) efuse_init: Max chip rev: v0.99
I (439) efuse_init: Chip rev: v0.2
I (443) heap_init: Initializing. RAM available for dynamic allocation:
I (450) heap_init: At 3FCA53C8 len 00044348 (272 KiB): RAM
I (455) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (460) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (465) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (471) esp_psram: Adding pool of 8178K of PSRAM memory to heap allocator
I (477) spi_flash: detected chip: boya
I (480) spi_flash: flash io: dio
I (484) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (490) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (496) coexist: coex firmware version: 49a8cdc
I (500) coexist: coexist rom version e7ae62f
I (505) main_task: Started on CPU0
I (515) esp_psram: Reserving pool of 48K of internal memory for DMA/internal allocations
I (515) main_task: Calling app_main()
[01-01 00:00:00 ty N][tuya_main.c:235] Application information:
[01-01 00:00:00 ty N][tuya_main.c:236] Project name: switch_demo
[01-01 00:00:00 ty N][tuya_main.c:237] App version: 1.0.0
[01-01 00:00:00 ty N][tuya_main.c:238] Compile time: Mar 24 2026
[01-01 00:00:00 ty N][tuya_main.c:239] TuyaOpen version: v1.6.0
[01-01 00:00:00 ty N][tuya_main.c:240] TuyaOpen commit-id: 04af938
[01-01 00:00:00 ty N][tuya_main.c:241] Platform chip: esp32s3
[01-01 00:00:00 ty N][tuya_main.c:242] Platform board: ESP32-S3
[01-01 00:00:00 ty N][tuya_main.c:243] Platform commit-id: f5ce809e89f5f8ba61758e2675fd31fa6d474737
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:sys_timer Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:tuya_app_main,stackDepth:4096,totalstackDepth:8192,priority:4
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:wq_system,stackDepth:6144,totalstackDepth:14336,priority:3
[01-01n0t:00:0R ty D][ ar_threp_.a:n45] Thread:wq_system Exec Start. Set to Running Stat
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:wq_highpri Exec Start. Set to Running Stat
I (685) uart: queue free spaces: 10
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:cli Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:cli,stackDepth:3072,totalstackDepth:22528,priority:2
[01-01 00:00:00 ty D][reset_netcfg.c:50] reset count is 3
[01-01 00:00:00 ty D][reset_netcfg.c:62] reset count write 4
[01-01 00:00:00 ty D][tal_kv.c:202] key:rst_cnt, len 1
/_ / ____ _____ _ / __ __ ___ ___
/ / / // / // / _ `/ / // / _ / -) _
// _,/_, /_,/ _/ ./_////
/_/ /[01-01
00:00:00 ty
D][reset_ne
tcfg.c:105]
start reset* cnt clear t*imer!!!!!
[01-01 00:00:00 ty I][tuya_authorize.c:121] Authorization read succeeds.
[01-01 00:00:00 ty I][tuya_iot.c:560] tuya_iot_init
[01-01 00:00:00 ty N][tuya_tls.c:436] tuya_tls_init ok!
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: rcs.active
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: rcs.mf
[01-01 00:00:00 ty D][tuya_register_center.c:357] use default rcs [-2]
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: region
[01-01 00:00:00 ty E][tuya_endpoint.c:74] tal_kv_get region fail:0xfffffffe
[01-01 00:00:00 ty I][tuya_endpoint.c:272] endpoint_mgr.region:
[01-01 00:00:00 ty I][tuya_endpoint.c:273] endpoint_mgr.regist_key:
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: uuid2f0d5d4d9c06c70e
[01-01 00:00:00 ty W][tuya_iot.c:152] activate config not found:-2
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:0
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:1
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:2
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:3
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:4
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:5
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:6
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:7
[01-01 00:00:00 ty D][tuya_health.c:62] init watchdog, interval: 60
E (925) task_wdt: esp_task_wdt_init(515): TWDT already initialized
[01-01 00:00:00 ty D][tuya_health.c:204] update type:7,period:1431655
[01-01 00:00:00 ty D][tuya_health.c:495] watch_dog_interval:60, monitor_detect_interval:600
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:health_monitor Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:health_monitor,stackDepth:2048,totalstackDepth:24576,priority:5
[01-01 00:00:00 ty D][netmgr.c:253] netmgr [wifi] register start
[01-01 00:00:00 ty D][netmgr.c:259] netmgr [wifi] is the first connection
I (985) pp: pp rom version: e7ae62f
I (985) net80211: net80211 rom version: e7ae62f
I (995) wifi:wifi driver task: 3fcc2750, prio:23, stack:6656, core=0
tuya> I (1015) wifi:wifi firmware version: 48ea317a7
I (1015) wifi:wifi certification version: v7.0
I (1015) wifi:config NVS flash: enabled
I (1015) wifi:config nano formatting: disabled
I (1015) wifi:Init data frame dynamic rx buffer num: 32
I (1025) wifi:Init static rx mgmt buffer num: 5
I (1025) wifi:Init management short buffer num: 32
I (1025) wifi:Init static tx buffer num: 16
I (1035) wifi:Init tx cache buffer num: 32
I (1035) wifi:Init static tx FG buffer num: 2
I (1045) wifi:Init static rx buffer size: 1600
I (1045) wifi:Init static rx buffer num: 10
I (1045) wifi:Init dynamic rx buffer num: 32
I (1055) wifi_init: rx ba win: 6
I (1055) wifi_init: accept mbox: 6
I (1055) wifi_init: tcpip mbox: 32
I (1065) wifi_init: udp mbox: 6
I (1065) wifi_init: tcp mbox: 6
I (1065) wifi_init: tcp tx win: 5760
I (1065) wifi_init: tcp rx win: 5760
I (1075) wifi_init: tcp mss: 1440
I (1075) wifi_init: WiFi/LWIP prefer SPIRAM
I (1075) wifi_init: WiFi IRAM OP enabled
I (1085) wifi_init: WiFi RX IRAM OP enabled
I (1105) wifi:(2.4G)set country: cc=CN schan=1 nchan=13 policy=1
I (1105) BLE_INIT: BT controller compile version [d752dea]
I (1105) BLE_INIT: Bluetooth MAC: ac:a7:04:ef:e1:b2
I (1115) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
[01-01 00:00:00 ty D][tuya_ble_mbuf.c:248] DYNA INIT 280,264,8,16
[01-01 00:00:00 ty D][tuya_ble_mbuf.c:248] DYNA INIT 292,276,8,16
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:host_main_threa Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:host_main_thread_hdl,stackDepth:4096,totalstackDepth:28672,priority:9
[01-01 00:00:00 ty D][ble_hs.c:551] ble host stage 2 start
[01-01 00:00:00 ty D][ble_hs_startup.c:316] BLE HCI Version = 9
[01-01 00:00:00 ty I][ble_hs_startup.c:145] le acl buf sz = 251,max buf = 12
[01-01 00:00:00 ty I][ble_hs_hci.c:114] acl buf sz = 251, max pkt = 12, avail pkt = 12
[01-01 00:00:00 ty I][ble_hs.c:433] ble_hs_timer reset:100
[01-01 00:00:00 ty I][tkl_bluetooth.c:465] Stack sync
[01-01 00:00:00 ty I][tkl_bluetooth.c:452] Init/Deinit Event
[01-01 00:00:00 ty N][ble_mgr.c:1128] tuya ble init success finish
[01-01 00:00:00 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:00 ty D][netmgr.c:383] netmgr conn wifi set 6
[01-01 00:00:00 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:00 ty D][tuya_main.c:299] tuya_iot_init success
[01-01 00:00:00 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:00 ty D][reset_netcfg.c:50] reset count is 4
[01-01 00:00:00 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:00 ty D][reset_netcfg.c:91] Reset ctrl data!
[01-01 00:00:00 ty D][tuya_main.c:108] Tuya Event ID:0(TUYA_EVENT_RESET)
[01-01 00:00:00 ty I][tuya_main.c:109] Device Free heap 178127
[01-01 00:00:00 ty I][tuya_main.c:140] Device Reset:0
[01-01 00:00:00 ty W][tuya_iot.c:523] CLIENT RESET...
[01-01 00:00:00 ty D][tal_kv.c:202] key:uuid2f0d5d4d9c06c70e.devid, len 0
[01-01 00:00:00 ty D][netconn_wifi.c:305] __wifi_reset_event_cb
[01-01 00:00:00 ty E][tal_event.c:173] ret:-1
[01-01 00:00:00 ty D][reset_netcfg.c:62] reset count write 0
[01-01 00:00:00 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:00 ty D][tal_kv.c:202] key:rst_cnt, len 1
[01-01 00:00:00 ty D][reset_netcfg.c:75] reset cnt clear by reset event!
[01-01 00:00:00 ty W][tuya_iot.c:1096] Activated data remove...
[01-01 00:00:00 ty W][tuya_iot.c:516] CLIENT RESTART!
[01-01 00:00:00 ty D][tuya_iot.c:869] STATE_START
[01-01 00:00:00 ty I][tuya_iot.c:889] Activation data read fail, go activation mode...
[01-01 00:00:00 ty D][tuya_main.c:108] Tuya Event ID:1(TUYA_EVENT_BIND_START)
[01-01 00:00:00 ty I][tuya_main.c:109] Device Free heap 178039
[01-01 00:00:00 ty I][tuya_main.c:112] Device Bind Start!
[01-01 00:00:00 ty D][netcfg.c:279] netcfg module start type:0x1
[01-01 00:00:00 ty D][netcfg.c:279] netcfg module start type:0x2
[01-01 00:00:00 ty D][ap_netcfg.c:856] ap cfg start:1
I (1475) wifi:mode : softAP (ac:a7:04:ef:e1:b1)
I (1475) wifi:Total power save buffer number: 8
I (1475) wifi:Init max length of beacon: 752/752
I (1485) wifi:Init max length of beacon: 752/752
[01-01 00:I (10 t) D][_p_nifcfwic:8D4] tarv apstuctessonmartLifa-E1WIA
_DEi32 I9m 11-01 00100:10 ty D][ap_netcfg.c:879] ap netcfg server ip:192.168.176.1
[01-01 00:00:01 ty N][ap_netcfg.c:886] tuya ap using tls + psk
[01-01 00:00:01 ty I][tal_thread.c:226] thread_create name:ap_cfg_task,stackDepth:4096,totalstackDepth:32768,priority:3
[01-01 00:00:01 ty D][tal_thread.c:245] Thread:ap_cfg_task Exec Start. Set to Running Stat
[01-01 00:00:01 ty D][netcfg.c:52] start 0x1 ret:0
[01-01 00:00:01 ty D][ap_netcfg.c:687] start TCP ap thread
[01-01 00:00:01 ty D][ble_netcfg.c:135] bt netcfg start
[01-01 00:00:01 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:01 ty D][ap_netcfg.c:317] ap try bind port:6668
[01-01 00:00:01 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:01 ty D][ap_netcfg.c:703] Waiting for a remote connection
[01-01 00:00:01 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:01 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:01 ty D][netcfg.c:52] start 0x2 ret:0
[01-01 00:00:01 ty I][ble_hs.c:393] ble_hs_timer_exp:
tuya>
tuya>
tuya> [01-01 00:00:05 ty D][reset_netcfg.c:62] reset count write 0
[01-01 00:00:05 ty D][tal_kv.c:202] key:rst_cnt, len 1
[01-01 00:00:05 ty D][reset_netcfg.c:69] reset cnt clear!
[01-01 00:00:17 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:17 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:00:17 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:00:17 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:00:17 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:17 ty D][ble_l2cap.c:385] rx on unknown L2CAP channel: 6
[01-01 00:00:17 ty E][ble_l2cap.c:438] DATA ERR RECV
[01-01 00:00:17 ty E][ble_hs_hci_evt.c:873] ACL PROCESS ERR:5
[01-01 00:00:17 ty E][ble_hs.c:217] ACL PROCESS ERR
[01-01 00:00:19 ty D][ble_hs_hci_evt.c:152] evt code null:12
tuya>
tuya>
tuya> [01-01 00:00:33 ty I][tkl_bluetooth.c:204] receive notify ok
[01-01 00:00:33 ty D][ble_l2cap.c:385] rx on unknown L2CAP channel: 6
[01-01 00:00:33 ty E][ble_l2cap.c:438] DATA ERR RECV
[01-01 00:00:33 ty E][ble_hs_hci_evt.c:873] ACL PROCESS ERR:5
[01-01 00:00:33 ty E][ble_hs.c:217] ACL PROCESS ERR
[01-01 00:00:33 ty I][tkl_bluetooth.c:204] receive notify ok
[01-01 00:00:35 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:00:35 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:35 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:35 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:35 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:35 ty N][ble_mgr.c:965] Ble Disonnected
[01-01 00:00:36 ty I][ble_hs.c:393] ble_hs_timer_exp:
tuya>
tuya>
tuya> [01-01 00:00:54 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:54 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:00:54 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:00:54 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:00:54 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:54 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:00:54 ty D][ble_att_svr.c:1936] debug rc = 0
[01-01 00:00:54 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x6,0x0,0x1f4
[01-01 00:00:54 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:00:55 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:00:55 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x18,0x0,0x1f4
[01-01 00:00:55 ty I][tkl_bluetooth.c:190] mtu update event; conn_handle=0x0001 mtu=256, channel id = 4
[01-01 00:00:55 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:00:55 ty E][ble_mgr.c:298] ble packet len err:54093
[01-01 00:00:55 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:00:57 ty D][ble_hs_hci_evt.c:152] evt code null:12
I (64325) wifi:new:<6,1>, old:<6,1>, ap:<6,1>, sta:<255,255>, prof:6, snd_ch_cfg:0x0
I (64325) wifi:station: 32:ec:39:1e:eb:05 join, AID=1, bgn, 40U
I (64515) wifi:idx:2 (ifx:1, 32:ec:39:1e:eb:05), tid:0, ssn:0, winSize:64
I (64635) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.176.2
[01-01 00:01:05 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:05 ty E][ble_mgr.c:298] ble packet len err:25471
[01-01 00:01:05 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:06 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:06 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:01:06 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:01:06 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:06 ty N][ble_gap.c:2509] Start Adv
[01-01 00:01:06 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:01:06 ty N][ble_mgr.c:965] Ble DisonnectI (67055) wifi:max connectioe,0a
th!
[01-01 00:01:06 ty I][ble_hs.c:393] ble_hs_timer_exp:
I (67185) wifi:max connection, deauth!
I (67345) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67645) wifi:max connection, deauth!
[01-01 00:01:14 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:14 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:01:14 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:01:14 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:01:14 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:01:14 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:01:14 ty D][ble_att_svr.c:1936] debug rc = 0
[01-01 00:01:14 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x6,0x0,0x1f4
[01-01 00:01:14 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:01:14 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:14 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x18,0x0,0x1f4
[01-01 00:01:15 ty I][tkl_bluetooth.c:190] mtu update event; conn_handle=0x0001 mtu=256, channel id = 4
[01-01 00:01:15 ty D][ble_hs_hci_evt.c:152] evt code null:12
[01-01 00:01:15 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:15 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:15 ty E][ble_mgr.c:298] ble packet len err:6053
[01-01 00:01:15 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:15 ty I][ble_hs.c:393] ble_hs_timer_exp:
I (77275) wifi:station: 32:ec:39:1e:eb:05 leave, AID = 1, reason = 3, bss_flags is 33786979, bss:0x3c11bf84
I (77275) wifi:new:<6,0>, old:<6,1>, ap:<6,1>, sta:<255,255>, prof:6, snd_ch_cfg:0x0
I (77285) wifi:idx:2, tid:0
[01-01 00:01:25 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:25 ty E][ble_mgr.c:298] ble packet len err:27071
[01-01 00:01:25 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:26 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:26 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:01:26 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:01:26 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:26 ty N][ble_gap.c:2509] Start Adv
[01-01 00:01:26 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:01:26 ty N][ble_mgr.c:965] Ble Disonnected
[01-01 00:01:26 ty I][ble_hs.c:393] ble_hs_timer_exp:
我在ESP32S3的核心板上运行当前最新代码(2026.3.23)编译出来的switch_demo,并按照官方指引导入auth和按键3次之后,进入配网模式,但是手机开始配网后,一直提示ble数据包大小异常,最终配对失败。尝试更换了小米手机、华为手机、苹果手机,都是一样的现象,似乎是ble通信异常。
运行日志如下:
Hi ,
I ran the latest code (2026.3.23) compiled for the ESP32S3 core board and executed the switch_demo. After following the official instructions and entering the authentication and pressing the button three times, I entered the network configuration mode. However, when the phone started to configure the network, it kept showing an abnormal ble data packet size error, and eventually the pairing failed. I tried replacing the Xiaomi phone, Huawei phone, and Apple phone, but the phenomenon was the same - it seemed to be an abnormal ble communication issue.
The operation log is as follows:
I (27) boot: ESP-IDF v5.4-dirty 2nd stage bootloader
I (27) boot: compile time Mar 24 2026 10:31:38
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (30) boot: efuse block revision: v1.3
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode : DIO
I (41) boot.esp32s3: SPI Flash Size : 16MB
I (45) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (52) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (65) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (72) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (78) boot: 3 ota_0 OTA app 00 10 00010000 00180000
I (85) boot: 4 ota_1 OTA app 00 11 00190000 00180000
I (91) boot: 5 tuya Unknown data 01 aa 003b0000 00028000
I (98) boot: 6 factory_nvs WiFi data 01 02 003e0000 00004000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=00010020 vaddr=3c0d0020 size=2b798h (178072) map
I (146) esp_image: segment 1: paddr=0003b7c0 vaddr=3fc9da00 size=04858h ( 18520) load
I (151) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=ca940h (829760) map
I (297) esp_image: segment 3: paddr=0010a968 vaddr=3fca2258 size=00d1ch ( 3356) load
I (298) esp_image: segment 4: paddr=0010b68c vaddr=40374000 size=19990h (104848) load
I (324) esp_image: segment 5: paddr=00125024 vaddr=600fe100 size=0001ch ( 28) load
I (334) boot: Loaded app from partition at offset 0x10000
I (334) boot: Disabling RNG early entropy source...
I (344) octal_psram: vendor id : 0x0d (AP)
I (344) octal_psram: dev id : 0x02 (generation 3)
I (344) octal_psram: density : 0x03 (64 Mbit)
I (346) octal_psram: good-die : 0x01 (Pass)
I (351) octal_psram: Latency : 0x01 (Fixed)
I (355) octal_psram: VCC : 0x01 (3V)
I (359) octal_psram: SRF : 0x01 (Fast Refresh)
I (364) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (369) octal_psram: BurstLen : 0x01 (32 Byte)
I (373) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (379) octal_psram: DriveStrength: 0x00 (1/1)
I (383) MSPI Timing: PSRAM timing tuning index: 5
I (387) esp_psram: Found 8MB PSRAM device
I (391) esp_psram: Speed: 80MHz
I (394) cpu_start: Multicore app
I (409) cpu_start: Pro cpu start user code
I (409) cpu_start: cpu freq: 160000000 Hz
I (409) app_init: Application information:
I (409) app_init: Project name: tuya_open_sdk
I (413) app_init: App version: v1.1.0-100-gf5ce809
I (418) app_init: Compile time: Mar 24 2026 10:31:22
I (423) app_init: ELF file SHA256: 6ece57b31...
I (427) app_init: ESP-IDF: v5.4-dirty
I (432) efuse_init: Min chip rev: v0.0
I (435) efuse_init: Max chip rev: v0.99
I (439) efuse_init: Chip rev: v0.2
I (443) heap_init: Initializing. RAM available for dynamic allocation:
I (450) heap_init: At 3FCA53C8 len 00044348 (272 KiB): RAM
I (455) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (460) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (465) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (471) esp_psram: Adding pool of 8178K of PSRAM memory to heap allocator
I (477) spi_flash: detected chip: boya
I (480) spi_flash: flash io: dio
I (484) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (490) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (496) coexist: coex firmware version: 49a8cdc
I (500) coexist: coexist rom version e7ae62f
I (505) main_task: Started on CPU0
I (515) esp_psram: Reserving pool of 48K of internal memory for DMA/internal allocations
I (515) main_task: Calling app_main()
[01-01 00:00:00 ty N][tuya_main.c:235] Application information:
[01-01 00:00:00 ty N][tuya_main.c:236] Project name: switch_demo
[01-01 00:00:00 ty N][tuya_main.c:237] App version: 1.0.0
[01-01 00:00:00 ty N][tuya_main.c:238] Compile time: Mar 24 2026
[01-01 00:00:00 ty N][tuya_main.c:239] TuyaOpen version: v1.6.0
[01-01 00:00:00 ty N][tuya_main.c:240] TuyaOpen commit-id: 04af938
[01-01 00:00:00 ty N][tuya_main.c:241] Platform chip: esp32s3
[01-01 00:00:00 ty N][tuya_main.c:242] Platform board: ESP32-S3
[01-01 00:00:00 ty N][tuya_main.c:243] Platform commit-id: f5ce809e89f5f8ba61758e2675fd31fa6d474737
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:sys_timer Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:tuya_app_main,stackDepth:4096,totalstackDepth:8192,priority:4
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:wq_system,stackDepth:6144,totalstackDepth:14336,priority:3
[01-01n0t:00:0R ty D][ ar_threp_.a:n45] Thread:wq_system Exec Start. Set to Running Stat
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:wq_highpri Exec Start. Set to Running Stat
I (685) uart: queue free spaces: 10
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:cli Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:cli,stackDepth:3072,totalstackDepth:22528,priority:2
[01-01 00:00:00 ty D][reset_netcfg.c:50] reset count is 3
[01-01 00:00:00 ty D][reset_netcfg.c:62] reset count write 4
[01-01 00:00:00 ty D][tal_kv.c:202] key:rst_cnt, len 1
/_ / ____ _____ _ / __ __ ___ ___
/ / / // / // / _ `/ / // / _ / -) _
// _,/_, /_,/ _/ ./_////
/_/ /[01-01
00:00:00 ty
D][reset_ne
tcfg.c:105]
start reset* cnt clear t*imer!!!!!
[01-01 00:00:00 ty I][tuya_authorize.c:121] Authorization read succeeds.
[01-01 00:00:00 ty I][tuya_iot.c:560] tuya_iot_init
[01-01 00:00:00 ty N][tuya_tls.c:436] tuya_tls_init ok!
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: rcs.active
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: rcs.mf
[01-01 00:00:00 ty D][tuya_register_center.c:357] use default rcs [-2]
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: region
[01-01 00:00:00 ty E][tuya_endpoint.c:74] tal_kv_get region fail:0xfffffffe
[01-01 00:00:00 ty I][tuya_endpoint.c:272] endpoint_mgr.region:
[01-01 00:00:00 ty I][tuya_endpoint.c:273] endpoint_mgr.regist_key:
[01-01 00:00:00 ty D][tal_kv.c:270] lfs key not found: uuid2f0d5d4d9c06c70e
[01-01 00:00:00 ty W][tuya_iot.c:152] activate config not found:-2
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:0
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:1
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:2
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:3
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:4
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:5
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:6
[01-01 00:00:00 ty D][tuya_health.c:134] add new node,type:7
[01-01 00:00:00 ty D][tuya_health.c:62] init watchdog, interval: 60
E (925) task_wdt: esp_task_wdt_init(515): TWDT already initialized
[01-01 00:00:00 ty D][tuya_health.c:204] update type:7,period:1431655
[01-01 00:00:00 ty D][tuya_health.c:495] watch_dog_interval:60, monitor_detect_interval:600
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:health_monitor Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:health_monitor,stackDepth:2048,totalstackDepth:24576,priority:5
[01-01 00:00:00 ty D][netmgr.c:253] netmgr [wifi] register start
[01-01 00:00:00 ty D][netmgr.c:259] netmgr [wifi] is the first connection
I (985) pp: pp rom version: e7ae62f
I (985) net80211: net80211 rom version: e7ae62f
I (995) wifi:wifi driver task: 3fcc2750, prio:23, stack:6656, core=0
tuya> I (1015) wifi:wifi firmware version: 48ea317a7
I (1015) wifi:wifi certification version: v7.0
I (1015) wifi:config NVS flash: enabled
I (1015) wifi:config nano formatting: disabled
I (1015) wifi:Init data frame dynamic rx buffer num: 32
I (1025) wifi:Init static rx mgmt buffer num: 5
I (1025) wifi:Init management short buffer num: 32
I (1025) wifi:Init static tx buffer num: 16
I (1035) wifi:Init tx cache buffer num: 32
I (1035) wifi:Init static tx FG buffer num: 2
I (1045) wifi:Init static rx buffer size: 1600
I (1045) wifi:Init static rx buffer num: 10
I (1045) wifi:Init dynamic rx buffer num: 32
I (1055) wifi_init: rx ba win: 6
I (1055) wifi_init: accept mbox: 6
I (1055) wifi_init: tcpip mbox: 32
I (1065) wifi_init: udp mbox: 6
I (1065) wifi_init: tcp mbox: 6
I (1065) wifi_init: tcp tx win: 5760
I (1065) wifi_init: tcp rx win: 5760
I (1075) wifi_init: tcp mss: 1440
I (1075) wifi_init: WiFi/LWIP prefer SPIRAM
I (1075) wifi_init: WiFi IRAM OP enabled
I (1085) wifi_init: WiFi RX IRAM OP enabled
I (1105) wifi:(2.4G)set country: cc=CN schan=1 nchan=13 policy=1
I (1105) BLE_INIT: BT controller compile version [d752dea]
I (1105) BLE_INIT: Bluetooth MAC: ac:a7:04:ef:e1:b2
I (1115) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
[01-01 00:00:00 ty D][tuya_ble_mbuf.c:248] DYNA INIT 280,264,8,16
[01-01 00:00:00 ty D][tuya_ble_mbuf.c:248] DYNA INIT 292,276,8,16
[01-01 00:00:00 ty D][tal_thread.c:245] Thread:host_main_threa Exec Start. Set to Running Stat
[01-01 00:00:00 ty I][tal_thread.c:226] thread_create name:host_main_thread_hdl,stackDepth:4096,totalstackDepth:28672,priority:9
[01-01 00:00:00 ty D][ble_hs.c:551] ble host stage 2 start
[01-01 00:00:00 ty D][ble_hs_startup.c:316] BLE HCI Version = 9
[01-01 00:00:00 ty I][ble_hs_startup.c:145] le acl buf sz = 251,max buf = 12
[01-01 00:00:00 ty I][ble_hs_hci.c:114] acl buf sz = 251, max pkt = 12, avail pkt = 12
[01-01 00:00:00 ty I][ble_hs.c:433] ble_hs_timer reset:100
[01-01 00:00:00 ty I][tkl_bluetooth.c:465] Stack sync
[01-01 00:00:00 ty I][tkl_bluetooth.c:452] Init/Deinit Event
[01-01 00:00:00 ty N][ble_mgr.c:1128] tuya ble init success finish
[01-01 00:00:00 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:00 ty D][netmgr.c:383] netmgr conn wifi set 6
[01-01 00:00:00 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:00 ty D][tuya_main.c:299] tuya_iot_init success
[01-01 00:00:00 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:00 ty D][reset_netcfg.c:50] reset count is 4
[01-01 00:00:00 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:00 ty D][reset_netcfg.c:91] Reset ctrl data!
[01-01 00:00:00 ty D][tuya_main.c:108] Tuya Event ID:0(TUYA_EVENT_RESET)
[01-01 00:00:00 ty I][tuya_main.c:109] Device Free heap 178127
[01-01 00:00:00 ty I][tuya_main.c:140] Device Reset:0
[01-01 00:00:00 ty W][tuya_iot.c:523] CLIENT RESET...
[01-01 00:00:00 ty D][tal_kv.c:202] key:uuid2f0d5d4d9c06c70e.devid, len 0
[01-01 00:00:00 ty D][netconn_wifi.c:305] __wifi_reset_event_cb
[01-01 00:00:00 ty E][tal_event.c:173] ret:-1
[01-01 00:00:00 ty D][reset_netcfg.c:62] reset count write 0
[01-01 00:00:00 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:00 ty D][tal_kv.c:202] key:rst_cnt, len 1
[01-01 00:00:00 ty D][reset_netcfg.c:75] reset cnt clear by reset event!
[01-01 00:00:00 ty W][tuya_iot.c:1096] Activated data remove...
[01-01 00:00:00 ty W][tuya_iot.c:516] CLIENT RESTART!
[01-01 00:00:00 ty D][tuya_iot.c:869] STATE_START
[01-01 00:00:00 ty I][tuya_iot.c:889] Activation data read fail, go activation mode...
[01-01 00:00:00 ty D][tuya_main.c:108] Tuya Event ID:1(TUYA_EVENT_BIND_START)
[01-01 00:00:00 ty I][tuya_main.c:109] Device Free heap 178039
[01-01 00:00:00 ty I][tuya_main.c:112] Device Bind Start!
[01-01 00:00:00 ty D][netcfg.c:279] netcfg module start type:0x1
[01-01 00:00:00 ty D][netcfg.c:279] netcfg module start type:0x2
[01-01 00:00:00 ty D][ap_netcfg.c:856] ap cfg start:1
I (1475) wifi:mode : softAP (ac:a7:04:ef:e1:b1)
I (1475) wifi:Total power save buffer number: 8
I (1475) wifi:Init max length of beacon: 752/752
I (1485) wifi:Init max length of beacon: 752/752
[01-01 00:I (10 t) D][_p_nifcfwic:8D4] tarv apstuctessonmartLifa-E1WIA
_DEi32 I9m 11-01 00100:10 ty D][ap_netcfg.c:879] ap netcfg server ip:192.168.176.1
[01-01 00:00:01 ty N][ap_netcfg.c:886] tuya ap using tls + psk
[01-01 00:00:01 ty I][tal_thread.c:226] thread_create name:ap_cfg_task,stackDepth:4096,totalstackDepth:32768,priority:3
[01-01 00:00:01 ty D][tal_thread.c:245] Thread:ap_cfg_task Exec Start. Set to Running Stat
[01-01 00:00:01 ty D][netcfg.c:52] start 0x1 ret:0
[01-01 00:00:01 ty D][ap_netcfg.c:687] start TCP ap thread
[01-01 00:00:01 ty D][ble_netcfg.c:135] bt netcfg start
[01-01 00:00:01 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:01 ty D][ap_netcfg.c:317] ap try bind port:6668
[01-01 00:00:01 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:01 ty D][ap_netcfg.c:703] Waiting for a remote connection
[01-01 00:00:01 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:01 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:01 ty D][netcfg.c:52] start 0x2 ret:0
[01-01 00:00:01 ty I][ble_hs.c:393] ble_hs_timer_exp:
tuya>
tuya>
tuya> [01-01 00:00:05 ty D][reset_netcfg.c:62] reset count write 0
[01-01 00:00:05 ty D][tal_kv.c:202] key:rst_cnt, len 1
[01-01 00:00:05 ty D][reset_netcfg.c:69] reset cnt clear!
[01-01 00:00:17 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:17 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:00:17 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:00:17 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:00:17 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:17 ty D][ble_l2cap.c:385] rx on unknown L2CAP channel: 6
[01-01 00:00:17 ty E][ble_l2cap.c:438] DATA ERR RECV
[01-01 00:00:17 ty E][ble_hs_hci_evt.c:873] ACL PROCESS ERR:5
[01-01 00:00:17 ty E][ble_hs.c:217] ACL PROCESS ERR
[01-01 00:00:19 ty D][ble_hs_hci_evt.c:152] evt code null:12
tuya>
tuya>
tuya> [01-01 00:00:33 ty I][tkl_bluetooth.c:204] receive notify ok
[01-01 00:00:33 ty D][ble_l2cap.c:385] rx on unknown L2CAP channel: 6
[01-01 00:00:33 ty E][ble_l2cap.c:438] DATA ERR RECV
[01-01 00:00:33 ty E][ble_hs_hci_evt.c:873] ACL PROCESS ERR:5
[01-01 00:00:33 ty E][ble_hs.c:217] ACL PROCESS ERR
[01-01 00:00:33 ty I][tkl_bluetooth.c:204] receive notify ok
[01-01 00:00:35 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:00:35 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:00:35 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:35 ty N][ble_gap.c:2509] Start Adv
[01-01 00:00:35 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:00:35 ty N][ble_mgr.c:965] Ble Disonnected
[01-01 00:00:36 ty I][ble_hs.c:393] ble_hs_timer_exp:
tuya>
tuya>
tuya> [01-01 00:00:54 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:00:54 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:00:54 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:00:54 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:00:54 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:00:54 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:00:54 ty D][ble_att_svr.c:1936] debug rc = 0
[01-01 00:00:54 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x6,0x0,0x1f4
[01-01 00:00:54 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:00:55 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:00:55 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x18,0x0,0x1f4
[01-01 00:00:55 ty I][tkl_bluetooth.c:190] mtu update event; conn_handle=0x0001 mtu=256, channel id = 4
[01-01 00:00:55 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:00:55 ty E][ble_mgr.c:298] ble packet len err:54093
[01-01 00:00:55 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:00:57 ty D][ble_hs_hci_evt.c:152] evt code null:12
I (64325) wifi:new:<6,1>, old:<6,1>, ap:<6,1>, sta:<255,255>, prof:6, snd_ch_cfg:0x0
I (64325) wifi:station: 32:ec:39:1e:eb:05 join, AID=1, bgn, 40U
I (64515) wifi:idx:2 (ifx:1, 32:ec:39:1e:eb:05), tid:0, ssn:0, winSize:64
I (64635) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.176.2
[01-01 00:01:05 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:05 ty E][ble_mgr.c:298] ble packet len err:25471
[01-01 00:01:05 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:06 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:06 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:01:06 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:01:06 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:06 ty N][ble_gap.c:2509] Start Adv
[01-01 00:01:06 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:01:06 ty N][ble_mgr.c:965] Ble DisonnectI (67055) wifi:max connectioe,0a
th!
[01-01 00:01:06 ty I][ble_hs.c:393] ble_hs_timer_exp:
I (67185) wifi:max connection, deauth!
I (67345) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67495) wifi:max connection, deauth!
I (67645) wifi:max connection, deauth!
[01-01 00:01:14 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:14 ty I][tkl_bluetooth.c:146] BLE_GAP_EVENT_CONNECT(0x00), handle = 0x01, Role(1)
[01-01 00:01:14 ty N][ble_mgr.c:951] Ble Connected
[01-01 00:01:14 ty D][ble_hs_hci_evt.c:152] evt code null:20
[01-01 00:01:14 ty I][ble_hs.c:393] ble_hs_timer_exp:
[01-01 00:01:14 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:01:14 ty D][ble_att_svr.c:1936] debug rc = 0
[01-01 00:01:14 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x6,0x0,0x1f4
[01-01 00:01:14 ty I][tkl_bluetooth.c:181] BLE_GAP_EVENT_CONN_UPDATE_REQ
[01-01 00:01:14 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:14 ty N][tkl_bluetooth.c:177] BLE_GAP_EVENT_CONN_UPDATE,0x18,0x0,0x1f4
[01-01 00:01:15 ty I][tkl_bluetooth.c:190] mtu update event; conn_handle=0x0001 mtu=256, channel id = 4
[01-01 00:01:15 ty D][ble_hs_hci_evt.c:152] evt code null:12
[01-01 00:01:15 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:15 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:15 ty E][ble_mgr.c:298] ble packet len err:6053
[01-01 00:01:15 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:15 ty I][ble_hs.c:393] ble_hs_timer_exp:
I (77275) wifi:station: 32:ec:39:1e:eb:05 leave, AID = 1, reason = 3, bss_flags is 33786979, bss:0x3c11bf84
I (77275) wifi:new:<6,0>, old:<6,1>, ap:<6,1>, sta:<255,255>, prof:6, snd_ch_cfg:0x0
I (77285) wifi:idx:2, tid:0
[01-01 00:01:25 ty D][ble_mgr.c:226] ble recv sub_pkg desc:3, no:1, pack_len:33, total_len:33
[01-01 00:01:25 ty E][ble_mgr.c:298] ble packet len err:27071
[01-01 00:01:25 ty E][ble_mgr.c:980] tuya_ble_data_proc fail. -2
[01-01 00:01:26 ty I][tkl_bluetooth.c:216] BLE_GAP_EVENT_SUBSCRIBE
[01-01 00:01:26 ty N][tkl_bluetooth.c:158] BLE_GAP_EVENT_DISCONNECT(0x213)
[01-01 00:01:26 ty I][ble_gap.c:2248] GAP init: stop adv
[01-01 00:01:26 ty I][ble_hs.c:433] ble_hs_timer reset:0
[01-01 00:01:26 ty N][ble_gap.c:2509] Start Adv
[01-01 00:01:26 ty N][ble_mgr.c:366] ble adv updated 0
[01-01 00:01:26 ty N][ble_mgr.c:965] Ble Disonnected
[01-01 00:01:26 ty I][ble_hs.c:393] ble_hs_timer_exp:
我在ESP32S3的核心板上运行当前最新代码(2026.3.23)编译出来的switch_demo,并按照官方指引导入auth和按键3次之后,进入配网模式,但是手机开始配网后,一直提示ble数据包大小异常,最终配对失败。尝试更换了小米手机、华为手机、苹果手机,都是一样的现象,似乎是ble通信异常。
运行日志如下: