2024-04-04 12:07 PM
Hello,
I'm trying to find out why nx_tcp_client_socket_connect is returning 0x38. This error code is not listed in documentation. Because of this, there is no ARP packet being sent.
static VOID nx_app_thread_entry (ULONG thread_input)
{
UINT status;
status = nx_tcp_socket_create(&NetXDuoEthIpInstance, &client_socket, "Client Socket",
NX_IP_NORMAL, NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, 200,
NX_NULL, NX_NULL);
status = nx_tcp_client_socket_bind(&client_socket, 45450, NX_WAIT_FOREVER);
status = nx_tcp_client_socket_connect(&client_socket, IP_ADDRESS(192, 168, 15, 16), 45450, NX_IP_PERIODIC_RATE);
}
Solved! Go to Solution.
2024-06-11 07:17 AM
Hello @isaquesuzuki,
The nx_tcp_client_socket_connect function is returning the NX_NOT_CONNECTED error code (0x38). This error indicates that the socket is not connected, which can occur for various reasons, such as the server not being reachable, the specified port not listening for connections, or a network configuration issue preventing the connection.
Could you please verify the server's operational status, check the network configurations, and review the ARP behavior to ensure the IP address is resolved correctly?
With Regards,
2024-06-11 07:17 AM
Hello @isaquesuzuki,
The nx_tcp_client_socket_connect function is returning the NX_NOT_CONNECTED error code (0x38). This error indicates that the socket is not connected, which can occur for various reasons, such as the server not being reachable, the specified port not listening for connections, or a network configuration issue preventing the connection.
Could you please verify the server's operational status, check the network configurations, and review the ARP behavior to ensure the IP address is resolved correctly?
With Regards,