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.

CC3200: SimpleLinkNetAppEventHandler not called after second reconnection

Part Number: CC3200

Hello,

Let me explain the situation and I'll post the console log below. I get the system running. I turn on the router. The system connects to the router and then to mqtt. Then I turn off the router and wait for mqtt to timeout. I turn the router on again and it connects to the router and then to the mqtt broker. I turn off the router again, and it disconnects as it did before, I wait for the mqtt to timeout and then again turn the router on. This time I get the wlan event but I never get the net app event, which means it never gets an IP.

I can turn on and off the router as many times as I want but I get no other events on the system. If I leave the router on and restart the system it connects properly, so that discards anything to do with the router.

What should I check?

Console log:

General event occurred, Event ID: 1

General event occurred, Event ID: 1

Version: Client LIB 1.0.4, Common LIB 1.1.1.

SimpleLinkWlanEventHandler event: 1

SimpleLinkNetAppEventHandler event: 1

C: FH-B1 0x10 to net 17, Sent (56 Bytes) [@ 532]

C: Rcvd msg Fix-Hdr (Byte1) 0x20 from net 17 [@ 533]

C: Cleaning session for net 17

C: Msg w/ ID 0x0000, processing status: Good

C: FH-B1 0x82 to net 17, Sent (59 Bytes) [@ 534]

C: FH-B1 0x30 to net 17, Sent (34 Bytes) [@ 534]

C: Rcvd msg Fix-Hdr (Byte1) 0x90 from net 17 [@ 535]

C: Msg w/ ID 0x0001, processing status: Good

C: FH-B1 0x30 to net 17, Sent (39 Bytes) [@ 536]

C: Rcvd msg Fix-Hdr (Byte1) 0x30 from net 17 [@ 536]

C: Msg w/ ID 0x0000, processing status: Good

C: FH-B1 0x30 to net 17, Sent (70 Bytes) [@ 537]

SimpleLinkWlanEventHandler event: 2

General event occurred, Event ID: 1

General event occurred, Event ID: 1

C: FH-B1 0xc0 to net 17, Sent (2 Bytes) [@ 562]

C: Net 17, Raw Error -1, Time Out: N

C: RX closing Net 17 [-1]

C: Cleaning session for net 17

C: Net 17 now closed

SimpleLinkWlanEventHandler event: 1

SimpleLinkNetAppEventHandler event: 1

C: FH-B1 0x10 to net 18, Sent (56 Bytes) [@ 638]

C: Rcvd msg Fix-Hdr (Byte1) 0x20 from net 18 [@ 639]

C: Cleaning session for net 18

C: Msg w/ ID 0x0000, processing status: Good

C: FH-B1 0x82 to net 18, Sent (59 Bytes) [@ 640]

C: FH-B1 0x30 to net 18, Sent (61 Bytes) [@ 641]

C: Rcvd msg Fix-Hdr (Byte1) 0x90 from net 18 [@ 641]

C: Msg w/ ID 0x0003, processing status: Good

C: FH-B1 0x30 to net 18, Sent (34 Bytes) [@ 642]

C: FH-B1 0x30 to net 18, Sent (40 Bytes) [@ 642]

C: Rcvd msg Fix-Hdr (Byte1) 0x30 from net 18 [@ 643]

C: Msg w/ ID 0x0000, processing status: Good

C: FH-B1 0x30 to net 18, Sent (70 Bytes) [@ 643]

SimpleLinkWlanEventHandler event: 2

General event occurred, Event ID: 1

General event occurred, Event ID: 1

C: FH-B1 0xc0 to net 18, Sent (2 Bytes) [@ 668]

C: Net 18, Raw Error -1, Time Out: N

C: RX closing Net 18 [-1]

C: Cleaning session for net 18

C: Net 18 now closed

SimpleLinkWlanEventHandler event: 1

For further information, I'm using this configuration:

sl_WlanPolicySet(SL_POLICY_PM , SL_ALWAYS_ON_POLICY, NULL,0);

uint32_t intervalInSeconds = 60;
sl_WlanPolicySet(SL_POLICY_SCAN,SL_SCAN_ENABLE, (uint8_t *)&intervalInSeconds,sizeof(intervalInSeconds));

sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 1, 0, 0, 0), NULL, 0);

param = 1;

sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE, 1, 1, &param);


I check that they all return success, then I stop sl and restart it.

  • Let me add that I would like to post Wireshark logs but I haven't been able to capture anything more than the DHCP and MDNS packets even though I'm on an open network.
  • Let me add a more comprehensive log:

    SimpleLinkWlanEventHandler event: 1

    STAandP2PModeWlanConnected reason_code: 0

    SimpleLinkNetAppEventHandler event: 1

    Version: Client LIB 1.0.4, Common LIB 1.1.1.

    C: FH-B1 0x10 to net 17, Sent (56 Bytes) [@ 7604]

    C: Rcvd msg Fix-Hdr (Byte1) 0x20 from net 17 [@ 7604]

    C: Cleaning session for net 17

    C: Msg w/ ID 0x0000, processing status: Good

    C: FH-B1 0x82 to net 17, Sent (60 Bytes) [@ 7605]

    C: FH-B1 0x30 to net 17, Sent (34 Bytes) [@ 7605]

    C: Rcvd msg Fix-Hdr (Byte1) 0x90 from net 17 [@ 7605]

    C: Msg w/ ID 0x0001, processing status: Good

    C: FH-B1 0x30 to net 17, Sent (39 Bytes) [@ 7606]

    C: Rcvd msg Fix-Hdr (Byte1) 0x30 from net 17 [@ 7606]

    C: Msg w/ ID 0x0000, processing status: Good

    C: FH-B1 0x30 to net 17, Sent (70 Bytes) [@ 7606]

    SimpleLinkWlanEventHandler event: 2

    STAandP2PModeDisconnected reason_code: 3

    General event occurred, Event ID: 1
    deviceEvent status: -109
    sender: 5

    General event occurred, Event ID: 1
    deviceEvent status: -102
    sender: 5

    C: FH-B1 0xc0 to net 17, Sent (2 Bytes) [@ 7631]

    C: Net 17, Raw Error -1, Time Out: N

    C: RX closing Net 17 [-1]

    C: Cleaning session for net 17

    C: Net 17 now closed

    SimpleLinkWlanEventHandler event: 1

    STAandP2PModeWlanConnected reason_code: 0

    SimpleLinkNetAppEventHandler event: 1

    C: FH-B1 0x10 to net 18, Sent (56 Bytes) [@ 7660]

    C: Rcvd msg Fix-Hdr (Byte1) 0x20 from net 18 [@ 7660]

    C: Cleaning session for net 18

    C: Msg w/ ID 0x0000, processing status: Good

    C: FH-B1 0x82 to net 18, Sent (60 Bytes) [@ 7661]

    C: FH-B1 0x30 to net 18, Sent (34 Bytes) [@ 7661]

    C: Rcvd msg Fix-Hdr (Byte1) 0x90 from net 18 [@ 7661]

    C: Msg w/ ID 0x0003, processing status: Good

    C: FH-B1 0x30 to net 18, Sent (40 Bytes) [@ 7662]

    C: Rcvd msg Fix-Hdr (Byte1) 0x30 from net 18 [@ 7662]

    C: Msg w/ ID 0x0000, processing status: Good

    C: FH-B1 0x30 to net 18, Sent (70 Bytes) [@ 7662]

    SimpleLinkWlanEventHandler event: 2

    STAandP2PModeDisconnected reason_code: 3

    General event occurred, Event ID: 1
    deviceEvent status: -109
    sender: 5

    General event occurred, Event ID: 1
    deviceEvent status: -102
    sender: 5

    C: FH-B1 0xc0 to net 18, Sent (2 Bytes) [@ 7687]

    C: Net 18, Raw Error -1, Time Out: N

    C: RX closing Net 18 [-1]

    C: Cleaning session for net 18

    C: Net 18 now closed

    SimpleLinkWlanEventHandler event: 1

    STAandP2PModeWlanConnected reason_code: 0

  • Hi Rodrigo,

    How are you disconnecting and reconnecting?

    Please see this post as a possible work-around for your issue: e2e.ti.com/.../565792

    Best regards,
    Sarah
  • Hi, Sarah.

    I have already applied that fix earlier and it fixed the mqtt disconnect issue.

    Right now, what I'm doing is simply turning off and on the router to which the CC3200 is connected to.

    The mqtt client disconnects correctly, as you can see below:

    C: Net 18, Raw Error -1, Time Out: N

    C: RX closing Net 18 [-1]

    C: Cleaning session for net 18

    C: Net 18 now closed

    The problem is that simplelink never connects back to the AP when I turn the router on again.

  • Hi,

    Please try setup static IP to your CC3200 (by sl_NetCfgSet API) and repeat your tests. It will be good to be sure, that issue is not related to DHCP server in your router. Do you use latest SDK and do you have latest service pack loaded in device?

    Jan
  • Hello Jan,
    I'm using the lastest SDK and the latest service pack.
    I will try with an static IP and post the results.