User manual
16
utxsize_c1 Sets the TX buffer size of the server socket. The larger the buffer the more memory is
used by the socket and the more efficient is the transfer. Default value is 1024 bytes. Note that
this value should not be made larger than 1460 for an Ethernet network (to avoid packets larger
than the link MTU).
For more information about TCPIP stack, please refer to Framework Help/TCP/IP Stack Libraries
Help in MPLAB Harmony documentation.
3 PP_tcpip_tcp_server[3]:
This configuration demonstrates creating an Internet server that uses the MPLAB Harmony TCP API
to create a TCP/IP echo server on port 9760.
Description:
To build this project, you must copy the project to the following location <install-dir>/apps/tcpip/ and
then open the PP_tcpip_server.X project in MPLAB X IDE.
<install-dir> if not changed by the user is: C:\microchip\harmony\vxxxxx
Where vxxxxx depends on which version of MPLAB Harmony is installed.
The demonstration does not offer any additional functionality through the serial port; however, the
current IP can be checked. As soon as a valid IP has been assigned through DHCP to the
demonstration, it is then ready to accept a TCP/IP connection on 9764. If DHCP is not available, the
device is assigned the IP 192.168.100.115. The demonstration will echo back everything it receives
along the connection. A USB cable can be connected to the micro-B USB connector on the bottom of
the PingPong. This will create a USB CDC device on the USB bus. To communicate with the
software, connect to this device though a standard terminal program and set the baud rate to 921,600
baud.
The application initializes the drivers, systems services, interrupts, and application in the function
SYS_Initialize() found inside the file system_init.c
The function SYS_Tasks(), found inside file system_tasks.c, maintains system services, Device
Drivers, Middleware & Other Libraries, and the application's state machine. It also runs USB HS
Driver Task Routine, and USB Device layer tasks routine.
The function APP_tasks() contains the state machine for the TCPIP stack.
For more information about TCP Module, please refer to Framework Help/TCP/IP Stack Libraries
Help/TCP Module in MPLAB Harmony documentation.