This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220: Reset every 5mins over and over again when testing the wifi door lock ref design

Part Number: CC3220

Hi Team,

I'm testing the wifi door lock ref design as below link on CC3220SLP,  and found there is a strange phenomenon, the board reset every 5mins over and over again. BTW, the function works fine, like MQTT, SNTP, PROVISION, etc

http://www.ti.com.cn/tool/cn/TIDC-01005

below is the print out, please kindly suggest what may cause it?

*************************************************

CC3220S Wi-Fi E-Lock Demo Example Ver: 1.0.0

*************************************************

CHIP: 0x30000018

MAC: 2.0.0.0

PHY: 2.2.0.6

NWP: 3.7.0.1

ROM: 0

HOST: 3.0.1.41

MAC address: f0:c7:7f:19:28:a1

*************************************************

[Network Thread] Subscription Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[Network Thread] Subscription Topic 2: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[Network Thread] Publish Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockState

[Network Thread] Profile does not exist

[Network Thread] Using hard-coded profile for connection.

[Network Interface] Device came up in Station mode

[WLAN EVENT] STA Connected to the AP: alwirless2.4G , BSSID: b0:95:8e:3:1b:34

[NETAPP EVENT] IP Acquired: IP=192.168.0.107 , Gateway=192.168.0.1

[Network Thread] Device has connected to alwirless2.4G

[Network Thread] Setting time zone to GMT-6 (China Zone)

[Network Thread] Call SNTP

[Network Thread] Local time = Tue Oct 9 18:15:06 2018

[Network Thread] Device time is: Day 9, Mon 10, Year 2018, Hour 18, Min 15, Sec 4

[Network Thread] set RTC Successfully!

CONNACK:

Connection Success

[MQTT Thread] Client subscribed on /Broker/To/cc32xx/doorLock

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

BRIDGE DISCONNECTION

[Network Thread] Local time = Tue Oct 9 18:20:16 2018

Device disconnected from the AP on an ERROR..!!

[MQTT Thread] On-board Client Disconnected

[MQTT Thread] Unsubscribed from the topic /Broker/To/cc32xx/doorLock

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

[MQTT Thread] MQTT Client Handle deleted

[MQTT Thread] MQTT Client library initialized successfully

[Network Thread] Getting device UDID!

[Network Interface] Device came up in Station mode

*************************************************

CC3220S Wi-Fi E-Lock Demo Example Ver: 1.0.0

*************************************************

CHIP: 0x30000018

MAC: 2.0.0.0

PHY: 2.2.0.6

NWP: 3.7.0.1

ROM: 0

HOST: 3.0.1.41

MAC address: f0:c7:7f:19:28:a1

*************************************************

[Network Thread] Subscription Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[Network Thread] Subscription Topic 2: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[Network Thread] Publish Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockState

[Network Thread] Profile does not exist

[Network Thread] Using hard-coded profile for connection.

[Network Interface] Device came up in Station mode

[WLAN EVENT] STA Connected to the AP: alwirless2.4G , BSSID: b0:95:8e:3:1b:34

[NETAPP EVENT] IP Acquired: IP=192.168.0.107 , Gateway=192.168.0.1

[Network Thread] Device has connected to alwirless2.4G

[Network Thread] Setting time zone to GMT-6 (China Zone)

[Network Thread] Call SNTP

[Network Thread] Local time = Tue Oct 9 18:21:19 2018

[Network Thread] Device time is: Day 9, Mon 10, Year 2018, Hour 18, Min 21, Sec 19

[Network Thread] set RTC Successfully!

CONNACK:

Connection Success

[MQTT Thread] Client subscribed on /Broker/To/cc32xx/doorLock

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

BRIDGE DISCONNECTION

[Network Thread] Local time = Tue Oct 9 18:26:30 2018

Device disconnected from the AP on an ERROR..!!

[MQTT Thread] On-board Client Disconnected

[MQTT Thread] Unsubscribed from the topic /Broker/To/cc32xx/doorLock

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

[MQTT Thread] MQTT Client Handle deleted

[MQTT Thread] MQTT Client library initialized successfully

[Network Thread] Getting device UDID!

[Network Interface] Device came up in Station mode

*************************************************

CC3220S Wi-Fi E-Lock Demo Example Ver: 1.0.0

*************************************************

CHIP: 0x30000018

MAC: 2.0.0.0

PHY: 2.2.0.6

NWP: 3.7.0.1

ROM: 0

HOST: 3.0.1.41

MAC address: f0:c7:7f:19:28:a1

*************************************************

[Network Thread] Subscription Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[Network Thread] Subscription Topic 2: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[Network Thread] Publish Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockState

[Network Thread] Profile does not exist

[Network Thread] Using hard-coded profile for connection.

[Network Interface] Device came up in Station mode

[WLAN EVENT] STA Connected to the AP: alwirless2.4G , BSSID: b0:95:8e:3:1b:34

[NETAPP EVENT] IP Acquired: IP=192.168.0.107 , Gateway=192.168.0.1

[Network Thread] Device has connected to alwirless2.4G

[Network Thread] Setting time zone to GMT-6 (China Zone)

[Network Thread] Call SNTP

[Network Thread] Local time = Tue Oct 9 18:27:34 2018

[Network Thread] Device time is: Day 9, Mon 10, Year 2018, Hour 18, Min 27, Sec 33

[Network Thread] set RTC Successfully!

CONNACK:

Connection Success

[MQTT Thread] Client subscribed on /Broker/To/cc32xx/doorLock

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

BRIDGE DISCONNECTION

[Network Thread] Local time = Tue Oct 9 18:32:44 2018

Device disconnected from the AP on an ERROR..!!

[MQTT Thread] On-board Client Disconnected

[MQTT Thread] Unsubscribed from the topic /Broker/To/cc32xx/doorLock

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

[MQTT Thread] MQTT Client Handle deleted

[MQTT Thread] MQTT Client library initialized successfully

[Network Thread] Getting device UDID!

[Network Interface] Device came up in Station mode

*************************************************

CC3220S Wi-Fi E-Lock Demo Example Ver: 1.0.0

*************************************************

CHIP: 0x30000018

MAC: 2.0.0.0

PHY: 2.2.0.6

NWP: 3.7.0.1

ROM: 0

HOST: 3.0.1.41

MAC address: f0:c7:7f:19:28:a1

*************************************************

[Network Thread] Subscription Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[Network Thread] Subscription Topic 2: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[Network Thread] Publish Topic 1: /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockState

[Network Thread] Profile does not exist

[Network Thread] Using hard-coded profile for connection.

[Network Interface] Device came up in Station mode

[WLAN EVENT] STA Connected to the AP: alwirless2.4G , BSSID: b0:95:8e:3:1b:34

[NETAPP EVENT] IP Acquired: IP=192.168.0.107 , Gateway=192.168.0.1

[Network Thread] Device has connected to alwirless2.4G

[Network Thread] Setting time zone to GMT-6 (China Zone)

[Network Thread] Call SNTP

[Network Thread] Local time = Tue Oct 9 18:34:41 2018

[Network Thread] Device time is: Day 9, Mon 10, Year 2018, Hour 18, Min 34, Sec 39

[Network Thread] set RTC Successfully!

CONNACK:

Connection Success

[MQTT Thread] Client subscribed on /Broker/To/cc32xx/doorLock

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Client subscribed on /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

BRIDGE DISCONNECTION

[Network Thread] Local time = Tue Oct 9 18:39:50 2018

Device disconnected from the AP on an ERROR..!!

[MQTT Thread] On-board Client Disconnected

[MQTT Thread] Unsubscribed from the topic /Broker/To/cc32xx/doorLock

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockControl

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockStatus

[MQTT Thread] Unsubscribed from the topic /cc3220/doorLock/aeb1841d23c6b1970898d92ebe13d5e/LockOTA

[MQTT Thread] MQTT Client Handle deleted

[MQTT Thread] MQTT Client library initialized successfully

[Network Thread] Getting device UDID!

[Network Interface] Device came up in Station mode

  • Hi Yue,

    It looks like you made a couple adjustments to the demo. I see that you added the time-stamp printout when the mqtt bridge disconnection occurs. I assume you may have also switched which broker you are using.

    1. Is that correct? If you have changed the broker, does this happen with all brokers that you use?
    2. Can you try adjusting the mqttKeepAliveTimeout in the mqtt_client_task.c file to less than 5 minutes?
    3. Can you also update the print-out in the SimpleLinkWlanEventHandler() function that writes "Device disconnected from the AP on an ERROR..!!" to also include the pEventData->ReasonCode value so we can see what causes the AP disconnection?

    Best,

    Ben M

  • Ben,

    thanks for reply.

    1. I didn't change the broker, still "m2m.eclipse.org" .  I just did a slight modification on the ref design code.  for example: changed the time zone,disable some functions through the macro definition as below 

    #define CONTROL             (1) // Enables control task
    #define NETWORK_IF          (1) // Enables network interface task
    #define APSC_PROVISIONING   (0) // Enables AP Provisioning and TI SmartConfig
    #define BLE_PROVISIONING    (0) // Enables BLE Provisioning if using CC2640R2F as SNP
    #define OTA                 (0) // Enables OTA software update state machine
    #define MQTT                (1) // Enables MQTT client for receiving messages from the cloud
    #define MOTOR               (0) // Enables the PWM/GPIO interface for controlling DRV8837EVM
    #define SENSORS             (0) // Enables reading sensors when using BOOSTXL-SENSORS

    2. mqttKeepAliveTimeout keep the value without change. 

    uint16_t    mqttKeepAliveTimeout = 43200; // 43200 sec = 12hr * 60 min * 60 sec

    3. below is the print out of the reason code:

    Device disconnected from the AP on an ERROR..,ReasonCode= 6!!

  • Hi Yue,

    Do you get the same issue regardless of which of the macros are set (for example, even if provisioning is enabled)? If you use a totally different application, like the MQTT example in the SDK, do you see the issue?

    The reason code seems to indicate that the disconnect event is being caused by the AP. Can you test with another AP to see if the disconnection issue goes away?

    Best Regards,
    Ben M

  • Another alternate test you could run is to disable the use of the long sleep interval feature and see if it goes away. Please share the AP model / version number.

    Best,
    Ben M
  • Ben,
    I will get back to you directly through the email next. please kindly help to explain a bit about below issue.
    what may cause this? I can't get it literally . thanks.

    "SL_WLAN_DISCONNECT_FRAME_FROM_NONAUTH_STA"
  • Ok, I will close this thread for now. Please email me when you can.

    Best,

    Ben M