Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12610 Discussions

Need alternative to ping to scan for an IP address in superloop mode

Altera_Forum
Honored Contributor II
988 Views

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...
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
300 Views

Isabel, 

 

I think network discovery is typically done using broadcast packets. Would that work for you? In other words, does the 3rd party provide any method for "discovery" using broadcast packets? 

 

Cheers, 

 

- slacker
0 Kudos
Reply