# Xbee Wifi S6 TCP socket connection

**URL:** https://forums.digi.com/t/xbee-wifi-s6-tcp-socket-connection/13111
**Category:** XBee & XBee Gateway
**Tags:** wifi, tcp, tcp-sockets, tcp-serial-bridge, s6
**Created:** [June 10, 2014, 5:32am UTC](https://forums.digi.com/t/xbee-wifi-s6-tcp-socket-connection/13111 "2014-06-10T05:32:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tma0](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tma0](https://forums.digi.com/u/tma0)
#### Post date: [June 10, 2014, 5:32am UTC](https://forums.digi.com/t/xbee-wifi-s6-tcp-socket-connection/13111/1 "2014-06-10T05:32:19Z")

</div>

Hi, I’m using Xbee Wi-Fi S6 module in SPI mode as TCP server to connect devices which do not support UART or USB. TCP socket is opened and communication is passed to MCU. It works very well.

But problem is that some out-of-my-control applications do not use persistent TCP connection but for each request-response new socket is established (i.e. source port is incremented). To be even worser the new socket is being initialized before the first one finalization flow is ended.

The tcpdumped sequence is (#1=old, #2=new socket):

FIN (app#1) - SYN (app#2) - ACK (xbee#1) - ACK(app#1) - FIN(app#1) - ACK(xbee#1) - RST(xbee#2)

Is somehow possible fix this issue at Xbee side ? I suppose Xbee’s TCP stack can legally handle only one open socket.

Thanks

---

<div class="post-metadata">

### Author: ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)
#### Post date: [June 10, 2014, 10:35am UTC](https://forums.digi.com/t/xbee-wifi-s6-tcp-socket-connection/13111/2 "2014-06-10T10:35:54Z")

</div>

No it is not able to support two sockets at a time. You are going to need to fix this on the other side.
