Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get devices ip, which are on network
Qt 6.11 is out! See what's new in the release blog

Get devices ip, which are on network

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zondar
    wrote on last edited by
    #1

    Hello,

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

    Thanks in advance

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
      wrote on last edited by
      #2

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

      Dheerendra
      @Community Service
      Certified Qt Specialist
      https://www.pthinks.com

      1 Reply Last reply
      1
      • Z Offline
        Z Offline
        Zondar
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You might be interested by zeroconf/bonjour

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SysTech
            wrote on last edited by
            #5

            [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.

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
              wrote on last edited by
              #6

              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.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              https://www.pthinks.com

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved