• Post Reply Bookmark Topic Watch Topic
  • New Topic

Find ip address of a device  RSS feed

 
Jhonny Moreira
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning

Right now, i have a doubt; i can't find the ip address of a device connected to my network. I tried using network interface, but only gives me the loopback address and my pc address; the code that i used is:


Also, i used PrintServiceLookup ,but the methods of that class doesn't give the ip address (the device is a card printer); the code that i used is:



Anyone has a different point of view or perspective to solve the issue?

Thanks in advance
 
Claude Moore
Ranch Hand
Posts: 924
9
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not understand well... Do you want to execute an ipscan and search for a particular device? I think you' better look for any free library which allows you to deal with DNS, DNS queries, SNMP and so on. First approach in your code will simply enumerate NICs onboard the host your program is running on;using Print service to lookup up a network printer and then try to retrieve its IP address...well, I don't know if it may be work, but seems a bit naive approach.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!