We have run some more tests using tcpdump on the Linode side to see if we can shed some light on the Arduino client connect problem. We ran these 3 tests all from the same network node.
i) Arduino connecting to Linode on port 8000 (reports a failure - connect times out)
17:05:24.569579 IP dyn-dial-mb-216-168-109-79.nexicom.net.34110 > li78-47.member
s.linode.com.8000: Flags , seq 1785336902, win 2048, options [mss 1400], length 0
17:05:24.569659 IP li78-47.members.linode.com.8000 > dyn-dial-mb-216-168-109-79.
nexicom.net.34110: Flags [S.], seq 3277542125, ack 1785336903, win 5840, options
[mss 1460], length 0
17:05:24.619341 IP dyn-dial-mb-216-168-109-79.nexicom.net.34110 > li78-47.member
s.linode.com.8000: Flags - , ack 1, win 2048, length 0
NOTE: very often the Arduino simply is unable to send any packets to the Linode (tcpdump sees no traffic) and we get the same result: a timeout. Very occasionally the Arduino will succeed and connect to port 8000. It is very much a hit an miss.
ii) Arduino connecting to Linode on port 80 (always succeeds - exactly same code with port number changed)
17:04:29.794894 IP dyn-dial-mb-216-168-109-79.nexicom.net.48786 > li78-47.member
s.linode.com.www: Flags , seq 1804884288, win 2048, options [mss 1400], length 0
17:04:29.794977 IP li78-47.members.linode.com.www > dyn-dial-mb-216-168-109-79.n
exicom.net.48786: Flags [S.], seq 2430990952, ack 1804884289, win 5840, options
[mss 1460], length 0
17:04:29.844972 IP dyn-dial-mb-216-168-109-79.nexicom.net.48786 > li78-47.member
s.linode.com.www: Flags - , ack 1, win 2048, length 0
iii) Linux test stub connection to Linode on port 8000 (always succeeds)
17:02:20.915522 IP dyn-dial-mb-216-168-109-79.nexicom.net.48676 > li78-47.member
s.linode.com.8000: Flags , seq 1900867220, win 14600, options [mss 1400,sackO
K,TS val 241846 ecr 0,nop,wscale 7], length 0
17:02:20.915646 IP li78-47.members.linode.com.8000 > dyn-dial-mb-216-168-109-79.
nexicom.net.48676: Flags [S.], seq 417864843, ack 1900867221, win 5792, options
[mss 1460,sackOK,TS val 295109769 ecr 241846,nop,wscale 5], length 0
17:02:20.966519 IP dyn-dial-mb-216-168-109-79.nexicom.net.48676 > li78-47.member
s.linode.com.8000: Flags - , ack 1, win 115, options [nop,nop,TS val 241898 ecr
295109769], length 0
As far as I can tell from the tcpdump the packet sequence is the same in all cases:
Arduino (or Linux node) -> Linode
[S.] Linode -> Arduino (or Linux node)
- Arduino (or Linux node) -> Linode
Interpacket timing looks very similar. The Linux test stub seems to send a slightly different packet.
~~What is going on here? Why does the Arduino always connect to port 80 on the Linode but almost always fails on port 8000? Why does the Linux test stub always connect to port 8000 from same network node? ~~
Any suggestions for further testing would be appreciated. Thanks in advance.
bob