Page 1 of 2

【已解决】【TuyaOS SDK】tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 28日 17:14
by 19926824531

在调试tuyaos过程中遇到的问题log日志如下,打印这log是什么原因?

DBG][main.c: 172] *************************************************
FW compile date =[Dec 28 2023 15:34:02]
[LOG_W][main.c: 175] FW_VER_CODE : 1000
[DBG
][main.c: 176] modelName : D2PT
[DBG][main.c: 177] customerName : STD
[DBG
][main.c: 178] *************************************************
[LOG_I][main.c: 233] Force open LED
[DBG][NetTask.c: 553] enter net_task_app_main
[DBG
][AVTask.c: 122] enter av_task_app_main
[DBG][AVStream.c: 1172] Start video stream
[DBG
][AVTask.c: 122] enter av_task_app_main
[DBG][AVStream.c: 1172] Start video stream
[DBG
][AVStream.c: 227] imp_system_init start
[DBG][AVStream.c: 227] imp_system_init start
[DBG
][AVStream.c: 236] IMP_ISP_Open succ
[DBG_][AVStream.c: 236] IMP_ISP_Open succ
[LOG_I][DevStatusLedTask.c: 210] LED starte[ 5.716449] i2c i2c-0: Failed to register i2c client jxf38p at 0x40 (-16)
d
[LOG_I][DevStatusLedTask.c: 127] led_set led = 2 status = 1
[LOG_I][DevMngTask.c: 331] enter dev_mng_task_app_main
[LOG_I][DevWatchdog.c: 35] watchdogDevInit
[LOG_I][DevKeyScanTask.c: 128] start key_task_main
[LOG_I][EasyCamTask.c: 678] enter easycam_task_app_main
[LOG_W][SdCard.c: 820] enter sd_card_task_app_main
[ERR>][AVStream.c: 241] failed to AddSensor
[ERR>][AVStream.c: 1181] IMP_System_Init() failed
[LOG_W][SdCard.c: 845] sdCardStatus change [0 -> 1].
[LOG_I][SdCard.c: 685] Start mount:[/dev/mmcblk0p1] to [/sd]
[LOG_W][TuyaService.c: 413] Tuya SDK Version:< TuyaOS V:6.1.0 BS:40.00_PT:2.3_LAN:3.5_CAD:1.0.5_CD:1.0.0 >
< BUILD AT:2023_11_23_19_01_19 BY ci_manage FOR tuyaos-ipc AT T23_uclibc >
IOT DEFS < WIFI_GW:1 DEBUG:0 KV_FILE:0 LITTLE_END:1 SL:1 OPERATING_SYSTEM:100 RELIABLE_TRANSFER:0 >

[LOG_I][TuyaService.c: 440] Start init tuya sdk, pid:cvl9vkajuag8etrx, uuid:rs016d2565b7e5db4a24, auth_key:2kAWx7SYw1um2SAGYACj0RY7TTmCeYBk, fw version:10.0.0
[01-01 00:00:00 ty I][tal_thread.c:185] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
[01-01 00:00:00 ty I][tal_thread.c:185] thread_create name:wq_system,stackDepth:6144,totalstackDepth:10240,priority:3
[01-01 00:00:00 ty I][tal_thread.c:185] thread_create name:wq_highpri,stackDepth:5120,totalstackDepth:15360,priority:4
1970-01-01 00:00:06 tkl_wdt ERROR: 48,tkl_watchdog_init: Failed to open

[01-01 00:00:00 ty I][tal_thread.c:185] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:16896,priority:5
[01-01 00:00:00 ty I][mqc_app.c:429] mqc app init ...
[01-01 00:00:00 ty E][log_seq.c:865] open err
[01-01 00:00:00 ty I][kv_storge.c:45] Init Kvs With File:/tuya_config/
1970-01-01 00:00:06 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

[01-01 00:00:00 ty N][tuya_tls.c:852] uni_random_init...
[01-01 00:00:00 ty N][tuya_tls.c:279] tuya_tls_rand_init ok!
[01-01 00:00:00 ty N][tuya_wifi_connect.c:289] mf is open need stop fastconnect
[LOG_I][TuyaService.c: 452] Tuya sdk inited, pid:cvl9vkajuag8etrx, uuid:rs016d2565b7e5db4a24, auth_key:2kAWx7SYw1um2SAGYACj0RY7TTmCeYBk, fw version:10.0.0
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:AudioPlay, usrName:Productor, memAddr:0xacfcf0
[01-01 00:00:00 ty E][tuya_ring_buffer.c:1436] RingBuffer ch0st0tr0 Not Inited
[LOG_I][EasyCamTask.c: 737] upgrade_status:0
[LOG_I][EasyCamTask.c: 738] upgrade_err_code:0
[LOG_I][EasyCamTask.c: 84] easycam_task_handle_msg, msg_id:0x2, msg_param:0
[LOG_I][DevMngTask.c: 222] devmng_task_handle_msg, msg_id:0x6, msg_param:0
[LOG_I][DevStatusLedTask.c: 127] led_set led = 1 status = 4
[LOG_W][TuyaService.c: 462] tuya_ipc_start_sdk start, mode:1
[01-01 00:00:00 ty E][ws_db_gw.c:84] wd_protected_read fails gw_bi -6
[LOG_I][RingBuffer.c: 459] Create ring buffer success, bufName:MainVideo, usrName:TuyaAV, memAddr:0x71091008, usrIndex:0
[LOG_I][TuyaMediaService.c: 213] Create main Stream buffer, handle:2, index:0
[LOG_I][RingBuffer.c: 459] Create ring buffer success, bufName:SubVideo, usrName:TuyaAV, memAddr:0x7104e008, usrIndex:0
[LOG_I][TuyaMediaService.c: 228] Create sub Stream buffer, handle:3, index:0
[LOG_I][RingBuffer.c: 459] Create ring buffer success, bufName:AudioStream, usrName:Tuya, memAddr:0xb0e940, usrIndex:0
[LOG_I][TuyaMediaService.c: 254] Enter tuya AV send thread
[01-01 00:00:00 ty E][tuya_wifi_link.c:769] ret:-2819
[01-01 00:00:00 ty E][tuya_wifi_reset.c:638] read wf start mode err:-6
[01-01 00:00:00 ty E][tuya_ws_db.c:319] kvs_read fails gw_di -6
[01-01 00:00:00 ty E][tuya_svc_devos.c:315] desc read err:-6
[01-01 00:00:00 ty E][tuya_svc_devos.c:501] ret:-6
[01-01 00:00:00 ty E][tuya_ws_db.c:319] kvs_read fails gw_di -6
[01-01 00:00:00 ty E][tuya_ws_db.c:319] kvs_read fails gw_ai -6
[LOG_I][TuyaService.c: 141] ipc status changed:1
390, tkl_gen_get_mac: WIFI GET MAC success , MAC:98:03:cf:62:e8:30
177, tkl_wifi_get_mac: GET MAC success, MAC:98:03:cf:62:e8:30

1970-01-01 00:00:06 tkl_rtc ERROR: 41,tkl_rtc_init: Failed to open /dev/rtc0

[LOG_W][TuyaService.c: 468] tuya_ipc_start_sdk complete
[LOG_I][TuyaService.c: 141] ipc status changed:1
[01-01 00:00:06 ty E][tuya_wifi_reset.c:638] read wf start mode err:-6
ERROR: 1160, tkl_net_get_wifi_type: WIFI chip type doesn't support
ERROR: 1383, tkl_net_sta_disconnect: station disconnect failed
206, tkl_wifi_set_work_mode: WIFI SET work mode success, set mode :softap mode
390, tkl_gen_get_mac: WIFI GET MAC success , MAC:98:03:cf:62:e8:30
177, tkl_wifi_get_mac: GET MAC success, MAC:98:03:cf:62:e8:30

246, tkl_wifi_start_ap: Start AP SSID:SmartLife-E830 ,CHANNEL:6
ERROR: 544, process_kill: open pid file failed
killall: udhcpd: no process killed
[ 6.491969] SSV WLAN driver SSV6006C: Removing interface 98:03:cf:62:e8:30. PS=0
ERROR: 1839, tkl_net_hostapd_conf_prepare: create configure error 2

ERROR: 1487, tkl_net_ap_start: WIFI prepare hostapd.conf failed
ERROR: 482, tkl_gen_ap_start: start ap failed
ERROR: 250, tkl_wifi_start_ap: WIFI start ap failed
[01-01 00:00:06 ty E][tuya_wifi_netcfg.c:572] start ap failed:-1
[DBG][AVStream.c: 246] IMP_ISP_AddSensor succ
[DBG
][AVStream.c: 255] IMP_ISP_EnableSensor succ
warn: shm_init,53shm init already
[DBG][AVStream.c: 263] IMP_System_Init succ
[DBG
][AVStream.c: 274] IMP_ISP_EnableTuning succ
[DBG_][AVStream.c: 311] ImpSystemInit success
[01-01 00:00:06 ty E][tuya_ipc_sdk_init.c:339] wf nw status changed to [2], but not notify

i264e[info]: profile High, level 5.0
i264e[info]: profile High, level 2.2
ERROR: 305, tkl_gen_wifi_get_ip: WiFi : get ip failed
ERROR: 138, tkl_wifi_get_ip: get ip failed
[01-01 00:00:06 ty E][ap_netcfg.c:1153] get ip fail:-1
[01-01 00:00:06 ty E][ap_netcfg.c:1284] ap_nw_cfg_start err:-6
i264e[info]: profile High, level 2.2
[LOG_I][Osd.c: 198] Osd group:0 created
[LOG_I][Osd.c: 198] Osd group:1 created
[LOG_I][Osd.c: 293] Osd group:0 handle:2 created
[LOG_I][Osd.c: 293] Osd group:0 handle:3 created
[LOG_I][Osd.c: 293] Osd group:0 handle:4 created
[LOG_I][Osd.c: 293] Osd group:0 handle:5 created
[LOG_I][Osd.c: 293] Osd group:0 handle:6 created
[LOG_I][Osd.c: 293] Osd group:1 handle:7 created
[LOG_I][Osd.c: 293] Osd group:1 handle:8 created
[LOG_I][Osd.c: 293] Osd group:1 handle:9 created
[LOG_I][Osd.c: 293] Osd group:1 handle:10 created
[LOG_I][Osd.c: 293] Osd group:1 handle:11 created
[LOG_W][SdCard.c: 845] sdCardStatus change [1 -> 2].
[LOG_W][SdCard.c: 628] upload_sd_status = 2
[LOG_I][EasyCamTask.c: 84] easycam_task_handle_msg, msg_id:0x15, msg_param:0x2
[DBG][AVStream.c: 1265] Start video stream success!!!
[DBG
][AVStream.c: 1431] av_imp_audio_start_ai => succ!!!
[DBG][AVStream.c: 1431] av_imp_audio_start_ai => succ!!!
warn: shm_init,53shm init already
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:MainVideo, usrName:Encoder, memAddr:0x71091008
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:SubVideo, usrName:Encoder, memAddr:0x7104e008
[LOG_I][Osd.c: 428] Osd timestamp length changed, oldLen:0, newLen:17
[LOG_I][Osd.c: 428] Osd timestamp length changed, oldLen:0, newLen:17
[DBG
][AVStream.c: 1640] Enter ai AudioEnc_Thread!!!
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:AudioStream, usrName:Encoder, memAddr:0xb0e940
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:PCMAudioStream, usrName:Encoder, memAddr:0xbdc4d0
[DBG][AVStream.c: 1640] Enter ai AudioEnc_Thread!!!
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:AudioStream, usrName:Encoder, memAddr:0xb0e940
[LOG_I][RingBuffer.c: 462] Create ring buffer success, bufName:PCMAudioStream, usrName:Encoder, memAddr:0xbdc4d0
[DBG
][AVStream.c: 838] *****Got first video frame, chn: 1
[DBG][AVStream.c: 838] *****Got first video frame, chn: 0
[LOG_I][TuyaMediaService.c: 271] Wait IDR frame success
[DBG
][AVStream.c: 1956] start_audio_stream => succ!!!
[DBG][AVStream.c: 1754] Enter AudioOutput_Thread_Proc!!!
[LOG_I][RingBuffer.c: 459] Create ring buffer success, bufName:AudioPlay, usrName:Player, memAddr:0xacfcf0, usrIndex:0
INFO(jzdl): jzdl version:1.4.0(00010400_0a593ef) built:20230925-1744(4.7.2 c)
warn: shm_init,53shm init already
warn: dsys_func_share_mem_register,80fid register already name = impdbg_ao_dev_info
warn: dsys_func_share_mem_register,80fid register already name = impdbg_ao_get_frm
[DBG
][AVStream.c: 1956] start_audio_stream => succ!!!
[DBG][AVStream.c: 1754] Enter AudioOutput_Thread_Proc!!!
[LOG_E][RingBuffer.c: 368] Buffer user:Player already exist
[ERR>][AVStream.c: 1770] AudioOutputTask => [AudioOut] Create Audio ring buffer err, ret: -1
INFO(persondet): Ingenic DL PersonDet Promotion Version:0.0.8(00000008_111fcc8) built:20231008-1729(5.4.0 simd)
param frameWidth: 640 frameHeight: 360 sense: 4 score: 0.500000 detdist: 0 ptime: 0 count: 0 mod: 0 enable_perm: 0 enable_move: 0 track_mode: 0 observation_period: 5 active_count: 2 move_scale: 1.000000
INFO(persondet): Ingenic DL PersonDet Promotion Version:0.0.8(00000008_111fcc8) built:20231008-1729(5.4.0 simd)
param frameWidth: 640 frameHeight: 360 sense: 4 score: 0.500000 detdist: 0 ptime: 0 count: 0 mod: 0 enable_perm: 0 enable_move: 0 track_mode: 0 observation_period: 5 active_count: 2 move_scale: 1.000000
[DBG
][AIProcess.c: 763] AI_Detect_JzIvsInit => succ!!!
[LOG_I][AVTask.c: 27] av_task_handle_msg, msg_id:0x8, msg_param:0
[DBG][AIProcess.c: 763] AI_Detect_JzIvsInit => succ!!!
[ivs_qr_init 23]Error: QR context is already initialized!
[ERR>][AIProcess.c: 596] AI_Detect_EnableQrScan err, bEnable: 1, ret: -1[DBG
][AIProcess.c: 601] AI_Detect_EnableQrScan => succ, bEnable: 1
[DBG][AIProcess.c: 356] push motion detect event!!!
[LOG_I][EasyCamTask.c: 84] easycam_task_handle_msg, msg_id:0x1f, msg_param:0x1e5b
[DBG
][AVStream.c: 1612] av_imp_ai_enable_aec_mode => mode: 0!!!
1970-01-01 00:00:11 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:16 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:21 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:26 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:31 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:36 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:36 tkl_rtc ERROR: 112,tkl_rtc_time_get: RTC_RD_TIME failed

1970-01-01 00:00:41 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:46 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:51 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail

1970-01-01 00:00:56 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 28日 17:18
by yingtao_33

请问你是基于什么框架开发的?


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 28日 17:26
by pippin-bobo

1970-01-01 00:00:56 tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail
请问是指上面这个打印吗?


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 28日 17:31
by 19926824531

君正T23 拿的是tuyaos-3.9.0 sdk方式开发,跟之前涂鸦4.x /5.x SDK 方式的一样的开发方式,今天刚调试固件打印log一直在报tkl_rtc ERROR: 112,tkl_rtc_time_get: RTC_RD_TIME failed
tkl_wdt ERROR: 110,tkl_watchdog_refresh: WDIOC_KEEPALIVE fail ,还有wifi配网也配不上,是不是我们在使用tuyaos方面哪有使用配置不对吗?


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 28日 17:35
by 19926824531

麻烦也帮忙看下刚我上传的整个log日志内容


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 29日 18:02
by pippin-bobo

1.watchdog和rtc的报错,可以对照平台确认下tkl_watchdog.c和tkl_rtc.c是不是没有适配好,看日志是tkl_watchdog_init就报错了。
2.wifi配网失败是通过什么方式配网失败,看日志ap启动就失败了需要确认下tkl_wifi_start_ap接口是不是适配的符合T23平台,我们按照linux通用提供的标准模板,如果有平台差异 需要再次确认下
3.其他tkl接口也是如此,都需要再次确认下


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 29日 19:16
by 19926824531

你好,我们下载的tuyaos sdk就是以T23N的,底层相关的还需要我们自己怎么去适配吗?
T23N_uclibc_TuyaOS-3.9.0\software\TuyaOS\vendor
这部分我们这边没怎么搞清楚,你们有相关的文档的吗?


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 29日 19:23
by 郭老庄

你好,需要自己适配。文档可查看README.md,重点关注“vendor适配清单”章节


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 29日 19:39
by 19926824531

tkl适配的问题是我们的应用层需要是实现tkl相关的接口吗?


Re: tuyaos sdk开发调试遇到的问题

Posted: 2023年 Dec 29日 20:24
by 19926824531

我们现在开发的方式还是以SDK方式的,底层BSP(uboot,kernel,rootfs)都是独立在T23N上开发的,在应用层实现跟tuya相关的功能逻辑