Question

I'm creating an embedded device (based on an RPi) which will connect to the local network. I would like this device to be able to configure the device via a web page (much the same as many routers).

I would like the user to type [http://my-device-config] (or some other fixed address) into the web browser and be sent to the config page without having to know the ip address of the device.

The steps the user would take are as follows:

  1. User plugs device into network/turns device on.
  2. User types 'config' address into browser and is taken to config page. (No network configuration/ip look up etc. required)

From research I believe Avahi (/Bonjour/Zeroconf) can make this possible, however I am unclear on the following points:

  1. Is Avahi the simplest way to do this?
  2. Will it work if my device is he only device on the local network running Avahi? (ie. no requirement for installing software on any other computers on the network).
  3. Will it work across platforms (osx/*nix/windows)?
  4. Will it work across browsers?

Thanks for any help/insight.

Was it helpful?

Solution

  1. It is the simplest and the most interoperable, but not sufficient for your case.
  2. Short answer is NO. Longer answer - usually Apple stuff comes with them on, Linux often comes with Avahin On, Windows world won't move finger unless you configure it so. But alternatives are even worse.
  3. In way, yes it will. Avahi is open-source implementation (read linux/bsd world), while Apple stuff has own proprietary thing (they started whole zeroconf story), and Windows world has own zeroconf implementation. You will also need that nobody uses .local domain within particular local network - there is certain non-zero probability that company-owned networks will have .local already populated by microsoft networking.
  4. Uhm, theoretically yes - Avahi is essentially low-scale DNS with few other low-level things made up. So if your system has DNS resolver and it can have plugin which pulls underneath Avahi client/server hooks - then browser should work Ok. For last few years I didn't have side effects with it on Linux machines with Firefox and other equipment in net (e.g. configuring printer via avahi-pointed web server on printer). Address for them looks like http://my-device.local or http://thatprinterfromfloor5.local i.e. whatever.local.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top