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.

CC3200MOD: Device Random Disconnects

Part Number: CC3200MOD
Other Parts Discussed in Thread: CC3200, CC3100, , CC3120

Hello,

I am using CC3200 and have application built to connect with AWS.  I am finding I see WLAN Disconnects quite often and want to understand what is happening.

I have printed out reason_code, and found return value is 7 (SL_WLAN_DISCONNECT_CLASS3_FRAME_FROM_NONASSOC_STA).  What causes this, and is there anyway to prevent it?

Also, is there any recommendation of what to do after this type of disconnect?  I have autoconnect enabled, and the CC3200 gets WLAN reconnect very fast after disconnect.  This quick disconnect/reconnect seems to be causing other issues in my application and I'd like to understand more about what is happening so I can properly mitigate this situation.

Thank you,
-Jon

  • Jon,

    Are you acting as the AP or STA?

    Regards,
    Seong
  • This issue is only occurring in STA mode.
  • Seong, can you update me on any advice you may have for this concern?
  • We are seeing the same thing with a CC3100 running against a DD-WRT router. After roughly an hour connection time the router status page shows the chip disconnect, and after one or two minutes the disconnect is seen on the controlling MCU with the same (7) reason code. Currently testing against a Netgear router to see if same behavior is seen there.

    The problem is the delay between actually dropping off the network and the MCU seeing the event. Would like the drop-off to happen in the ideal world, but *need* near instant notification so that we can force the CC3100 back onto the network and not miss incoming data from another CC3100 based device.
  • Ran the same test against a NetGear R6200v2 router (V1.0.3.12_10.1.11 firmware) overnight and after nearly 20 hours have not seen the CC3100 drop off that network.

    So this problem is router/firmware specific. We can live with that, but the long delay between actually dropping off the network and getting the notification is still an issue.

  • Colin -
    have you by chance reached to the DD-WRT folks? Looks like this is an open source approach to router firmware - i would suggest you post the issue on their forum: ==> and see what comes back.

    Or revert to factory firmware of the router hardware you are using.

  • I have not yet. I am testing out an idea of what the problem could be. I will update this thread with the results - probably later this week.

  • The problem is with the CC3100, not with DD-WRT. DD-WRT is the means to easily expose this bug, but other routers may also cause the issue, but at a much lower rate and seemingly at random times.

    Is the following report good enough to have TI R&D look into the issue described below, or do I need to submit this information somewhere else?

    AES encryption has a feature for key renewal. The station attaches with the shared key and after that the station and access point encrypt messages with that key. After a while the best practice is to change to a new AP generated random key that is exchanged with the station using the current key in force to encrypt the interchange of the new key. On DD-WRT this is termed the "Key Renewal Interval". By default this is set to 3600 seconds (every hour), but can range from 1-99,999 seconds. Cisco routers can be configured with a higher interval time.

    This is not just a DD-WRT (open source, who cares) issue - it will also be present against Cisco commercial routers, and others.

    On DD-WRT it is possible to turn off the key renewal interval by setting it to zero. When I set it to 600 seconds the CC3100 fell off the network every ten minutes. When I turn the key renewal interval off the same set-up ran for 19+ hours with no issues. The only change was to disable the key renewal interval. This demonstrates to me that the CC3100 cannot handle the AES key renewal protocol.

    I believe what is happening is that the CC3100 does not correctly interact with the AP during the key renewal and so the AP removes the device from its association table. The CC3100 does not know that it did not interact correctly and so is blindly unaware that it is not connected to the AP. The CC3100 then needs to send a packet (such as a keep-alive packet) and so transmits the packet on the correct frequency with the original shared key. The AP somehow decrypts enough of the received packet to recognize it comes from a device that is not in the association table and thus rejects it with the "class 3 packet from non-associated station" error response. The CC3100 then recognizes this error response and informs the controlling MCU that it has been disconnected because of this error. The MCU is able to react to the error and rejoin the network using the shared key and everything is fine until the next AES key renewal sequence fails.

    The challenge is that the CC3100 may take up to one or two minutes to have reason to send a (keep-alive?) packet and thus the CC3100 may be completely unaware that it is off the network for that period of time.

    We are following TI's reference designs forhow to configure the CC3100. There is no errata to state that the CC3100 cannot function correctly with AES key renewal.

    Either there needs to be an updated reference design for configuring the CC3100 to correctly participate in AES key renewal, or there needs to be a firmware update to resolve the issue.

  • Jon,

    Sorry for the late reply. The error sounds as if the CC3200MOD is unable to properly connect to the AP. Do you have sniffer logs that show that you are successfully sending packets before these disconnects are occurring?

    Regards,
    Seong
  • Hi Colin,

    Thank you for sharing your findings. I'm going to start looking into the AES key renewal issue.

    Best Regards,
    Ben M
  • Colin,

    When you performed the tests, what was the power policy set for the CC3100?

    Can you perform the same test with the power policy set to Always On -

    sl_WlanPolicySet(SL_POLICY_PM, SL_ALWAYS_ON_POLICY, NULL, 0);

    Thanks,

    Ben M

  • That change fixed the issue! Many thanks. Can you explain why this is working? I guess that the policy does not allow the CC3100 to go into sleep and so it is awake to react to the key renewal exchange.

    With DD-WRT set up to renew the AES keys every 300 seconds...

    • Without the always on policy (explicitly set to normal policy), 4 error disconnects in 25 minutes from boot/connection to the AP
    • With the always on policy, zero disconnects in 25 minutes from boot/connection with the very same AP.

    I'll take zero error disconnects over four error disconnects every day.

    Is the policy persistent within the CC3100? I ask because I saw the improvement, then went back to the previous build that did not set the policy, expecting to see the problem, only I did not see it. I then changed the firmware to explicitly set normal or always_on in different builds to get the above results. Its almost as if the always on policy is persistent.

    If it is persistent will the CC3100 intelligently not write the persistent setting to internal flash, or will it always write to the flash and hence we need to interrogate the policy before constantly settign it to always on?

  • Hi Colin,

    Your guess is correct - the AP is likely sending the key renewal to the CC3xxx device while it is in power-save mode. If this is the case, the device would not respond and eventually get disconnected. For another AP that this issue was encountered with, the issue was determined to be caused by the AP firmware.

    The power policy will be persistent between power cycles (and sleep modes). Calling the sl_WlanPolicySet() command with the other policy and then performing an sl_Stop()/sl_Start() cycle should put the device back to Normal Policy.

    It is recommended to design your system to use the Normal Policy and not to try to dynamically switch between the two. I recommend following up on the DD-WRT firmware support for power-save mode.

    Best Regards,
    Ben M
  • Thanks for the clarification.

    Note that DD-WRT is following the beacon / DTIM standard for indicating that a station has waiting packets when it awakes: https://www.dd-wrt.com/wiki/index.php/Advanced_wireless_settings#DTIM_Interval. This describes the way that stations are meant to wake to determine that there is incoming traffic (such as the AES key renewal sequence) and if there is waiting traffic to process it. Therefore I'm not sure why the CC3100 appears to have to be configured to be always on to exchange the new keys. My MacBook Pro and Samsung Android phone have no similar issues with the exact same router.

    My router is running the very latest DD-WRT build - V3.0-r33215 Std (08/25/17)

    It is current configured to renew keys every 300 seconds. The CC3100 fell off the network every 5 minutes with normal power setting. The CC3100 stayed on the network for over 12.5 hours with always on power setting before I took the test down.

    Opinions:

    In the US there is concern about ISPs being able to monitor and sell browsing history, etc. Numerous VPN services are advertising privacy solutions, directing consumers to purchase already configured routers running DD-WRT routers for those that just want a turn-key simple solution. If this trend continues then DD-WRT will become a more common router in the home, not just in the homes of network geeks

    DD-WRT may become the "Linux of routers". It is noticeable that a number of router manufacturers are now actively embracing the project, supplying key information to the project for newly introduced routers so that the new router is quickly added to the list of supported routers. I would not be surprised if the next step for router manufacturers is to take the DD-WRT (Linux) Kernel and add their own web GUI on top, deciding which features to expose to their consumers, and which to hide from consumers using defaults. The wireless router market is a commodity market and any ability to reduce overhead and tap into latest standards implementations will reduce costs.

  • Hi Colin,

    Thanks for sharing your insight.

    I think there may be some additional factors to be considered here since the issue doesn't appear to be present on the other (>200) APs we test against.

    I will continue to follow-up internally on this with our testing team.

    Thanks,
    Ben M
  • Hi Colin,

    Just a quick comment. I am almost 99% sure that your issue is related to your particular router and Broadcom chipset inside. You should try reproduce issue at different router type with DD-WRT. According my previous experiences from participating at OpenWRT project I can say that is many problems and compatibility issues with WiFi drivers/firmwares at some Broadcom chipsets.

    Jan
  • Interesting about Broadcom. However, according to OpenWRT's page for the router in question (wiki.openwrt.org/.../tl-wr810n) and other sources it uses the Qualcomm Atheros QCA9531 chip.

    Was there also problems with this Qualcomm chips?
  • Hi,

    Qualcomm/Atheros are generally less problematic than Broadcom chipsets. But really it depends on particular type. WiFi chipsets/SoC are really world for itself. During my engineering career I never see that kinds of weirdness as working with WiFi chipsets.

    I am not able guarantee that this is not bug in CC3200/CC3100, but my personal tip is a problem with low-level driver/firmware in WiFi SoC at your router. CC3200/CC3100 itself have many bugs and design issues too, but I think that this is not in this case.

    Really good test will be upload similar build of DD-WRT into different router and check if issue with CC3200/CC3100 persists.

    Jan
  • Understood and agreed. I'll test with DD-WRT running on a Netgear Nighthawk R7000 (Broadcom BCM4709A0) - although it may be this weekend before I can get to the testing. Its my main home router, I'll need to make sure it has the latest build, and I'll have to turn on the Wi-Fi (not currently used). There's no way I'm hacking that out at night and then being called during the day for technical support :-)

    We need to build consumer products that work in 99.9% of consumer routers. We're not able to explain away an expensive product not working just because the consumer chose the "wrong" router. I have my work-around for now - as our product always has external power to work then I can simply force the chip to be always on. However, by pressing this issue with TI, if there is anything that can be done within the CC3100 firmware then we (and they) will have a more power friendly and reliable product.
  • Hi,

    Yes, I agree too.

    BTW ... if you not have done certification for your product, maybe you should really consider to use CC3120.

    Jan
  • Hello Colin,

    Would it be possible to get an update on your tests here? Were you able to reproduce on other APs? Could you summarise the APs and firmware versions you have tested?

    Thanks a lot,
    ~roger
  • Sorry, this dropped off the radar as we worked around the issue by simply forcing the radio to always be on - our product always has to be powered to work and the extra juice needed for the radio is insignificant compared to the product's normal consumption. After months of testing with the radio always on we have not seen the issue repeat itself.

    I will try to dust off the testing with the radio actively turning itself on and off (no work-around) and update this ticket. It may be a month as I am about to travel for 2 weeks.

  • Hi Colin,

    Can you confirm the test setup used to recreate the issue:

    * Device: CC3200

    * Router Firmware: DD-WRT build - V3.0-r33215 Std (08/25/17)

    * Router Model: TP-Link TL-WR810N


    From this website, the TL-WR810N doesn't show up as a supported router: https://www.dd-wrt.com/site/support/router-database

    Am I recalling the wrong router model or was there another that the issue appeared on that we can use as a reference?


    Thanks,

    Ben M