the example LEDSwitch Client for MCB2300 did not work correctly in my MCB2378 board.it can be ping,but i can not connect to it by TCPServer.
switch (protocol) { case TCP: socket_tcp = tcp_get_socket (TCP_TYPE_CLIENT, 0, 10, tcp_callback); if (socket_tcp != 0) { tcp_connect (socket_tcp, Rem_IP, PORT_NUM, 0);} break; while (1) { timer_poll (); main_TcpNet (); }
i checked and called tcp_get_state(socket_tcp); ,but it return TCP_STATE_SYN_SENT (value = 4)always.How can i do that return correctly value TCP_STATA_CONNECT?
do you remember how a TCP/IP connection is built?
1. server sends SYN 2. client returns ACK + SYN 3. server replies by ACK 4. connection established.
assuming the PC is the takes the initiative, you seem to be stuck at stage 3 - your server never replied with an ACK. Did you try to monitor the connection with a TCP sniffer?
Thanks your reply. Maybe it is a problem of firewall or Server AP. Could you tell me the demo code (LEDClient) is correct ? If the code is correct , I just only check my PC side.
I think that the demo code is correct.
uncheck "Use Cross-Module Optimization" box from options of project
Please check your LAN settings. The LEDswitch client/server examples are configured to Static IP in class C with network address: 192.168.0
If your network address is different, LEDswitch examples will not work because the packets will be routed out of your local LAN to internet.
Franc