One common problems we've encountered while making home gateways (wireless access points) is how do you discover the silly thing?  Most solutions end up shipping a preconfigured IP address or hostname on the device, some people query the DHCP server and I've even heard of people using netmon!  :P

Each of these solutions has its own pro's and con's -- with a gateway its okay to have a user manual where is the preconfigured IP address.  The user just plugs in and uses their browser to navigate to for configuration.  Other solutions will give a preconfigured hostname so the end user will configure by going to http://hostname.    I think querying the DHCP server is totally acceptable, but my mom didnt send me to college to get that kind of answer ;)

Other solutions are to have a value burnt into the ROM/flash -- this either requires each device to be configured before it leaves the factory or for the device name to be built off something like a MAC address.  Nothing bad here, but it makes for slightly confusing documentation.  “go to http://device_XYZ.. XYZ can be found on a sticker on the back of the device”  its not bad, but its clunky and requires printing a little sticker.

My solution to this problem was to make a little discovery utility that uses UPNP's SSDP (service descovery protocol).  the idea here is when the device boots up it sends out a little UDP packet that announces its presence to the world.  Because both WindowsCE and WindowsXP come with UPNP implementations this wasnt that tricky to setup.  I've included a little sample in WindowsCE 5.0 in the directory %_WINCEROOT%\public\servers\oak\samples\upnp\discoverservice. This utility isnt exactally rocket science, in fact its kind of a joke.  All it does is broadcast a little GUID that corresponds to the service that it supports with a URL for a configration webpage (known as a presentation page).   You can find a little C# util that I wrote to listen for this here  -- please note that “My Network Places” will also listen for it if you've got UPNP installed on XP.

The idea of this util is that it would be included in a CD or something that would have an autorun.inf to launch it.  The user would plug in their totally nameless device, it would DHCP, and then it would begin broadcasting UPNP messages announcing its presence.  The XP utility would then pick up the announcment and give the option to configure the device.