Visualize the Achatz MWS micro webserver
When you open up the box and liberate the micro webserver from it's constraints, you need to do three things:
Out of the box, the MWS is set to IP address 192.168.168.123. It's a safe address since it belongs to the 192 range. But it's also a very non standard IP range. The majority of users is on 192.168.0 or 192.168.1 (sometimes even on '2'). The real nerds use their year of birth as the third numeral. But 168 as the third numeral is rather far fetched.
In IP land, you can only access the IP addresses that fit into your netmask. And 192.168.168.123 will not fit in. Try it out:
| Property | Value |
|---|---|
| IP range | 192.168.56.xxx |
| Netmask | 255.255.255.0 |
| Gateway | 192.168.56.99 |
| DHCP range | 100 - 199 |
The MWS just does not fit in the LAN I set up.
Make it visual: route
There are some solutions to solve this problem. One would be to recompile the program and re-upload it to the
MWS. But I have not yet completed that part of the project, so it is not feasible.
Another method is to extend the netmask from 255.255.255.0 to 255.255.0.0 (assuming your network is in the
192.168 range at all). I tried it, but it made my gateway invisible and only a reboot reset this problem.
The best way to solve this problem is to use the 'route' command as follows:
route add -net 192.168.168.0 netmask 255.255.255.0 dev eth0
Of course you need to be root to be able to execute this command. The very moment you have run this command,
the MWS becomes visible. It can be pinged and it can be visited by a any browser. Try it.
If you want this command to be carried out at each startup, you would best run it from /etc/rc.d/rc.local.
Make it visual: setip
Hey, we're FotP's, we have the luxury of free choice. So there ought to be a better way to do this. And there
is. On the CD-ROM is a directory similar to '/PWdev/src/bootp/' and there are lots of files there starting
with the letters 'setip'. There is 'setip.c', 'setip.exe' and there even is a file called 'setip'. This ought
to trigger Followers of the Penguin! A file without any extension might just as well be an executable.
An 'ls -lh setip' produced nothing useful. So I inspected the file with the midnight commander. And this
revealed a full ELF header. Fat chance this really IS an executable that lost it's file attributes in the
process of zipping.
Anyway, after the command 'chmod 755 setip' things were going rapid. As mentioned in the user manual, the MWS comes, factory default, as
| Type | Address |
|---|---|
| MAC | 0.1.2.3.4.5 |
| IP | 192.168.168.123 |
but I want it to be inside my own network mask. So I issue the command:
setip 0.1.2.3.4.5 192.168.56.2
and immediately the LED on the MWS board blinks as an acknowledgement. I issue a 'ping -c 2 helium' and the
LED blinks twice. Plus, this message is displayed:
jan@beryllium:~$ ping -c 2 helium PING helium.fruttenboel (192.168.56.2) 56(84) bytes of data. 64 bytes from helium.fruttenboel (192.168.56.2): icmp_seq=1 ttl=64 time=3.16 ms 64 bytes from helium.fruttenboel (192.168.56.2): icmp_seq=2 ttl=64 time=3.16 ms --- helium.fruttenboel ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 3.162/3.165/3.169/0.056 msso I think the MWS is inside my LAN now. Just to be sure, I entered 'helium' in the URL window of Mozilla. With the result as shown below:
You can download the file 'setip' via the Download section of this site.
Why Helium?
I used to have a computer called 'Helium' which also responded to 192.168.56.2 (a Pentium-I, at 90 MHz) but it got into troubles and has not been online since several years now. So the time was here to revive the name and IP address. MWS being a very lightweight webserver, it was the right device to assign the name Helium to. He is very light and safe (it will not burn, ever). An appropriate name for a lightweight product.
Page created on 24 September 2006 and
Page equipped with FroogleBuster technology