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, ¶m);
I check that they all return success, then I stop sl and restart it.