Products > Embedded Computing

How would you implement config with a browser?

(1/5) > >>

peter-h:
The old way was that the product got shipped with a bit of paper telling you to go to 192.168.1.1 (or 1.0 etc). This means you cannot use a normally configured laptop, configured for DHCP. You have to go Control Panel / Networks / Adapter Settings / TCP/IP v4 / and set the IP to the same subnet e.g. 192.168.1.10.

A better way is for the product to have a DHCP server. Then the laptop will just work. But you don't want a DHCP server running on something connected to a factory or office LAN because it will end up serving DHCPs to random devices when freshly connected, and possibly other problems. So such a mode would need a button held down at startup, or some such.

Is there another way which would work with a laptop without needing to reconfigure it? AIUI, ethernet devices fall back to some "don't have an IP" IP of 169.254.*.* Does this actually work? The chances are that both your product and the laptop will end up on the same one.

woofy:
I would let the device grab its IP from the network DHCP server. Shouldn't cause problems, the server will expire the IP anyway if its moved away. You can then configure it to the subnet of choice.
Don't forget a factory reset, or your customers WILL lose it at some point.

retiredfeline:
Let the device get a DHCP assigned address and also set a distinctive hostname in the DHCP request. Then allow a laptop on the same subnet to connect.

Nali reminded me that some equipment displayed the IP address obtained on the front panel, the HP Laserjet 4s for example.

nali:
The really old way to do it was to use ARP. Manually add an arp entry with <ip> & <mac> then ping that address. The network card would then see the incoming packets then pick out the IP address and start using it.

Zeroconf works but you'll still need a naming service unless you're displaying the IP adress on a LCD or something. We had a similiar requirement at my last company and they ended up using Apple's Bonjour. It wasn't me that did the s/w so I can't remember the reasoning but was probably the easiest "just works" option for Linux.

peter-h:
I agree re using some DHCP server on the LAN instead, and yes the board does have a clear hostname, but you now have to dig around in the router diagnostics to find the assigned DHCP address, which is a right PITA. There is no LCD displaying the IP.

In this case, is there some discovery mechanism, other than starting at the bottom of the subnet (what is the easy way to discover the subnet?) and polling every address up from there?

I think lots of people have been up this road before, starting from when the RJ45 was invented :) and most decided to just fix it at 192.168.1.1 or some such, and then the laptop owner has the hassle of reconfiguring the laptop.

There is actually a USB-accessible filesystem with a config.ini file and in there is an option to specify the IP allocated if there is no DHCP. So maybe that is the easiest route to document.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version