I am trying to set up the FreeRTOS CLI Demo. When I try the YAT terminal to create a UDP Socket pair with port numbers 5000 and 5001, I get a prompt saying that the port is already in use.

Therefore I changed it to 10000 and 10001 with loopback. However, when I send a test command like ‘run-time-stats’, I get the message saying **" an existing connection was forcibly closed by the remote". **

Please let me know how to proceed.

Can you try using ports 10000 and 10001 on the Ethernet port, rather than the loopback. I don’t think loopback will work.

Changed it to “any” from “loopback”, still seems to be the same problem.

The recive port configured on FreeRTOS is:
/* The UDP port to use for incoming command inputs. The outgoing port is
set to ( configUDP_CLI_PORT_NUMBER + 1 ). */
#define configUDP_CLI_PORT_NUMBER 5001

The terminal settings looks like this:

Please let me know how to proceed.

Which project are you building?

I am trying: FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator

Ok - so that is using the Windows TCP stack (I think), not using the FreeRTOS+TCP stack, so what I said before about the loopback not working is probably wrong.

The remote port in YATT has to match the receive port in FreeRTOS. It looks like you set the remote port to 10000 and the receive port to 5001.

Also, when having issues that could be caused by security software such as a firewall you can try higher port numbers such as 60000.

Thank you. I will try with these changes.