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.

CC3000 unable to maintain TCP connection

I have loaded the simplemail demo code and tried to run it without success. I can only get the first 2 or 3 transactions with smtp2go.com to complete successfully then I lose connection with the remote server. When I look at the transmissions with wireshark, I can see the connection establish, the first smtp2go data packets being transmitted by the remote and acknowledgement by my board. Then there is no further communication by my board which is pounded by the remote trying to get an acknowledgement of the last packet sent, which it does not receiver from my board so smtp2go declares the link to be lost and shuts down.

Are there some CC3000 timing issues being violated during this link establishment? 

BR

Peter

  • Hi Peter, 

    Do you have the sniffer logs? How did you find out the server is re-transmitting to the client? Could you also tell me if this is the app that was attached to the e2e forum, or downloaded from the wiki?

    Pedro 

  • Hi Pedro,

    I do have all the logs. Which format do you want me to send them to you?

    The code that I am running is the CCS v5.2 project code you sent me on the 23rd of June. I have not made any changes in the code other than the default addresses etc.

    I capture the data on a Mac using the AirPort in promiscuous mode and then filter the file for TCP transactions in wireshark which is where I am seeing smpt2go.com pounding on the CC3000 and not getting a reply.

    Peter

  • You can send it as pcap. I will try to reproduce the issue, and see if we can improve the behavior, where you able to see where the app was getting stuck, did you see if the socket was ok. 

    Pedro

  • Hi Pedro,

    I tried attaching the pcap files but I am getting a file type not allowed error. What else can I try?

    Peter

  • Zip them up into a single archive.

  • Here you go....

    Let me know if you need any more files.

    94EC38 is my AP and I reset it to no security for these tests.

    BR,

    Peter7206.Archive.zip

  • Hi Peter,

    I took a look at the logs, but there are many missing packets.

    I was able to analyze  the log:  "DumpLog 12-07-08 16nÇó22A.pcap", I noticed that the "HELO me" packet (sendSMTPCommand(smtpSocket, "HELO me", NULL, buf);)  which corresponds to packet #324  contains the data: "HELO ctxtest@essepnw.com". I see the same data in packet # 157 from "DumpLog 12-07-08 1513A.pcap". I wonder if your app is adding extra characters. Could you put a breakpoint on "sendSMTPCommand(smtpSocket, "HELO me", NULL, buf);" and then step in to see if that is what is passed to the "cmd" parameter. 

    On the rest of the logs you sent I did not see a lot of response from 207.58.142.213, maybe your sniffer is dropping packets. 

    Pedro 

  • Hi Pedro,

    Appended are the tests that I just ran to answer your questions. Bottom line, is the cmdBuf is always correct and the way I am determining that is by looking at sendLen being the correct value and cr lf being in the correct position. 

    I have never seen the code go past this step:

                sendSMTPCommand(smtpSocket, (char *)smtp_mail_from, from, buf);

    The string at smtp_mail_from is correct in the cmdBuf and from is correct also. The string is the correct length in memory and is terminated by cr lf.

    The same addresses have successfully worked on the same development machine through the same router both secure and unsecured.

    I have spent a lot of hours poking on this and it seems the problems are happening in the spi or host driver libraries. I have pretty much convinced myself that the demo code is correct.

    The gaps in the sniffer packets are sometimes from me stopping the code while debugging and I forgot to remove those sniffer packets from what I sent you. My bad. I can get you clean ones if you would like.

    Any thoughts on this would be most helpful. This e-mail demo is part of a proof-of-concept we are doing.

    Experiment 1:

    prior to sendSMTPCommand

    respBuf[78] = 220 smtp2go.com ......time/date stamp

    sendLen = 7

    cmdBuf = HELO me

    sendLen = 9

    cmdBuf = HELO me 0x0D 0x0A

    Experiment 2:

    prior to sendSMTPCommand

    respBuf[78] = 220 smtp2go.com ......time/date stamp

    sendLen = 24

    cmdBuf = HELO ctxtest@essepnw.com

    sendLen = 26

    cmdBuf = HELO ctxtest@essepnw.com 0x0D 0x0A

    Experiment 3:

    same process as Experiment 2 with e-mail address instead of me:

    After sending HELO ctxtest@essepnw.com 0x0D 0x0A

    the smtp2go.com server responded with:

    buf = 250 Ok.... etc.

    Next program step:

    sendSMTPCommand(smtpSocket, (char *)smtp_mail_from, from, buf);

    the smtp2go.com server responded with no repsonse

    no response and smtpErrorHandler triggered after timeout

    Experiment 4:

    used the same process as Experiment 3 using the cmd prompt on the same laptop used as the development host of the EXP5739 board. The router was the same. The results were successful.

    Peter