Turns out it has nothing to do with the hub or switch. One configuration is to connect directly to a laptop without a network, and that most of the time misses the first ACK, too. In production, the unit needs to operate on any given network, so I guess if there's a potential duplex problem I will just leave it set to half-duplex. There's no big press here for fast throughput, so that should not matter.
Once in a while it does transfer correctly. If I can figure out the critical variable, I bet the solution will be obvious. Chuck ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of JM Sent: Thursday, August 27, 2009 6:07 AM To: Mailing list for lwIP users Subject: RE: [lwip-users] TCP not sending initial ACK I'd try a switch anyway, although it's unlikely to fix your problem, but it's easy enough to try. I have not yet tried switching my micro to half duplex, so I can't say if that fixes the hub issue. I will say however that while I was trying to determine what was wrong, the most random things would drastically change how well or bad it worked. Enabling certain sections of debug, changing pbuf sizes, and even what server I was connecting to. My assumption is it was very sensitive to timing. Then again, you said only one packet fails, then it's ok. In my case, things were ok then communications completely broke down. At any rate, I wish you luck. --- On Wed, 8/26/09, Chuck Kuecker <[email protected]> wrote: From: Chuck Kuecker <[email protected]> Subject: RE: [lwip-users] TCP not sending initial ACK To: "Mailing list for lwIP users" <[email protected]> Date: Wednesday, August 26, 2009, 4:02 PM Premature celebration. I changed the processor's settings to half duplex, and have the identical results. It reliably does not ACK the first packet of the download. I've been using the hub for months now, and this is the first time it's been suspect. There has to be something different about how I handle TCP reception in this part of my code as compared to the other section, where I do TCP reception flawlessly, always. I've just got to find it. Chuck ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of JM Sent: Wednesday, August 26, 2009 12:03 PM To: Mailing list for lwIP users Subject: RE: [lwip-users] TCP not sending initial ACK It only took me 3 -4 weeks to figure this out, but if you're on a hub, try a switch. Apparently if your micro is in full duplex mode, a hub is a no-go. I'm using the LM driver and it works great for receiving lots of data, anyway. Take a look at the "Identification" field in the IP header for all packets going one direction. They should be sequential and incrementing. If there's a gap in the sequence, that means Wireshark isn't displaying a packet that was sent, either because your hardware or OS discarded it. I haven't tried half-duplex yet with the hub again. I'm assuming this would also fix your problem. --- On Wed, 8/26/09, Chuck Kuecker <[email protected]> wrote: From: Chuck Kuecker <[email protected]> Subject: RE: [lwip-users] TCP not sending initial ACK To: "Mailing list for lwIP users" <[email protected]> Date: Wednesday, August 26, 2009, 11:54 AM No, the LWIP timers are called from the main timer tick, and there are no other threads. This is how LWIP is set up for the Luminary driver library I am using, and it has always worked before. Wireshark shows no defective packets. Chuck -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, August 26, 2009 10:34 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] TCP not sending initial ACK Chuck Kuecker wrote: > > I've tried changing the frequency of LWIP interrupt handler calls, > both greatly slowing and speeding them up, with no apparent change in > behavior. > What exactly do you mean with "interrupt handler calls"? The timers? They should *not* be called from an interrupt level: the core code of lwIP may only be accessed from one context at a time! If you obeyed this rule and still have problems, have a look at wireshark packet traces and see if it reports errors in a packet. Also, have a look at the stats (turn them on in lwipopts.h if not already done) and find out whether there are packets dropped. Simon _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users <http://console.mxlogic.com/redir/?b3MWX3yrNJdZCXXzO9I07qIalf_BgY-F6lKnO fEizx9ks7wIo7c0Ak5Ewcw2gie416JX5PPhO0U2LRoGw1XEzoyuce3wMb-l72MjrG81I8yU7 5D060BI1owag2Mc6wOjEw2k0Uid791Yo0kOU7Q3PMav2ERtM67xk1DP9qtgUdt8fxAybKz8S uC6FSsbTK90f4aIxMm5Jy0F104I30yj34qRgc1EJ91x4nyXqiF0207bEcO0kmuL8QsER0syh 2Zw78BiWr0QM8AQto5MM0U70syDsgh9wkp3Me1Qgo130M9h4jaM55MCm6Uy8rew41X2pK_nK C-yYYqekn3tPpVyiNtKDNEn8lrxrW01Ilr-NnUDm9X3ONukajVs5gH0z1Lw09JeW9EVhdEFL EIzAkT63r31I5zihEwdbpVyiNtKDNEqnjh02h8b6y25pCy2DMgB0yq89gBemDCy0g4wadPYf DwedECSjqrXdTT4m3vT3v> _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users <http://console.mxlogic.com/redir/?5xUttxNdUSC-PtZNV4S03Jm5aD_OEuvkzaTbV 7Q9hMAGe3Mmc3C0ia2Qg6g189720zmZyVVEV0s1nWIlg0ZQhIhf671Mo5_azxo9JR40S4hs3 yPw30iS0Ig581o63gp9Qg1a0s96zAw-c0aps3W1VU5fxkqKU33MG0PVAJeEs6KA7MOh5ThAr fj3kXe5XT4w7y5mgUb2SN0kww2m1wh9xydqE60QmAwMybNtJ9kw103BQ6p0abfnAqekqweh8 xuM3AiFtdwqo4iqeI2Uo0s3wehjK88AMacxU70W8c0yMM9h4jaM55MCm6Uy8rew41X2pK_nK C-yYYqekn3tPpVyiNtKDNEn8lrxrW01Ilr-NnUDm9X3ONukajVs5gH0z1Lw09JeW9EVhdEFL EIzAkT63r31I5zihEwdbpVyiNtKDNEqnjh02h8b6y25pCy2DMgB0yq89gBemDCy0g4wadPYf DwedFCSjqrXdTT4m3vT3v> -----Inline Attachment Follows----- _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users <http://console.mxlogic.com/redir/?5xUttxNdUSC-PtZNV4S03fBitexm163v00s4R txxYGjB1SK7C9b5SWv6xK_nKC-yYYqekn3tPpVyiNtKDNEn8lrxrW01Ilr-NnUDm9X3ONuka jVs5gH0z1Lw09JeW9EVhdEFLEIzAkT63r31I5zihEwdbpVyiNtKDNEqnjh02h8b6y25pCy2D MgB0yq89gBemDCy0g4wadPYfDwedICSjqrXdTT4m3vT3v>
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
