• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » SimpleLink™ Wi-Fi® » Bugreport: CC3000 SP1.7: TCP connect() sometimes fails immediately after DHCP callback
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Bugreport: CC3000 SP1.7: TCP connect() sometimes fails immediately after DHCP callback

This question is answered
Johannes Overmann
Posted by Johannes Overmann
on Aug 15 2012 10:27 AM
Intellectual495 points

I am running this in an endless loop

  wlan_stop()
   wait for 1 s
   wlan_start(0)
   waiting for CONNECTED callback
   waiting for DHCP callback
      (fast connect is enabled, so this takes 1100-2100ms)
   create TCP socket
   connect()
   send()
   recv()
   closesocket()
   waiting for CAN_SHUT_DOWN callback (always takes 1000ms BTW. Why?)
   goto start 

a

The problem is that the connect() fails in roughly 1% of all cases for no apparent reason.

Tcpdump on the host reveals that the connect() statement sometimes issues no network pakets at all to the hosts (e.g. no TCP SYN, no ARP). The CC3000 then sits there and apparently waits for the connection to be accepted which of course never happens. Sometimes the ARP packet from the CC3000 and the correct ARP response from the host can be seen, but no TCP SYN pakets follow.

Packet loss on the network cannot explain this scenario as the CC3000 is then obliged to retransmit the connection request after a short (few seconds, rather than minues) timeout.

The above behavior is with the SP 1.7 firmware. With the old Firmware (SP1.5?) the erroneous behavior described above was reproducible in 100% of all cases, unless one was waiting for 2000ms after the DHCP callback manually, then it was still reproducible in 1% of the cases as described above.

Cheers,

Johannes

CC3000 bug CC3000HostDriver TCP connect()
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Pedro5084
    Posted by Pedro5084
    on Aug 16 2012 18:18 PM
    Intellectual2390 points

    Hi Johannes, 

    Are you catching any errors in case the socket API returns with a -1 value.  Could you share the code, I would like to reproduce.

    Pedro

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Johannes Overmann
    Posted by Johannes Overmann
    on Aug 17 2012 02:22 AM
    Intellectual495 points

    Hi Pedro,

    yes, I am catching all errors. The code above is pretty much what I am doing. 

    I must clarify what happens, since my description above is not really precise: 

    - In 99% (roughly) of all cases connect() works as expected after a wlan_stop()/wlan_start(0)/wait_for_DHCP_callback()

    - In the remaining 1% of all cases connect never returns and blocks indefinitely (for at least 15 minutes or so). This is while the remote server is perfectly up and running and accepting connections.

    The problem is that the CC3000 never sends any TCP SYN packets to the remote server, but the CC3000 waits for the connection to be established. Sometimes ARP packets are sent (as expected) and sometimes not even ARP packets are seen.

    To reproduce this just run wlan_stop()/wlan_start(0)/connect() in a tight loop as described above. You will find this loop always stops after 50-200 iterations.

    As a probably related issue you can try sending UDP packets after wlan_stop()/wlan_start(0): In 75% of all cases these will not be sent. In 25% of all cases the first packet and all following packets will get sent, but in the remaining 75% the first 10 tries to send a UDP packet will all consistently fail, which is when I give up (and reset the CC3000 again). 

    Cheers,

    Johannes

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alon Srednizki
    Posted by Alon Srednizki
    on Aug 21 2012 16:08 PM
    Expert3205 points

    Hi Johannes,

    Thanks for the input, we will look into it and update you.

    Thanks,
    Alon.S

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Caleb Lloyd
    Posted by Caleb Lloyd
    on Nov 13 2012 11:57 AM
    Prodigy10 points

    I can verify that I am also seeing the behavior that Johannes describes running Firmware Version 1.7. In some cases, the CC3000 will hang during connect() for one or more minutes and never send a SYN packet.  This problem will persist throughout a full MCU Reset / CC3000 INIT / Associate / DHCP sequence.  After retrying for some time, the problem will go away for a period of time, but then come back.

    Has this issue been verified by TI? Is there an ETA for a Firmware Release that is supposed to fix this?

    Thanks,
    Caleb

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alon Srednizki
    Posted by Alon Srednizki
    on Nov 14 2012 10:31 AM
    Verified Answer
    Verified by Abhijit Kumbhar
    Expert3205 points

    Hi Caleb,

    We have fixed this issue in our upcoming release.
    The release should be out this month.
    We will post a message in the forum once the new release is out.

    Thanks,
    Alon.S

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use