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.

CC3220MOD: CC3220 Network Processor Issue

Part Number: CC3220MOD
Other Parts Discussed in Thread: TPS54202, UNIFLASH, CC3100

I was doing some field testing an ran into a very repeatable issue, at the time, that I thought was temperature related.  CC3220 is configured in AP mode.  I would connect to it the first time after power up and view the on board web page and things would work as expected.  Then I disconnected and reconnected and DHCP appeared to do a release but would not hand out a new IP address.  I also found it strange that even giving my phone a static IP, it would not let me view the on board web page.  It always broadcasts is SSID and my code appears to be running because it is servicing interrupts as expected even in this strange state.  I would power cycle the part and get the same behavior.  I can connect the first time, but then on a second connection, it would fail. 

Temperatures outside were 38-40C and probably a bit warmer in the enclosure due to solar load.  I tested a device in an oven at 75-80C that was having issues outside and found it to have no issues in the oven, so I don't think it is temperature related as I thought.  Any ideas on what might cause this?  I was thinking it could be power related, but I think the power situation is pretty good.  It is being powered by a large 12V lead acid battery and converted to 3.3V by a TPS54202 with 44uF of output capacitance.

  • Hi,

    Did you try looking at the wlan events output on debug console or uart? You should be able to see when client connected and released and any other issues.

    Tom
  • Hi Tom,

    Unfortunately, I didn't have any debug equipment with me. We stopped populating the JTAG header as well. This was in a remote location. We had tested locally for 3+ months, connecting and disconnecting multiples times every day, with NO new issues ever since we updated to a more recent NWP service pack. I'm still trying to recreate it, but of course with no luck. I guess I was just wondering if there was any "tribal knowledge" regarding things that might cause the NWP to freak out... for a lack of better words.
  • Hi Andrew,

    What version of the service pack were you using? And to clarify, you only ran into this issue during field testing? You haven't been able to recreate the issue?

    Best regards,
    Kristen
  • 3.8.0.3 is the SP.  This version and the last two have been pretty good.  Earlier versions of the NWP service pack had serious issues with the DHCP in AP mode.  Until this last week, the only strange thing I get every once in awhile is that sometimes a phone will ask for the WPA password again even though it was set to remember it.

    Yes, only during field testing.  I've been trying to recreate with no success so far.  

  • Kristen,

    I might have a bit of a breakthrough on this.  I warmed a board up and got the exact behavior I was seeing in the field.  Here is what is interesting.

    • The board continues to have the issue even after it has had ample time to cool down.  Its really unclear why that is the case.
    • You can always connect after the first power cycle of the cc3220.  Any time you disconnect and then try to reconnect after that results in a failure
    • Disabling WPA/WPA2 on the cc3220 appears to make the problem go away.  I've verified this numerous times now
    • While the cc3220 is in the "failed" state, if I reboot my iphone I can reconnect, but again only on the first time.

    Attached is a wireshark capture of what is going on.  Upon making a connection after the first disconnect, when it worked, It appears there is a dhcp request and ack and the iphone gets its old ip address.  Then seconds later there is a DHCP discover and offer and checkbox next to the network name on the iphone turns into a spinner.  It will do this for minutes and then it somehow defaults back to its old IP, but despite having an IP address, the iphone cannot be pinged and it mdns stops working (i can no longer ping mydevice.local and get a response).

    capture1.zip

  • Kristin,

    After recreating the problem before and having no success with it going away, even after numerous power cycles and leaving it off for a half hour or so between cycles.  I finally just put the device away for several hours.  I then powered it up and there were no issues with my iPhone connecting again.  So I decided to repeat the heat up.  I was able to get it to happen again.

    I've attached a NWP Log of the issue.  You should see the device operate normally while it is being heated up.  All of a sudden I get asked for the WPA password again, which is strange, on my iPhone.  After that it started to have the issue.  The symptom is that I can connect and my iPhone briefly shows a valid IP and then goes back to trying to get an IP for 1-2min.  Then it gets an IP at this point but something is still messed up with the network at this point.  mDNS names no longer resolve.  It is almost as something is half broken on the network.  If I power cycle the cc3220, I will successfully connect the first time with no issues, but then on the second connection it fails and any attempts after that.  It is interesting that a second device, like my iPad, that wasn't connected during the failure, has no issues connecting.  If I force the cc3220 to an open network then everything begins to work just fine.  If I re-enable WPA, the issues again happen only with my iPhone which was the device connected when the "failure" happened.  I have a hunch there is something getting corrupted with the WPA stuff in the network processor.  

    I believe I've done my due diligence to produce all the evidence I can.  Let me know how else I can assist. This is a pretty big issue because this is an outdoor application that uses AP mode and customers will want to set a password.  I'm also very close, < 2 months, to production and thought we were out of the woods on issues since we had good results over the last few months, but now this is going to slow us down.

    Thanks

    putty1.log
    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.08.03 19:38:03 =~=~=~=~=~=~=~=~=~=~=~=
    [WLAN EVENT] External Station connected to SimpleLink AP
    [WLAN EVENT] STA BSSID: 2c:f0:a2:10:79:ac
    [NETAPP EVENT] IPv4 leased 10.123.45.2 for device 2c:f0:a2:10:79:ac
    
    [WLAN EVENT] External Station disconnected from SimpleLink AP
    [WLAN EVENT] External Station connected to SimpleLink AP
    [WLAN EVENT] STA BSSID: 2c:f0:a2:10:79:ac
    [Link local task] Received OTA filename 20180803193036.tar, len = 348160 
    
    [OtaArchive_Init] OTA archive version = OTA_ARCHIVE_2.0.0.4
    [    OtaArchive_CheckVersion] current version str = 20180710205357, decimal = 2147483647
    [    OtaArchive_CheckVersion] new     version str = 20180803193036, decimal = 2147483647
    [    OtaArchive_CheckVersion] older version update - 20180803193036
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcubootinfo.bin, sig_len=0, SHA_256_Digets=ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed,  cert=, secured=1, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=0c6c7dd55c336490512807c7fcf6d5bd�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

  • Kristen,

    Any way we can get some movement on this?

    Thanks
  • Hi Andrew,

    That is an interesting issue.

    Just I want to summarize:
    - You are using MOD not a QFN version of CC3220? Right?
    - How often did you call sl_ API which writes into sFlash inside your code?
    - How many faulty boards do you have?
    - How is set calibration mode?
    - Do you see any errors from sl_ API or error event handlers?

    The first things that I thinking, for a elaborating...

    1. Flash memory with exceeded guaranteed number can do very strange things.
    2. In case of MOD is used very common issue is wrong paste reflow under module. In this case can be behaviour very odd. Proper solder join can be inspected by x-ray or the BGA inspection camera.
    3. In case of QFN is used, unstable fast clock can cause interoperability issue.
    4. In case of temperature is changed above (??°C now I can't remember exact number) it is done calibration of RF output. Results of calibration are written into sFlash. Issue with sFlash or RF path can cause failed of calibration. This could be monitored by event handlers.
    5. It is device used in normal radiation environment? Ionizing radiation affect drastically degrade flash memories, especially serial flashs (as is used as sFlash)

    ... but if you don't have capability to debug or use even UART, I think it will be very cruel determine reason of fault(s).

    Jan

    1. Module
    2. I only write to flash when a user changes user parameters which are not being changed in this case because you can't even get to the web page
    3. Module
    4. RF appears to be working fine as there is good signal strength and the SSID is always broadcast.
    5. Calibration is set to automatic
    6. I don't see any errors

    • Flash memory writes per day is minimal.  Only when user changes a parameter.  They don't interact with the device that often anyway
    • The part behaves just fine in every other aspect.  I just find it interesting that a 3x3 pcb will have this issue for hours even after cooling back down to room temp (I verified with a thermocouple bonded to the board).  It takes hours of being powered down it seems for it to snap out of it.  Simply cycling power does nothing.
    • Normal radiation environment.  

    I can debug now, I just warm the board up with a heat gun and monitor the temperature with a thermocouple.  Its more of a waiting game than anything...

  • Hi,

    If I should tip, for me it look like reflow issue. Can you check soldering somehow? How many faulty boards do you have?

    Jan
  • It’s not reflow. 2 boards do it and setting it from wpa to open makes it go away. Then back to wpa it starts doing it.
  • Hi,

    OK, another option can be problem with sFlash. In case if you set security to WPA, this password is stored into file in sFlash. Maybe sectors where is stored this file is damaged.

    You can try create new image with different size (e.g. without SP, with user files, etc.). This should relocate file with password to another sector. And try reproduce a issue...

    Jan
  • Simply changing the WPA password would have fixed this and I tried that and it did not help. One of the two units wasn't even in the field. It was just riding around in the car and got warm in the car when it as off. The only reason I caught it was because I powered it up quick to check on something and noticed the behavior. If there is flash corruption issues then we have memory specification issues because there is no way this device is getting above 85C in the field or in a car. I seem to be one of the few people using AP mode exclusively and have come across other issues that were addressed by updating to the latest SP. In this case, I'm using the latest SP. I'll grab a third unit, but I'm almost certain it will do it as well.

    I wish someone at TI would review the NWP log as there is probably some valuable information in there.
  • Hi,

    OK, it make sense. I haven't any other idea. Please wait for answer from TI.

    Jan
  • This appears to not really be a temperature level issue, but more of temperature slew rate issue.  I the pcb is only at 40-50C but this time when it failed it was being warmed up by the power dissipation of another IC on the board.  I tried this on two completely different units.  If I turn off WPA and make it an open network, everything works fine again.

  • TI Folks - This is for one of my customers...

    This may help, or it may not:

    While this is the customer's own board he is 2/2 on the issue - in other words - the problem seems to be consistent. They are even from different batches.  I don’t think it’s soldering because if you put it in open mode rather than wpa, the problem goes away.  If you put it back in wpa security the problem comes back.  Then if you let it sit for 8hrs off it works again in wpa.  If you let it sit for just an hour or two off, the problem still persists.

    Seems to be some odd refresh issue. Thanks for helping out.

    Mark

  • Hi all,

    Sorry about the delay in responding, I am asking around the team about this issue. I will get back asap.

    Best regards,
    Kristen
  • Kristin,

    I've attached a NWP log from a cc3220 launchpad that I got the issue to happen.

    I worked more with this yesterday and here is what I can tell you.  I've tried two iOS devices now.  An iPad (iOS 8.4) and an iPhone SE (iOS 11.4.1) and they both cause the issue on my hardware and TI hardware.  There are some robustness issues with the cc3220 not always reporting connect and disconnect events out the terminal.  It just doesn't always report them.  Sometimes it missed a disconnect and does report the next connect event for example.  I think this is related somehow.  I can connect and disconnect several times and then randomly the dhcp negotiation seems to get confused.  Upon connection the phone will have an IP and then 10 seconds later it no longer does.  At some point, ~8+ hours later, the devices seem to snap out of it and can connect again for a few times and then it begins to randomly fail again.  Cycling power does not fix the issue.  I see this same behavior on the cc3220 launchpad dev kit running my code even at room temperature now.  Keep in mind I'm running just a modified version of the out of box demo and haven't touched a lot other than added an extra thread and extra http get and post responses.  I've searched the forums quite a bit and I just don't see anyone really using Access Point mode with WPA password enabled.  This makes me question how much it has been tested.  I think most customers provision their device immediately and it operates in station mode from then on.  They probably never use the Access Point WPA security functionality.  I even completely wiped the iPhone putting a brand new factory default image on it.  It immediately started having the problem again after a few connection iterations.

    Here is my procedure to causing the failure.  Put the device in AP mode and enable WPA.  Connect to the device and wait for the spinner on the phone to turn to a check mark.  Then disable WiFi to disconnect, then re-enable WiFI and connect to the cc3220 again.  Wait 15-20 seconds after the checkbox shows up before disconnecting again.  This wait step is critical as it takes ~10-15 seconds for the phone to lose the IP and then go into this continuous loop for DHCP Discover and Ack requests as shown by the wireshark log I included earlier.  Placing the device back into OPEN network mode makes the issue go away, but returning back to WPA makes it immediately happen again.  "Forgetting" the network in the phone or changing the password on the cc3220 does not help either.  Performing a "renew" on the phone does not help either.

    I've also noticed that sometimes I get a [NETAPP EVENT] Unexpected event [0x3] in the console output.  I'm not sure what triggers that and it could be unrelated, but I thought I would mention it.

    Is there anyway to speak to someone offline about this rather than through this forum?  Mark is out for the next week and I don't really have a reliable alternative contact with him being gone.  This is a big issue and a WPA is a major necessary requirement and has the project at a screeching halt

     

    nwp log.zip

  • Hi Andrew,

    1) Just to clarify, are you using WPA or WPA2? WPA is deprecated, and using it could potentially be causing some of the issues you are seeing.

    2) Have you seen this behavior exclusively with iOS devices? Have you tested this with Android devices?

    3) Can you reproduce this behavior with the out of box demo unmodified? So we can have a method to test this ourselves without the additional changes you added. 

    Also, the forum is managed by a team, and from a support perspective it is easier for us to manage rather than email. You'll be able to get better support through the forum.

    Best regards,
    Kristen

  • 1). I'm using sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SECURITY_TYPE, 1, (uint8_t *)& value); and passing it either a 0 or a 2. All the phone asks me for is a password so I'm assuming it is using WPA2 as both devices . I'm pretty sure WPA2 was fully adopted around 2006 and all the test devices are much newer than that.

    2). It is usually an iOS device that is the first to do it, but one time an android device wouldn't even connect after the iOS devices wouldn't. I had one field report of an android device doing it, but I wasn't there. It seems to be a bit random as far as the symptoms go. Sometimes it will be one device and it will have the issue with ANY cc3220 device and then other times it will be multiple devices with just one cc3220 device. I hate the fact that I can't give you better information, but that is all I've been able to gather. It also takes quite a bit of patience and persistence to get it to happen as it doesn't always happen immediately so you have to really exercise it.  It is also strange that sometimes it will prompt me to re-enter the WPA2 password.

    3). I haven't tried yet, but was working toward that direction. As an alternative, my code will run on a launchpad so I could send it to you if it comes down to it.

    Has anyone had a chance to examine the NWP log file? I'm hoping that has some revealing information in it and might take the discussion in the right direction.

  • Kristen,

    After my previous post I loaded the stock out of box demo. It was from the 1.5SDK, but I did modify the uniflash image to include the latest Service Pack (sp_3.8.0.3_2.0.0.0_2.2.0.6.bin). I proceeded to put it into AP mode by pushing the switch on the side of the demo kit. I then connected to it numerous times with no success. However, once I grabbed a hair dryer, don't judge :-)... only because that was closer rather than my heat gun. I applied heat to the board, the issue immediately happened. I know it did not get very hot because the processor wasn't even that hot to the touch, so I know we didn't exceed 85C. Believe me I have touched countless hot ICs in my career and my finger has become a halfway decent thermometer.

    So I think this could serve as a starting point. I honestly believe this is a network processor issue. I think it has something to do with temperature changing.

    I then tried a second time and on the "heat up" phase it didn't phase, but it did when I put the dryer in "cool" to cool the board down rapidly. The third time it did happened on the heat up. This time I also tried to connect with the android phone after this happened and it said "authentication problem" and would not connect no matter what. However, the iPhone would have the spinner going next to the network and after 1-2min, it would get an IP and I could still access the onboard demo webpage. This might be another clue as to what is going on and why this only happens with WPA password protection turned on and then if you turn it off, the device functions normal again.

    As a tip to get around having to push the button on the side after every power cycle to get the launchpad out of provisioning mode for out of box demo, you can add the following code below DisplayBanner(APPLICATION_NAME, APPLICATION_VERSION); call.

    /* set AP mode regardless of the current mode */
    RetVal = sl_WlanSetMode(ROLE_AP);

    /* Check if switching to AP command is successful */
    if (RetVal == 0)
    {
    UART_PRINT("Signal AP mode --> provisioning task (normally done by SW2 handler)\n\r");

    /* indicate AP role on OCP register */
    ocpRegVal = MAP_PRCMOCRRegisterRead(OCP_REGISTER_INDEX);
    ocpRegVal |= (1<<OCP_REGISTER_OFFSET);
    MAP_PRCMOCRRegisterWrite(OCP_REGISTER_INDEX, ocpRegVal);
    }
  • Hi Andrew,

    Unfortunately we do not have a test setup in our lab to reproduce the heating issues. Could you possibly reproduce your test in a more controlled setup so we could know the actual temperature of the device along with the rates of the temperature change?

    It's a possibility that the calibration of the device is being affecting by the rapid temperature changes - we are looking more into this. Also, we are still looking through your logs you provided for more insight.

    Best regards,
    Kristen
  • Kristin,

    So you don't or can't get a hair dryer and a launch-xl board together or you haven't been able to reproduce it?

    I can try to mount a thermocouple directly to the module somehow under the shield can to get a better idea of the temp rise and rate.  I'm curious as to how WPA and calibration are related though?

    Thanks for the reply!

  • Kristin,

    I did more testing.  I turned the calibration to "one time" and it did not seem to improve things.  Also, I don't think this is just limited to temperature changes.  Temperature changes do seem to make it happen faster, but I can get it to happen without heating the board.  It takes many more connect/disconnects, but it does happen eventually.  I even got it to happen on a cc3220-launchxl board yesterday running the out of box demo and the latest service pack.  I've probably stumbled into it sooner because our custom board has a power supply on it that can dissipate 2-3 watts into the pcb and warm it up relatively quickly. 

    I would also like to emphasize that android phones seem be very difficult in getting this to happen.  I also observe that when using Android devices, the cc3220 ALWAYS report connect and disconnects, where iOS devices seem to get missed from time to time.  Might be another clue

    [WLAN EVENT] External Station connected to SimpleLink AP
    [WLAN EVENT] STA BSSID: xx:xx:xx:xx:xxcxx

    [WLAN EVENT] External Station disconnected from SimpleLink AP

    I still think in the end there is some fragility with the WPA turned on in AP mode.

  • Hi Andrew,

    Thanks for sharing all the above details.  From your latest response it seems like this issue still exists even with constant ambient temperature within the temp specs for this device. In order to simplify things, let's make sure we are on the same page in terms of the setup.  A few things:

    • I suggest we remove temperature variations from the setup for now.  This is adding another extra variable that doesn't seem to be needed to reproduce the problem.  Also, this can quickly complicate things because the RF performance of the device is dependent on the calibration (see section 3.8 Calibrations in linked programmer's guide below).  With the heat gun setup you mentioned, this doesn't seem like a valid use case since this will rapidly change the device temperature--perhaps faster than the time it takes to re calibrate.
    • It would be most helpful if you could recapture the nwp +wi-fi sniffer logs using the CC3220 launchpad, running OOB example, and calibration mode set to normal.

    I'll also let you know if we manage to reproduce it here.

  • Austin,

    I'll work on the network logs and wire shark capture using OOB demo. I think I'm going to take a few videos to show what is going on. It would not surprise me if there are multiple issues with similar symptoms given some of the erratic behavior I've seen.

    Fair enough on the temperature issue for now.

    You will have to be patient. It can take a lot of tries. This is why I added the temperature component because it was happening frequently when the units were out on hot days.

    Here is how I do it... I set up WPA and a password in the settings.html page and reboot. I connect and wait for the check mark next to the network name and then turn wifi off. Then turn it back on and connect. I do this until it happens. I do take a pause every 5 connections or so for 10-20 seconds because when the issue happens, you do get the check mark for 5-10 seconds and then it disappears and goes to the spinner. I believe this is because iOS devices are trying to reuse the previous IP. Then something breaks down in the dhcp and it sits there and tries to get an IP and never does and 1-2min later it defaults back to the previous IP address. However mDNS name resolution doesn't work after that point, which is a big issue.
  • Austin,

    I've captured  the NWP log file, OOB Demo UART Output, and a Wireshark capture.

    The device was in normal calibration mode and it was using the latest service pack (sp_3.8.0.3_2.0.0.0_2.2.0.6.bin).  I was using OOB Demo on a cc3220launchxl board. To set the board up I pushed the switch to place it into AP mode and then went to settings.html to enter in a WPA password for AP mode.  I then rebooted the device and pushed the switch to place it back into AP mode.  I then connect and entered the WPA password.

    You can see it did not take very long to get it to happen.  When the failure happens, there are a whole bunch of DHCP discover and request transactions.  The only way to get this to clear up is to power cycle the board because the DHCP server ceases to hand out IPs.  I have never had this happen with it set to an open network.

    I've also included a video in the link below so you can see exactly what I am doing to induce the failure.  At 1:18 is where the problem happens.  You can see I connect it initially appears successful but 5 seconds later it goes into trying to obtaining an IP.

    https://youtu.be/B69VnDSGJPU

    Hopefully this is enough information for your team to work with and build some momentum on getting this resolved.

    capture files for OOB Demo.zip

  • Folks at TI,

    I've done more testing over the weekend, that is how much of a schedule crunch this is becoming, and it appears to also happen in OPEN network mode as well too. Once the DHCP locks up, devices resort to link local addressing.
  • Andrew,

    We are currently in the process of reviewing your logs, and I understand you are under a tight schedule so we will provide feedback as soon as we can.

    Best regards,
    Kristen
  • Kristen,

    I've been reviewing more wireshark logs as I play with this more and I do see an interesting pattern. I've noticed that sometimes there can be multiple dhcp_requests in a row, in a very short amount of time from the same device, but they are always followed by the same number of dhcp_aks. I find this strange, but I guess that is just how the mobile device behaves and the cc3220 just needs to deal with it. However, it seems the dhcp locks up whenever it doesn't follow up each dhcp request with an ack. When there is a failure, it seems like there is always two requests in this condition and it only acks one of them. So either the dhcp gave up before the the second dhcp_request or there is some race condition to me when multiple dhcp_requests happen.
  • Andrew,

    We have been looking more into this issue, and we were able to reproduce on our end using the out of box example. This issue is something we need to consult further with our R&D team, but unfortunately they are out of office through the end of the month and going into September.

    For now, I would suggest seeing if calling sl_NetAppStop() and sl_NetAppStart() works as a workaround. While the device is in AP mode and waiting to be provisioned, you could make periodic calls, maybe every 10 seconds or so, to stop and then start the network application.

    Best regards,
    Kristen
  • Kristen,

    This is good news that the issue is reproducible and I really appreciate you promptly testing.  However, I don't think I can do what you suggest.  We leave the device in AP mode all the time so calling stop and start will likely not work since we rely on reading the RTC of the network processor for other functionality and it would constantly interrupt communications to an already connected device.

    The only work around I see is to tell customers to assign static IP addresses, which is not even a good, temporary, solution.  People get confused too easily with all the numbers (subnet mask, gateway, etc) and they forget which IPs they have already used.  We are hoping to be shipping by the end of September and this problem will be a major black eye for the product because it will be viewed as very unreliable.  What I'll need from TI is some idea of how high of a priority this will become at TI and how soon we can get to a fix.  I do trust you are doing all that you can.  I know service packs take awhile to release due to regression testing all the other features plus all the documentation, so I'm not sure if I could get a special build with just this fixed to keep using going.  I'm probably getting a bit ahead of myself... I guess that is if it is going to get fixed?  I can't emphasize enough that if this does not get this resolved our product is dead in the water and significant dollars of investment will have been wasted and we will have to start over from scratch.  The financial implications for the company are very significant, so things are pretty tense right now and that might be an understatement...  :-(

    I will say the CC3220 is an amazing device so credit is due to those at TI who envisioned the device and the design team who made it happen.  I wish I could have resolved this earlier in the year when I was corresponding with Shlomi, but he was unable to reproduce it and I wasn't able to produce enough evidence to keep him looking into it.  So we just sort of went through standard motions of upgrading the service pack then wait and see.  Since then we scaled up the number of units being operated as well as adding more users and then this started to occur again and much more frequently.

    Thanks,

    Andrew

  • Hi Andrew,

    Just a quick comment... Kristen talks about restarting DHCP server by sl_NetAppStop/Start API not a restarting NWP itself by sl_Stop/Start. But I am not sure about this solution, whether there can not be problem in case of using multiple clients at AP. If cannot happens that DHCP server will assign same IP after restart (= this is only my speculation without any testing).

    But there could be a alternate way. You can disable DHCP server inside NWP and use your own DHCP server in application processor. DHCP server is not that hard for implementing. We use own simple DHCP server inside our wired product. And if I remember properly, our implementation took only a few days (not more that one week including testing).

    Update-1: I see another issue with workaround recommended by Kristen. It looks that APIs sl_NetAppStart/sl_NetAppStop are system persistent. It means this API are writing into sFlash. Often usage of this API can damage sFlash. One of the options can be disable system persistence by SL_DEVICE_GENERAL -> SL_DEVICE_GENERAL_PERSISTENT.


    Jan

  • Hi Jan,

    Yes, you are correct.  I misread what Kristen was suggesting.  I can look into it more.  Yes, writing to flash will be an issue.  So I set up most the settings in uniflash.  If I set disable persistence, then does that mean the uniflash settings for dhcp setup will no longer work and I'll have to set them up in code?

    I'm not sure we really want to undertake writing our own DHCP from scratch unless someone has an open source DHCP that we can start with.  The basic principle is straight forward and I see how you create the packet structure, but setting up udp port 67 and 68 properly and handling events seems tricky.

  • Hi Andrew,

    In case of that you disable persistence that sl_ API does not write into sFlash. But settings from sFlash is loaded. After NWP restart you will have same settings as you wrote by Uniflash. Disable persistence need to be set after every NWP reset.

    I thought about possibilities how detect issue with DHCP server and after that restart DHCP server. Maybe you could try this way:
    - in case of WLAN connect event (SL_WLAN_EVENT_STA_ADDED) starts timer with timeout lets say 5sec
    - in case of that you not get lease event (SL_NETAPP_EVENT_DHCPV4_LEASED) during this time, you can restart DHCP server

    Jan
  • Hi Jan,

    Sometimes clients don't go through the full DHCP process. I've observed this in wire shark many times. In fact, iOS is notorious for it. If the lease is still fresh, they just do a request and then get an ack from the dhcp and forego the discover and offer. I've also found that SL_WLAN_EVENT_STA_ADDED to be unreliable as well. It does not always detect disconnect events (I'm not sure how it is even doing since I see no way for it to know about a station disconnecting. They can probably get connect events from ARP, but see no way for disconnect ) Anyway because it didn't get the disconnect, it does not generate a connect event the next time.
  • Hi,

    Hmm... that is weird. SL_WLAN_EVENTs are tided with WLAN layer (802.11 layers = PHY+MAC of ISO/OSI). Even though ARP protocol works at MAC layer, it should not affect this events.

    Issue with missing disconnect STA event it seems familiar to me. At CC3100/C3200 is weird issue with 5 minute timeout when device is out of range ( e2e.ti.com/.../2009395 ). I am not sure, if this cannot be similar with CC3220.

    Jan
  • Kristin,

    I've attempted a hack that I thought would work, but it has a few issues.  First off, I discovered that sometimes the CC3220 reports the IP address of the station as 0.0.0.0 during the failure.  Great, I'll just restart the DHCP when I see that.  Well I found out that sometimes during the failure the CC3220 does not report the IP to be 0.0.0.0 and rather 10.123.45.x even though the phone says it has no IP.  So that isn't great help so again there appears to be another fragility issue. I've also noticed sometimes the CC3220 thinks the phone is still connected, when it clearly is not and it takes a 1-2min timeout for the cc3220 to figure that out.  Could be related?

    Another issue is when my code tries to restart the DHCP, the CPU locks up and triggers the watchdog to reset the processor.  :-(.  This code is running inside a task that runs off a hardware timer that runs at 5Hz, but this section of code runs every 10 seconds.  It is rate limited by timer_dhcp_counts.

    Also, how can I read back SL_DEVICE_GENERAL_PERSISTENT to see if I need to clear it on power-up?

           /*   AP DHCP HACK */
           // dev.ti.com/.../group___net_cfg.html
           if(timer_dhcp_counts == timer_dhcp_correction-1)
           {
               timer_dhcp_counts = 0;
    
               start_sta_index = 0;
               sta_info_len = sizeof(ApStaList);
               sl_NetCfgGet(SL_NETCFG_AP_STATIONS_INFO_LIST, &start_sta_index, &sta_info_len, (_u8 *)ApStaList);
               actual_num_sta = sta_info_len / sizeof(SlNetCfgStaInfo_t);
               UART_PRINT("\r\nNumber of Stations Connected = %d\r\n", actual_num_sta);
               for (i=0; i<actual_num_sta; i++)
               {
                   memset(&IP_BUF, 0, sizeof(IP_BUF));
                   SlNetCfgStaInfo_t *staInfo = &ApStaList[i];
                   UART_PRINT("    Station %d is connected\r\n", i);
                   UART_PRINT("    NAME: %s\r\n", staInfo->Name);
                   UART_PRINT("    MAC:  %02x:%02x:%02x:%02x:%02x:%02x\r\n", staInfo->MacAddr[0], staInfo->MacAddr[1], staInfo->MacAddr[2], staInfo->MacAddr[3], staInfo->MacAddr[4], staInfo->MacAddr[5]);
                   sprintf(IP_BUF, "%d.%d.%d.%d", (int)SL_IPV4_BYTE(staInfo->Ip,3), (int)SL_IPV4_BYTE(staInfo->Ip,2), (int)SL_IPV4_BYTE(staInfo->Ip,1), (int)SL_IPV4_BYTE(staInfo->Ip,0));
                   UART_PRINT("    IP_BUF:   %s\r\n", IP_BUF);
                   UART_PRINT("    IP:   %d.%d.%d.%d\r\n\r\n", (int)SL_IPV4_BYTE(staInfo->Ip,3), (int)SL_IPV4_BYTE(staInfo->Ip,2), (int)SL_IPV4_BYTE(staInfo->Ip,1), (int)SL_IPV4_BYTE(staInfo->Ip,0));
    
                   if (strcmp(IP_BUF, "0.0.0.0") == 0)
                   {
                       UART_PRINT("DHCP Lockup\r\n");
                       sl_NetAppStop(SL_NETAPP_DHCP_SERVER_ID);
                       sl_NetAppStart(SL_NETAPP_DHCP_SERVER_ID);
                   }
               }
           }
           else
           {
               timer_dhcp_counts++;
               //UART_PRINT("  Timer DHCP Counts %d\n", timer_dhcp_counts);
           }
           /*  END AP DHCP HACK */

  • Kristin,

    I have really bad news. Calling sl_NetAppStop(SL_NETAPP_DHCP_SERVER_ID); and then sl_NetAppStart(SL_NETAPP_DHCP_SERVER_ID); once the DHCP has locked up pretty much causes the CC3220 to completely lock up.  I can put inside a 2min timer the netappstart() and netappstop() and it will succeed every time up until the DHCP stops handing out IPs.  Then it crashes.  So this issue is pretty severe if I cannot even work around it.

    I don't think this is going to work as a temporary solution.  So at this point we are dead in the water...

  • Andrew,

    I'm sorry to hear that the workaround we suggested isn't working either. Unfortunately our R&D team is still out of office, and we do need to consult them on this issue. However, our team will continue to look into this to see if we can come up with a solution for you in the meantime.

    Best regards,
    Kristen
  • Jan,

    While I'm waiting for TI, I might as well try working toward a custom DHCP because everything is at a standstill here. I'm in a bit over my head. I understand what needs to be done and the packet structure for DHCP, discover, offer, request, ack. Where I'm lost is in all the intricacies of opening up a UDP port on 67 to listen to every packet on that port and setting up some sort of interrupt driven process to process the packets. I'll also have to send data out on 68 to the client, which will have to be unicast (255.255.255.255) .
  • Hi Andrew,

    Just wanted to give you an update that we are still looking into this issue, but at this point we are primarily gated by our R&D team. We will continue to post updates when we learn more.

    Best regards,
    Kristen
  • Kristin,

    Thank you for the update.  Do you have a more exact date on when you will be able to consult with the R&D team?  I'm trying to figure out how we can move forward on other things on our end.  We are gated by TI because we are sure how to move forward without, at the very minimum,some sort of commitment from TI that this is going to get fixed.

    Thanks

  • Kristin,

    Now that we are about a week into September. Is there any news or contact with the R&D team?

    Thanks
  • Hi Andrew,

    We'll be reaching out to you to take this discussion offline.

    For all other customers who may experience this same issue, we will update this thread when a solution has been provided.

    Best regards,
    Kristen
  • Hi Andrew,

    Maybe this topic can be interest to you: e2e.ti.com/.../2683164

    Jan
  • Hi Andrew,

    Would you mind sharing an email where we can reach you?

    Thanks!

  • Let me know if you got it. I've never used the private message system in this forum