Hi all,

So, I'm trying to write the android side of a system that talks to a
bunch of embedded sensors, connected by ethernet. The embedded devices
don't have DHCP (unless I implement it...) and there's an elaborate
service-discovery thing going on, part of which needs the android
device to scan the subnet.

What I've found is that my code can scan the subnet the android device
is on (in this case 192.168.1.x), but it can't scan 172.27.1.x or
10.110.110.x  - any socket communication there just times out. I can
'scan' the IP address used by slashdot.org (216.34.181.45), so it can
get out of its subnet, it just doesn't want to go to any of the other
private subnets...

The Mac seems to be able to contact the embedded devices (and it has a
192.168.1.x address), but Android doesn't... Any thoughts ? I should
mention this is a real android tablet (a Herotab C8), not the
emulator.

The code is fairly straightforward:

  try
      {
      Socket s  = new Socket();
      addr              = new InetSocketAddress(address, _port);
      s.connect(addr, 50);

      if (s.isConnected())
          {
          ips.add(address);
          System.err.println("reached : "+address);
          s.close();
          }
      else
          {
          System.err.println("ignored : "+address);
          s.close();
          }
      }
      catch (Exception e)
          {}
     }


Cheers
   Simon

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to