Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. Network

Network

Scheduled Pinned Locked Moved Android
sysadmintoolshelp
12 Posts 3 Posters 0 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.
  • M Midi_Mick

    I am looking for a command-utility that will tell me if a particular device is connected to the home network. (TV and Home Theatre in particular). These devices are not responding to a Ping, so that does not help. NMap does not find them either (not sure why), even with its most intense scan. Fing finds them OK, but only seems to be available in with a GUI, and I need to be able to capture the response in Tasker. They do also appear on my routers' "Attached Devices" pages. Note that my programming skills have deteriorated significantly over recent months due to my brain injury, so I am unable to write anything from scratch (Its taken me 5 days to even set up tasker to a point that would have taken me 2 hours a couple of years ago). If anyone is able to help, it would be very much appreciated.

    Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    Try net view, but I don't know if that is available in Android.

    M 2 Replies Last reply
    0
    • M Midi_Mick

      I am looking for a command-utility that will tell me if a particular device is connected to the home network. (TV and Home Theatre in particular). These devices are not responding to a Ping, so that does not help. NMap does not find them either (not sure why), even with its most intense scan. Fing finds them OK, but only seems to be available in with a GUI, and I need to be able to capture the response in Tasker. They do also appear on my routers' "Attached Devices" pages. Note that my programming skills have deteriorated significantly over recent months due to my brain injury, so I am unable to write anything from scratch (Its taken me 5 days to even set up tasker to a point that would have taken me 2 hours a couple of years ago). If anyone is able to help, it would be very much appreciated.

      Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #3

      Midi_Mick wrote:

      I am looking for a command-utility...

      For Android?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      M 1 Reply Last reply
      0
      • L Lost User

        Try net view, but I don't know if that is available in Android.

        M Offline
        M Offline
        Midi_Mick
        wrote on last edited by
        #4

        Thanks Richard - I'll take a look at that one when I wake up in the morning, and let you know how it goes.

        Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

        1 Reply Last reply
        0
        • D David Crow

          Midi_Mick wrote:

          I am looking for a command-utility...

          For Android?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          M Offline
          M Offline
          Midi_Mick
          wrote on last edited by
          #5

          Yes, for Android. The device I am using is a slightly older (but not too old) phone, which I have rooted and loaded Tasker and a Terminal Emulator on. It makes the thing like a cut-down Linux (which Android is based on, anyway). Tasker will happily run a Shell command, and capture both the stdout and stderr streams for me.

          Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

          D 1 Reply Last reply
          0
          • M Midi_Mick

            Yes, for Android. The device I am using is a slightly older (but not too old) phone, which I have rooted and loaded Tasker and a Terminal Emulator on. It makes the thing like a cut-down Linux (which Android is based on, anyway). Tasker will happily run a Shell command, and capture both the stdout and stderr streams for me.

            Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #6

            Midi_Mick wrote:

            ...and loaded Tasker

            This is the Tasker app that I use, but for completely different reasons. Is there another one out there?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            M 1 Reply Last reply
            0
            • D David Crow

              Midi_Mick wrote:

              ...and loaded Tasker

              This is the Tasker app that I use, but for completely different reasons. Is there another one out there?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              M Offline
              M Offline
              Midi_Mick
              wrote on last edited by
              #7

              That's the one - it can be an incredibly powerful tool, particularly when given superuser privileges. When creating an action, take a look at the "Code" option, and you will see "Shell Command". I also have a plugin for it (RM Plugin - designed primarily to control the RM series of IR blasters) that has a built-in mini server that will execute tasks when it receives a URL. That means I can utilise IFTTT to control just about anything. But it does not solve my problem - the IR remotes for the TV and the Home Theatre is just a power toggle, not separate On and Off. So I need to know if the device is already on or not so that when I say "Turn on the TV", it doesn't just send the signal and actually turn it off. Detecting its existence (or not) on the network will answer that question, so Tasker can decide whether or not to send the IR signal.

              Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

              D 1 Reply Last reply
              0
              • M Midi_Mick

                That's the one - it can be an incredibly powerful tool, particularly when given superuser privileges. When creating an action, take a look at the "Code" option, and you will see "Shell Command". I also have a plugin for it (RM Plugin - designed primarily to control the RM series of IR blasters) that has a built-in mini server that will execute tasks when it receives a URL. That means I can utilise IFTTT to control just about anything. But it does not solve my problem - the IR remotes for the TV and the Home Theatre is just a power toggle, not separate On and Off. So I need to know if the device is already on or not so that when I say "Turn on the TV", it doesn't just send the signal and actually turn it off. Detecting its existence (or not) on the network will answer that question, so Tasker can decide whether or not to send the IR signal.

                Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #8

                Midi_Mick wrote:

                That's the one...

                Have you considered asking here on how to capture the output of a shell command?

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                M 1 Reply Last reply
                0
                • D David Crow

                  Midi_Mick wrote:

                  That's the one...

                  Have you considered asking here on how to capture the output of a shell command?

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  M Offline
                  M Offline
                  Midi_Mick
                  wrote on last edited by
                  #9

                  I can already do that - what I need is the command that will get the info for me.

                  Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

                  D 1 Reply Last reply
                  0
                  • M Midi_Mick

                    I can already do that - what I need is the command that will get the info for me.

                    Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #10

                    As you previously indicated PING would not work, how about TRACERT?

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                    M 1 Reply Last reply
                    0
                    • D David Crow

                      As you previously indicated PING would not work, how about TRACERT?

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                      M Offline
                      M Offline
                      Midi_Mick
                      wrote on last edited by
                      #11

                      That was a good suggestion. TRACERT is Windows, but a bit of research gave me traceroute, which is the Linux equivalent. I needed BusyBox on the android device to get that command, and it works fine for the TV. However, for the Home Theatre, it finds it whether it is turned on or not. Very close, but note quite time for the cigar yet. I have a support request in with Fing - that seems to be the only program that is giving me the right answers - to see if there is any way of capturing its output. They do have an API available, and its not expensive - but I am concerned I no longer have the skills to use it to write the utility.

                      Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

                      1 Reply Last reply
                      0
                      • L Lost User

                        Try net view, but I don't know if that is available in Android.

                        M Offline
                        M Offline
                        Midi_Mick
                        wrote on last edited by
                        #12

                        No - not android. :( It looks like it might have to be the Fing API and write one. Wish me luck. I hope I still have that much skill (not confident though).

                        Cheers, Mick ------------------------------------------------ A programmer is a person who always checks both ways when crossing a one-way street.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups