Get devices ip, which are on network



  • Hello,

    Is it possible to get ip address of all devices connected to my router?

    Thanks in advance



  • There is not direct way to get it. You need to you ping sweep mechanism to find this.



  • So I need to ping every ip to get some list of connected devices? I am working on app connecting to Rasberry Pi, but I don't want to write ip into some textinput.


  • Lifetime Qt Champion

    Hi,

    You might be interested by zeroconf/bonjour



  • [quote author="Zondar" date="1425155026"]So I need to ping every ip to get some list of connected devices? I am working on app connecting to Rasberry Pi, but I don't want to write ip into some textinput. [/quote]

    I could be wrong but the ping-sweep idea only works if all devices are setup to respond to ping. I wrote something like this a few years ago to try and locate an IP to serial converter on my LAN. Spent quite a while only to find out that device won't respond to ping. There was a way to UDP a broadcast request and have those kinds of devices respond.

    If you know that all the devices on the LAN will respond to ping then it does work. For more "silent" devices you might need to dig deeper.



  • You have few choices. Devices have to respond in some manner either through ping or some user written app has to respond. If this is not possible you need to make snmp query to your switch where all the devices are connected. For this switch has to support snmp.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.