Hello,I have observed that when DA16200 is in sleep 3 (with default DPM settings used) and wake up from sleep using external source, in logs I can see it disconnects from shadow and then it reconnects but this process takes around 12s to 13s. Please check below logs:-Note: SDK version:DA16200_DA16600_SDK_v18.104.22.168_AWS_0DA16200_DA16600_SDK_FreeRTOS_v22.214.171.124
... " goto DPM SLEEP...ðWakeup source is 0x81>>> Start DA16X Supplicant ...>>> TIM STATUS: 0x00000010>>> TIM : FAST
>>>DPM Mode = 1===========================================
[ Ver. 21.06 , 202106171700 , eoh ]
Using internal cert key by app_aws_certi.h
AWS_IOT on Station Mode for "143"
[ Set Sleep mode : 3 , RTC time : 0 ,useRTM : 1 ]
[New Thread("DM_T_aws_shadowdpm") Start for DPM APP]
[dpmAppThreadCreate] DPM mode checked..."DM_IR_aws_shadowdpm" got dpm data size (12)"DM_ER_aws_shadowdpm" got dpm data size (308)Wake up from DPM Sleep
aws_shadowdpm is not registered. Will be registered with 8883 port
============================Wake mode [0x81] , type wakeup pin = 0============================
AWS IoT SDK Version 3.0.1-
DIPANJAN : [AWS_DPM_App_Connect]
WARN: [iot_tls_init:211] DPM Mode = 1Shadow Connectsaved aws broker IP = "126.96.36.199"sock(#=0) connect return (rc=0)DEBUG: [iot_tls_connect:267] TLS processing after socket setup[app_tls_restore:221] restore tls session OK, state = 16[app_tls_restore] not the mode of receiving packet[app_tls_setup:699] tls restore OK, but not UC wakeup[app_socket_connect_tls] not the mode of receiving packet...bypassDEBUG: [iot_tls_connect:326] saving binded port num=8883[app_tls_deinit:521] close (rc=0)[aws_dpm_set_aws_server_ip:369] passed ip (="") invalid, and cleared[app_tls_disconnect:1218] saved server's ip clearedDEBUG: [iot_tls_destroy:438] INDEBUG: [iot_tls_destroy:440] OUTERROR: [AWS_DPM_App_Connect:260] Shadow Connection Error (-13)ERROR: [AWS_DPM_App_Connect:418] Shadow Network Disconnected Error. go to retry connection: (rc=-13)forced to disconnectedFree done[AWS_DPM_App_Connect] reconnecting... (cnt=1)Shadow Init
WARN: [iot_tls_init:211] DPM Mode = 1Shadow Connectaws broker URL = "a3lm5b0snjygjx-ats.iot.us-west-2.amazonaws.com"new aws broker IP = "188.8.131.52"sock(#=0) connect return (rc=0)TLS setup neededDEBUG: [iot_tls_connect:267] TLS processing after socket setupsetup tls connection newlyDEBUG: [iot_tls_connect:326] saving binded port num=8883DEBUG: [_aws_iot_mqtt_internal_connect:639] wait for the CONNACK: OKShadow Connection(DPM) OKautoreconnect_status 0Subscribing... 0finish connection (rc=0)[dpmAPPManager] DM_SENSOR_WAKEUPDM_WAKEUP_SENSOR
Sleep mode 3
[dpmAPPManager] DM_CHECK_RECV before DPM sleepDM_CHECK_RECV
[dpmAPPManager] RTC_READY_POWER_DOWN[dpm_keepalive_timer_register] RTC interval (=1200 secs), mode (=0)
... " goto DPM SLEEP...>>> StaKindly suggest if this is known behavior or any modification needed.looking forward to your response, Thanks.
Hi There,If your DA16200MOD was disconnected from server or Wi-Fi AP before the wake-up by the external signal from MCU, it will need a new server connection. The 12-13 seconds to reconnect sounds like a reasonable time. You can try and check reconnection time by changing AWS-local server as your country.From attached log, you can check aws broker URL = "a3lm5b0snjygjx-ats.iot.us-west-2.amazonaws.com""It means server is set to "us-west". Please try to change the server and check the reconnection time again.Kind Regards,OV_Renesas
Thanks for your reply. This issue is solved when tried to follow the get-started example project of AWS-IOT and it worked properly. Shadow disconnect didn't occur every time after wakeup.