Hi,
I established an TCP client-server communication with a WIZwiki-W7500P and PC, but the W7500P freezes after some time.
The WIZwiki is the client who connect on the server side (PC - Linux). The server sends 1000 bytes each 200 ms.
After transfer about 1 MB transferred the communication and the board freezes.
The client WIZwiki-W7500P code:
int main() {
int phy_link;
pc.printf("Wait a second...\r\n");
uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x00, 0x01, 0x02};
EthernetInterface eth;
eth.init(mac_addr); //Use DHCP
eth.connect();
do{
phy_link = eth.ethernet_link();
pc.printf("...");
wait(2);
}while(!phy_link);
printf("\r\n");
pc.printf("IP Address is %s\r\n", eth.getIPAddress());
TCPSocketConnection sock;
int ret = sock.connect("192.168.3.105", 8080);
char buffer[1024];
while (true) {
ret = sock.receive(buffer, sizeof(buffer));
pc.printf("Received from server: %d\n\r", ret);
}
sock.close();
eth.disconnect();
}
The server Linux:
while(1){
n = write(childfd, buf, 1000);
if (n < 0)
error("ERROR writing to socket");
usleep(1000*200);
}
Any idea? Does the W7500P IOP implements congestion control?
Environment: mbed
Best regards