Hello,
I'm trying to connect to my Arduino card via an C++/Qt application using QTcpSocket but I don't manage to connect.
void setup()
{
Ethernet.begin(mac,ip);
server.begin();
Serial.begin(9600);
}
void loop()
{
Client client = server.available();
if(client){
Serial.print("host connected");
}
}
Address and port for my Arduino are 192.168.200.231:10000
So my Qt code is just:
QTcpSocket sock;
...
sock->connectToHost(QHostAddress("192.168.200.231"),10000);
...
My application find well the host with signal "Host Found" but stay stucked after.
When I recall the same code, I have a message that notifies that it is already looking up or connecting/connected to the host.
But in my Arduino console, the message "host connected" never appears.
Am I doing something wrong ? Is it possible to use QTcpSocket to connect to the simple Ethernet Server ?
Thank you
Hervé