Very, very basic web server + DHCP

I'm toying with an idea of a web server in a RS485 cable. Basically, few modern computers have serial ports, but everyone has an ethernet port.

My idea is to build a RS485 to Ethernet "cable" with an arduino interpreting the messages on the RS485 bus and populating a web page with them. This is not a general purpose web server; it's a very specific and limited web server.

I need to serve up four pages, two are static and two are input forms with 6-8 field each, and download a spreadsheet in CSV format. I have a sketch that does all this on an LCD screen; now I'm looking to interface it to a laptop or tablet.

The "cable" would have to have act DHCP master if a computer is plugged in. It would be ideal (and very cool) if it had a wifi AP interface as well as wired.

Is anyone aware of anything like this? I'm not really that familiar with the arduino universe; most of my embedded background is in custom systems and OpenWRT, and nothing like what I"m thinking. In that world, this would be handled by lighttpd+php and dnsmasq, but there's no room in an arduino for that.

I don't want to use USB, because that would require custom software on each and every platform, and my target audience uses everything from Android to Mac.

The only part of that which makes me pause is the reference to a DHCP 'master' (server?). It seems pretty unlikely to me that your device should be a DHCP server. Perhaps you meant that it would act as a DHCP client, which would be fine and is supported by the standard Ethernet library. If you expect to use a direct Ethernet connection and don't expect that the device you're connecting to will provide DHCP then you would probably be better off using link-local addressing with Zeroconf. That's how modern networked printers seem to work and their requirements seem very similar to yours.

Adding WiFi support could be done in several ways. You're obviously familiar with OpenWRT and that would seem to me like a sensible way to approach the Ethernet, web server, WiFi part of the problem - which leaves you needing a solution for the RS485 input. I would have thought that an Arduino with an RS485 interface on one side and Ethernet on the other side which simply handed the data over to your OpenWRT platform would be the easiest to get working. Alternatively you could try one of those Ethernet-to-WiFi dongles - I haven't tried to do anything clever with them, but I've used some in simple situations and they seem to work pretty well.

This is a mobile application. So I’m thinking that the laptop/tablet/etc connecting to this gadget would not have an IP address on that interface. Also, if the dongle is the DHCP server, then it can assign known IPs so that the laptop can find it. On more thought, it would also need to be a DNS server so that the client can type “MyControlPanel” into their browser and it will resolve to the correct IP. I really want this to be an “appliance”. I can add a MAX485 chip to the arduino or to an OpenWRT platform to get RS485 connectivity.

I’ll have to look up link-local addressing as I’m not familiar with that.

found this: http://gkaindl.com/software/arduino-ethernet/bonjour

So it looks like it's entirely doable, with a small daughterboard with a max485 chip. Now I need to get through my current project. :)