WiB - Web Server In A Box
Introduction
Did you realise that the website you could run a website off a server, built from scratch, soldering every separate component, with parts which cost under AU $100 from a local electronics store? Perhaps you have always wondered if you could even build a web server yourself, but not just some hardware or a virtual machine running Apache or IIS but a little tiny web server which draws almost now power and is something you have created yourself?
This whole project came about with a recent trip that I took to the local JayCar store. I usually stop by every few months whilst working on some home project (which I will leave for another day). Your local JayCar store is usually an odd little shop, filled with various electronic components combined with some very friendly and helpful staff. On this trip, I was looking for a universal remote component but stumbled upon their Web Server In A Box or WiB, this kit was created by JayCar from an article in Silicon Chip Australia.
Silicon Chip Magazine printed the original documentation for this project in their November 2009 edition. This was a great piece by Mauro Grassi and covered all of the things you need to know to get you started. Once his original 3 part article was printed JayCar created a kit quite quickly as interest grew. The Jay Car Kitincluded a slightly modified version of Grassi's Silicon Chip Article.
After buying the kit and taking it home, a friend of mine Maz and I quickly started the build, there were several issues encountered along the way, which are documented in section Silicon Chip Article. Once the build was completed, and some test content was being hosted, I decided to put some useful documentation about the project so anyone interested might not make any of the same mistakes as I did.
Many thanks goes out to the steady hands of Maz, who assisted in the original build, I doubt I could have done the surface mount ICs without his help. Everyone should go over and check out his new website located at http://maz.net.au
Now its been a while since I have started a project like this, especially one from scratch like this. I am amazed at how well it went, and it has renewed my interested in electrical projects.
As usual, if you decided to take any of my advice, and something goes wrong. Please don't try and blame me for it blowing up in your face, I am just not that interested. Having said that if there is any feedback in regards with what is on the site, please feel free to Contact Me
Uses for the WiB
Now the WiB isn't going to be the most fancy web server out there on the Internet. Remember, this is something that cost under AU $100, and has been built at home from scratch, and only contains a very simple processor.
So what can't it do? Well, it cannot run things like PHP, ASP, .NET or Perl, it doesn't have any support for server side scripting, well that isn't quite true. The WiB has some very basic CGI interfaces which allow your pages to interact with the various inputs that are on the device's PCB.
The question really shouldn't be, can I run complex languages like PHP etc, but what can the WiB do really well? Simply put, the WiB is a very secure static page providing web server. As there is no complex operating system, nor are there any complex software languages and environments running on it, the attack surface is quite small. This small attack surface makes it a very nice, very basic and easy to use secure file web server. there is a Security Warning to go with everything I have just said. This Security Warning should be read and understood.
By now you must be thing, what the hell could I do with this thing? Well remember when the web was simple? Do you remember the time of Geocities? Back then we have very powerful sites running on basically the same environment that the WiB provides, it was fine then, why shouldn't it be fine now? Hell, if you are reading this, then the WiB is functioning correctly.
Believe itor not, there are still some very good CMS systems which you can run on the WiB, I will try and keep a list of the ones which I have tried on my WiB below (it will be a short list for now).
- TiddlyWiki
- jQuery slideViewer
If you don't like any of the static CMS systems out there, then why not fire up Dreamweaver or plain old notepad and make a custom site just for you? Not only will it run on your web, but it will be a more personalised experience for you and your visitors.
Notes about the Silicon Chip Article
The documentation provided with the kit was certainly more than enough to get the project done. Of course you need to go to the "downloads" section of the Silicon Chip website to download the code to place on your WiB's SD Card so that it properly functions.
Once again, I am not attacking those involved in the kit, just pointing out some issues with the documentation.
1. SD Card Reader and FAT
The documentation doesn't cover if you can use micro SD cards with the provided adapter. There are a few hits to the reader that this might work, but I have been unable to to get this to work.
I have also had some issues with FAT and FAT32 support. I have noticed that you need to use the default allocation unit size, if you don't use the default, the server cannot ready the files on the card.
2. Resistors Counts
There is some conflict with the number of resistors included in the kit and the number that the documentation tells you are required. The documentation states that you need 2 110Ohm resistors, however the board requires 3 110Ohm resistors. The kit does include the correct number.
3. ICMP
There is some confusion about ICMP support. The download package from the website clearly says that there is no ICMP support, as does almost all of the documentation. Having said all of that, in one of the configuration files ICMP support is set to enabled, however it doesn't work. Whilst ICMP ping support would have been handy, it would have been nice if the documentation and configuration files were in sync.
Jay Car Kit
There were several things that needed to be mentioned about the JayCar kit, including:
1. The kit included 12 0 ohm Resistors to be used instead of plain wire.
There are 12 places that the documentation tells you to install some wire runs on the provided PCB, and whilst this was easily done (I had some wire in my tool kit), there was very little documentation telling you to use these resistors instead of plain wire. After spending 30 minutes cutting and soldering wire appropriately, we quickly discovered these resistors and decided to restart from scratch and unsolder everything we had done. It would have been very nice if the documentation included had pointed this out to the reader.
2. Case included wasn't complete.
Whilst I didn't use the case included with the kit, several things need stand out to me. These were issues I noticed with the kit but are probably a side effect of the original design.
a) The case included needed several extra mounting screw holes fitted nor were there any holes for the LED's to be pushed through on.
b) The case is pretty big compared with the very small PCB.
c) The case didn't have any method to push the sd card into the reader.
Conclusion
So to conclude, if you want a fun weekend, look at stopping at your local JayCar and getting a WiB kit!