ESP2866 and java ServerSocket So I have an application that runs on the Arduino that passes info over serial.
I'm using a ESP2866 to make it wireless.

Arduino-&gt;Serial-&gt;Esp2866-&gt;SocketConn-&gt;JavaSocket-&gt;Console


I have a working java socket server, that I can connect to with other applications. (Java, c++, ext.) And even across the network.

I just cant seem to get my ESP2866 to connect.

Iv tried several ESP2866 units, no success. Iv tried updating the firmware on each, nope.

AT                      -&gt;  OK
AT+RST                  -&gt;  ready
AT+CWMODE=1             -&gt;  OK
AT+CWJAP="name","pass"  -&gt;  CONNECTED,GOTIP,OK
AT+CIPMUX=0             -&gt;  OK
AT+CIFSR                -&gt;  192.168.0.30
AT+CIPSTART="TCP","192.168.0.9","4160"  -&gt;  ERROR


The lack of debug info is... Aggravating.
Iv Seen other examples of this that worked. So whats the problem?

Additional info:

netstat -tulpn | grep 4160
tcp6       0      0 :::4160          :::*      LISTEN      23058/java   


(Edit 1:)Just tried restricting to IPV4 and rebinding the port. Nope. 

InetAddress localAddress = Inet4Address.getByAddress(new byte[]{(byte) 192,(byte) 168,0,9});
System.setProperty("java.net.preferIPv4Stack", "true");
ServerSocket listener = new ServerSocket(port,20,localAddress);
//...Code to make socket work.
The ESP trys to connect to port 4160, but the server is listing on port 20.