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.

CC3100MOD: Repeat SlNonOsMainLoopTask

Part Number: CC3100MOD
Other Parts Discussed in Thread: CC3100SDK, CC3100

Hi All,

Please let me talk about Wi-Fi Connection between CC3100MOD.

My customer is trying to connect CC3100MOD in AP Mode and CC3100MOD in Station Mode.

At this time Station side is executing sl_WlanConnect(), but it says that it may not be able to connect even if it takes time.

(When executing sl_WlanConnect (), it seems that Error Code is not output.)

After executing sl_WlanConnect (), _SlNonOsMainLoopTask is executed repeatedly.

In Sample Program (udp_socket) of CC3100SDK, SlNonOsMainLoopTask is executed repeatedly after sl_WlanConnect().

How long should I repeat this SlNonOsMainLoopTask iteration?

As a Wi-Fi standard, is there no meaning unless a retry occurs even after repeating SlNonOsMailLoopTask for a long time?

If I repeatedly execute SlNonOsMainLoopTask, is communication retry occurred many times to establish communication?

Also, customer is considering switching channel when the connection fails.(Currently they use channel6 only.)

Is it possible to change the channel using the lost authentication packet or Association packet as a trigger?

They use CC3100SDK v1.1.0.

Best Regards,

Takashi

  • Hi Takashi,

    SlNonOsMainLoopTask needs to be repeated when waiting for asynchronous events (such as WLAN_CONNECT_EVENT) and should be part of the main loop when making SimpleLink calls.

    Note that when attempting to connect to an AP, the behavior of the CC3100 is as described in section 5.4.3 of the CC3100 User Guide. The loop which calls SlNonOsMainLoopTask should be iterated for as long as it is acceptable for your application to wait for an AP connection. You may need to wait an amount of time on the order of seconds to get the connection event. The timeout is necessary to handle the case where the AP does not exist and you need to stop the device from trying to connect indefinitely.

    When SlNonOsMainLoopTask is called, it is not sending a command to make the network processor do additional work. It is only for the host MCU to receive and process the asynchronous events sent from the network processor. However, while you are waiting in your loop (after calling sl_WlanConnect()) the network processor is performing a scan looking for the AP to connect to. If the AP SSID is found, the network processor will attempt to connect. In the case that the connection fails, you will receive an event and the device will not continue to try to connect again.

    The device will search for APs on all channels that the scan is allowed to run on so unless only one channel is being enabled at a time, there should be no need to manually switch channels.

    Best Regards,

    Ben M