Background: I'm looking to program and sell (on the Mom & Pop circuit) some internet-enabled devices. They need to be pre-configured in-store by a non-techie. The device will come online with a DHCP address. I need to find it, send it customer-specific configuration changes, then wrap it up for the customer. The project manager knows that the target demographic will likely not want the hassle of making changes to the product after the initial config.

OK, so I have a device with an auto-IP that I need to SSH into. To my limitied knowledge, I can do this in two ways:
A.

  1. Ping-scan against the network (yuck)
  2. ARP the MACs for a very-specific manufacturer.
  3. Scan for a specific open port setup for unconfigured devices.

B.

  1. (Unconfigured target device is running multicast listener service)
  2. Send multicast message, asking for target's 'eth0' address.

After I know where it's at, my program will SSH in with a preconfigured key and send a config script.
I know how to do A not so much B, but I'm sure I can figure it out in an afternoon.
What do you recommend, DaniWeb?

"There's got to be a better way."

I just setup my second Yi Car Camera (see that on amazon.com or elsewhere) and at no point in the setup or use did I see any mention of IP configuration. You should explore their method of WiFi setup. The same thing happens with our Echo devices. Both devices have a common setup tool. Some app on a smart phone but neither required you to connect to a WiFi router first. This is how it's done today. I'm sure there are articles about this but here I'm writing that setup involving the IP addresses is a fading memory.

@rproffitt: The way I'd see doing that is setting up an ad-hoc Wifi network from the device that the app connects into. I think the Amazon Echo does that.