This example demonstrates echo server functionality. Observe UART/Application output and wait until server address is resolved, singnaling that echo server running on the MCU is ready to be used. Connect to the server with Tera Term or any other terminal of your choice. Set Host: to either "echo-server-demo" or the IP address from UART/Application output, and use Port: "7". Write something into the terminal, and observe it being echoed back by the echo server.
- Authors : MikroE , ORYX EMBEDDED
- Version : 3.0.0
- Date : ${COPYRIGHT_YEAR}.
- Connect Ethernet cable to ETH connector on the right side of the board.
- Connect USB-C cable to USB-UART connector on the left side of the board.
We provide demo code for testing echo server functionality. For example to work, proper clock setup is needed. To create a setup with the adequate clock scheme, follow these steps:
- Click on Setups and select New.
- Select GCC ARM or RISC-V compiler and click on Advanced.
- From Redirect standard output to: drop down menu, select UART, and then click Save.
- Select Board you are using.
- Select your MCU and click on Advanced.
- Select Config scheme from drop down menu, it will have MCU_NAME_ETHERNET name.
- If you dont see MCU_NAME_ETHERNET scheme for your MCU then ETHERNET module is not supported.
- Click Save, then Next.
- Select desired display, and choose programmer/debugger tool.
- Click Finish.
- Program the MCU.
- In case of a setup with UART open Tools view (Ctrl + 7) and select UART Terminal. In case of setup with Application output, run debug and go straight to step 18.
- Click on Options and change Port to the one you are using.
- Furthemore, change Baud rate to 115200 bps.
- Press Configure.
- Click on Connect.
- Observe UART/Application output, and wait until host address is resovolved, signaling that Echo server is ready to be used.
- Open Tera Term or other terminal of you choice.
- Select TCP/IP.
- Set Host to "echo-server-demo", without quotes, or the IP address given in step 17.
- For Service: select Telnet.
- Set TCP port# to 7.
- Click "OK".
- Write "Hello World!" into the terminal and press Enter. Observe that the echo server running on the MCU will echo "Hello World!" back.