11 Replies Latest reply on Nov 17, 2011 5:10 AM by EJP

    Please help: Get IP address of a remote device (wifi kit) from DHCP router

      Hi ppl,

      I am about to get the IP address for the wifi kit which is connected to the same router with my PC.
      I need to control my wifi kit through TCP client communication, but DHCP tends to assign new IP address to my wifi kit when connected to router.
      Hence, i wish to write a java function to trace the IP address before starts the communication.

      I am thinking to get the wifi kit's IP address based on the Hostname (name of the wifi shield):
      As below:

      InetAddress thatIp = InetAddress.getByName("Wiznet");
      System.out.println("IP E:"+thatIp.getHostAddress());

      But i don't think this is secure..

      I attempt to research for getting IP address with MAC..
      But have ambiguity on the result i found.

      It stating i have to get the ARP table from router but it is not a good approach.
      I have no luck for next finding on how retrieving the table with Java.

      Hereby hope to have your advise how can i get the ip address of my wifi kit in a more dynamic and secure method..
      is it using Hostname or MAC address or else...

      many thanks.