Visible to Intel only — GUID: otl1480437495152
Ixiasoft
Visible to Intel only — GUID: otl1480437495152
Ixiasoft
1.5.5. Interacting with the Nios II Simple Socket Server
The Nios II Console view displays a message with the default IP address as configured in simple_socket_server.h. If DHCP is enabled, the DHCP server-supplied IP address displays a message that indicates the DHCP client for the Ethernet interface acquires a DHCP IP address.
The message “Nios II Simple Socket Server starting up” displays when the NicheStack TCP/IP Stack is ready to accept commands.
After the NicheStack TCP/IP Stack is ready, you can start a telnet session to interact with the stack. To start a telnet session, follow these steps:
- From your operating system, open a command shell.
Note: On Windows, you can also use Run on the Start menu.
- Type the following command, specifying either the static IP address or the DHCP server-provided IP address:
telnet <IP address> 30
If the connection to port 30 on the development board is successful, the menu of available commands displays in a command window. When you enter commands at the command prompt, Ethernet sends the commands over the telnet connection to a task waiting on a socket for commands. The task responds to those commands by sending instructions to another task that manipulates the LED. Figure 7 shows the Nios II Simple Socket Server menu, along with entered commands 1, 2, 3, and Q.
Figure 8 shows the corresponding output that appears in the Nios II Console view.
To test the functionality of the Nios II Simple Socket Server, enter the following commands in the telnet session:
- Type <n> , where <n> is a number from one through nine, to change the LED's state on your board.
- Repeat step 1 several times, varying the number, to see the LED turn on and off.
- Type Q to terminate the test. The socket connection on the development board terminates and the telnet command exits.