8 years ago.

TCP connection between PC and LCP1768

Hello, I try to make a connection between my PC (client) and my LPC1768 (server). The program in the LPC 1768 is very simple:

EthernetInterface eth;
eth.init("192.168.1.17","255.255.255.0","192.168.1.1");
eth.connect();
TCPSocketServer server;
server.bind(6000);
server.listen();

When I try a ping with my PC (ip=192.168.1.16), no problem The program in the PC is written with Delphi and is also very simple:

  Client.Host := '192.168.1.17';
  Client.Port := 6000;
  Client.Connect;
  if Client.Connected then showmessage('Bingo');

I get the error: socket error n° 10061 Connexion refused

I have used Wireshark to snif ethernet and I get that: /media/uploads/michastro/p9.jpg

So, in fact I don't know where is my mistake, LPC1768 or PC. Any idea? Thanks

1 Answer

8 years ago.

I think in the server there is a server.accept(client); missing, like in the TCP Echo Server example here: https://developer.mbed.org/handbook/Socket