Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHow do Nios-II handle IP address change during the TCP/IP connection?
Dear all, I have problem with changing IP address in the FPGA board. Here is my case, let say I have a FPGA board which is connected to PC. The PC sends a command to the FPGA that asks th...
Altera_Forum
Honored Contributor
15 years agoAh sorry, I didn't tell you before. What I'm trying to do is I want to change my Nios IP address by sending a command from PC.
So here is the step-by-step process that happen in my current system :- At first Nios obtains its IP address via DHCP
- Nios acts as a server and provides a TCP/IP connection. It does these TCP/IP connection initiation functions : creating socket, binding, listening, and selecting socket
- PC builds TCP/IP connection to Nios
- After the TCP/IP connection has been established, PC sends a command to Nios (via TCP/IP) that tells Nios to change its IP address. In this step, the new IP address that will be assigned to the Nios is determined by PC (the new IP address is also sent with the command).
- After sending the command, PC will close the TCP/IP connection (since Nios will use the new IP address, the previous TCP/IP connection will be broken)
- Nios change its IP address (using 'change_ip' function, static method)
- Nios repeat step no.2
- PC repeat step no.3 (of course, PC will call Nios using its new IP address)
- Nios sends a official notification to PC that it has changed its IP address correctly.