Altera_Forum
Honored Contributor
16 years agoNeed alternative to ping to scan for an IP address in superloop mode
Here is my problem...
I am running a Nios with the niche stack in superloop mode. We have a third-party board connected to our custom board, with which I am communicating via TCP commands (using the vendor-supplied API to communicate with their board). During our testing, we have noticed that the third party board can occasionally reset all of its settings, including the IP address. I am trying to implement code to recover from this, which would include scanning a range of IP addresses for the new board IP. However, unless I am mistaken (which is very possible since this is my first FPGA/Nios project), ping appears to be disabled in superloop mode. The niche stack is not very happy if I try to connect to and disconnect from more than 4 sockets in succession, even if I put fairly long delays in after each disconnect. So is there a good way to scan a range of IP addresses (i.e. 172.20.52.0 - 172.20.52.99) until I find the correct address without locking things up? Thanks, Isabel p.s. I cannot simply use the default IP address of the third-party board, as we are building multiple units and need the boards to be plug-and-play, so to speak. Just in case anyone was going to ask...