Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

find the right ip address on the network


  • Please log in to reply
8 replies to this topic

#1 ash

ash

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 16 July 2012 - 04:28 PM

I want my NP to automatically connect to a web server. Is there a way of doing some sort of dns lookup or a list of devices on the current network etc. Cheers, ash.

#2 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 16 July 2012 - 07:32 PM

As long as a valid DNS is in the ND+ network config DNS queries should be fine. Depends really, if your router assigns A records against local devices if DNS will work for a local machine, if your router doesn't (and most dont) then i would just set computer you want to connect to have a static IP address. If the service you want to connect to is on the net however DNS should work fine :) Nak.

#3 ash

ash

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 17 July 2012 - 08:52 AM

any examples of code on where i can get the list of devices attached to the network?

#4 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 17 July 2012 - 10:30 AM

Not really, why would you want to scan the network, you might be able to broadcast a ping or enumerate through subnet of ip's and ping each one in turn. But again why would you want? The simplest solution if you are only trying to communicate with a local machine on your lan is to set your local machine to have a static IP (if you are trying to connect to webserver it should have a static IP anyway otherwise your DNS entries will get screwed up with time), or you can set up a DNS server for your lan, set your ND dns server to the ip of your local DNS and resolve by DNS name. Nak.

#5 ash

ash

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 17 July 2012 - 11:16 AM

its for a commerical application where several of theses Ap's on power up with auto locate a server connect and process data. We are trying to limit the technician's just to fit these boxes and replace if faulty. i was hoping not to ping as it will be a long process on these AP boards.

#6 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 17 July 2012 - 01:33 PM

I was faced with a similar issue for a commercial product using the ND+, in the end i used the telnet server found in netmf toolbox to allow engineers to set the server name/ip via telnet before they connect the device into the network.

The other option, which although nicer from a hands free config point of view will make network admins cry if your devices are going into a managed network is to have the nd+ broadcast to the subnet its on, on a given port then have the server initiate a connection to the nd in response to the broadcast. Not much of an issue in most small networks, but in large segragated managed networks (i.e. all switches are cisco or juniper bits of kits and support VLANS etc.) broadcasts are often blocked at the switch level or not forwarded to the router etc.

For these reasons i decided to stick with SD cards and telent configuration, as if a device needs swapping out you just have to pop the SD out from the old device and into the new.

Nak.

#7 ash

ash

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 17 July 2012 - 02:17 PM

Thanks Nak. Looks like its not going to be possible. The network is small ish but there is no IT profesionals on site ha ha. The techs know how to use spanners and screwdrivers so changing a SD card might be a bit too much, lol.

#8 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 17 July 2012 - 02:55 PM

Heh We took the stance that if they can use a mobile phone and or digital camera they can manage ejecting a SD card and putting it back in the right way round ;) of course it depends how fond of "percussive maintenance" your engineers are... YMMV :P Our training consisted of "Shiny bits point down and away from you, if it doesn't just slide in your doing it wrong" Nak.

#9 ash

ash

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 17 July 2012 - 03:26 PM

LMAO, Cheers Nak B)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.