Web Server On a Business Card 169
mollyhackit writes "We've seen tiny Web servers in the past, but rarely ones that are home-built. Here's a guide to building your own tiny web server with a footprint no larger than a business card. The design uses two major chips. One handles the SPI to MAC/PHY translation for the ethernet jack. The other chip is a PIC24F, which hosts a simple web server and reads files stored on a microSD card. All components run at a low 3.3 volts. Part of the compactness of the design comes from the PIC24F having programmable pins; only four jumper wires were needed. The single-sided SMD design is easy to manufacture at home. Part 1 covered many of the 24F's features and both posts have full code available."
If every a server was going to be slashdotted.... (Score:5, Funny)
If every a server was going to be slashdotted....
best first every! (Score:5, Funny)
best first every!
Re:If every a server was going to be slashdotted.. (Score:4, Funny)
I don't understand this obsession with making things smaller and smaller - I want my stuff to be bigger and bigger. For example, I have my web server inside an old Cray Y-MP shell (not with original hardware, mind you). Then again, I live in an old church and have plenty of room to spare...
Re: (Score:3, Funny)
Or a Cray-2 with little plastic fish floating around, but the Fluorinert would probably bankrupt you :-)
Re:If every a server was going to be slashdotted.. (Score:5, Funny)
Would that make them Cray-fish [wikipedia.org]?
Re:If every a server was going to be slashdotted.. (Score:4, Funny)
Re: (Score:2)
Debate (Score:4, Funny)
Geek 1: "I won't be satisfied until I need an electron microscope to see my web server!"
Geek 2: "I won't be satisfied until I need a crane to plug in my web server!"
Re: (Score:3, Funny)
Can you fit an ENIAC in that church?
Re:If every a server was going to be slashdotted.. (Score:4, Funny)
As big as a business card eh? (Score:4, Insightful)
I'm glad I don't have any 1cm thick business cards in my wallet.
Re:As big as a business card eh? (Score:4, Funny)
I don't have any 1cm thick business cards
Loser. I have hundreds!
Re:As big as a business card eh? (Score:5, Funny)
Is that a web server in your pocket sir, or are you just happy to see me?
Re:As big as a business card eh? (Score:5, Informative)
In fairness, he did say in the footprint of a business card.
Yes, it's not the overall dimensions of a business card, but it's a pretty damned tiny thing for a web server.
Cheers
Re:As big as a business card eh? (Score:4, Insightful)
Re:As big as a business card eh? (Score:5, Funny)
When I see a really good looking woman, I might want her. But, if the woman is really really good looking, I might say to myself "that's some really expensive pussy. Can I afford it?"
Having a web server built right into my wallet is very convenient. I can check the balance without taking my wallet out of my pants. Smoothness counts in such situations.
Re: (Score:2)
Re: (Score:2)
That explains having a web browser in your pants, but not a web server.
that explains it (Score:3, Informative)
That explains why I never get laid. I guess I need to get me one of these web servers right away!
Re:As big as a business card eh? (Score:5, Insightful)
Why? Because he could, obviously. He really needs no better reason than that.
Projects like this don't get done because the world is clamoring for a web server that has a foot print which is comparable to a business card. They get done because someone with the necessary skillset (or, who is developing the skillset) did it for practice/experience/fun. This is no different that the vast majority of open source projects -- someone did it because they wanted to.
Sure, it's not something which is likely sale-able. But, if you were interviewing someone to do work in a related area, and their "resume" included a little wee web server like this, you'd have no doubt but that he knows what the hell he's doing. In some ways (likely that you and I can't quite imagine) he likely has advanced the state of the art.
I know for a fact that I (and likely 90% or more of all Slashdotters) couldn't ever hope to do this. This isn't cool because of its utility, it's cool because it's novel, and, well, it's just plain old cool. That's the point.
Cheers
Re: (Score:2)
Re: (Score:2)
if i had some of these that where POE then i know places at locations i could hide them.. rather than be a webserver i would use it to run other services. could be useful to have a device which you plug in that would run and map the network connected to it.. then phone home and deliver results..
not that i would use it without permission - but rather something small and cheap i could put some place and let it monitor things and report back
Re: (Score:2)
why don't you build some then, afaict he has made the complete design available.
You may want to get the board made commercially if you don't fancy nasty chemical stuff but the build should be pretty easy.
It's Art - not Utility (Score:2)
I didn't ask why he did it. That answer is obvious. I asked what would the need be for actually using the device.
Ah, I see your problem. You're assuming utility.
There is none. The need for using the device is zero. It's not a toaster or a TV, it's a work of art. It exists merely to have people admire it.
A large percentage of elegant hacks and beautiful bits of mathematics exist for the same reason. Not because they fill some immediate need. Simply for the beauty of it.
Granted, someone somewhere down the line will usually figure out some practical application of some beautiful piece of abstract thought or a
Re: (Score:2)
There isn't really anything that difficult here, the TCP/IP stack and basic webserver code is afaict provided by microchip, I think they also provide some stuff for working with SD cards. The components are all in nice big packages.
Re: (Score:3, Insightful)
How about embedded or remote applications? HTTP is a very simple and widely implemented data exchange protocol that would be useful for a variety of tasks.
For example, the microcontroller could do other things such as data logging, save them to the SD card, and cough up the data on HTTP request. Many network attached devices (especially routers, printers and plotters) contain embedded web servers... why not something of your own creation?
I've considered installing a microcontroller in my car (which predates
Re: (Score:2)
Re:As big as a business card eh? (Score:4, Interesting)
My car was exactly 0 processors in it. It has an AM-only radio which doesn't work, making the fuel gauge the most advanced piece of functional electronic equipment in the entire vehicle.
For minimal impact, I would want it as small as possible with no moving parts. Using very little power is also a plus, since it would have to endure some pretty extreme environments (High humidity, High/Low temperatures) so it would go into a weatherproof enclosure - and heat becomes a concern.
Something like this project would cost me under $50 to build, be small enough to mount inside the engine compartment (shortens and simplifies sensor wiring, no modification to the interior) and use very little power (no dead battery).
I don't need a full PC to do the job, and such a thing would cost me at least $250 or so.
=Smidge=
Re: (Score:2)
You just might find it more economical, and better for your bottom line, to buy a car that's been built at some point in the last 30 years, then. Browse the classifieds in your local paper. It's almost certain that you'll find something which has a computer already, which does what you're looking to have it do, for under $10
Re: (Score:2, Interesting)
You ------------------>
The Point
Even if interfacing with a manufacturer's computer was simple (doubtful), and even if said computer did everything I wanted (highly unlikely, then again I never actually said what I'd be doing so how would you know?) I think I'd still come out ahead financially by rolling my own. Considering the car ('64 Rambler) was recently restored and insured as a classic it's not something I'd be driving enough to worry about gas prices.
Thanks for playing, though
Re: (Score:2, Insightful)
Re:As big as a business card eh? (Score:4, Funny)
Ah! A car metaphor! I didn't even plan that.
Re: (Score:2)
A pocket webserver, with replacable code thanks to the SDcard, would be ideal to get rid of the workstation, making the system easier to mantain (no dealings with OS errors) and repair (just switch a malfunctioning "web-card" with a new one, using the same SDm
Re:As big as a business card eh? (Score:4, Insightful)
You know... I realize we're a bunch of geeks here but, really...
This is the reason that I enjoy being geeky and, well, is why I am considered geeky. I hadn't seen that before and when I just read about it I was pretty much smiling like a little kid on Christmas morning. I have absolutely no need for something like that at this time. I probably don't have the patience to build it unless I had a need.
That doesn't matter to me.
It still made me smile, read the article, and imagine a small email gateway or something trivial for home use.
I suppose it is like that for most of us here on /. though so anything more and I'd be preaching to the choir which would be even sillier considering the percentage of people here who are even geekier than I and probably will build one.
Re: (Score:2)
Does it run on an hearing aid batteries?
If not, what's the size of the power brick?
Re: (Score:3, Informative)
Does it run on an hearing aid batteries?
I doubt it would run on hearing aid batteries. AA's would probablly work though. (this is just gut feeling though, check datasheets for more detailed info)
If not, what's the size of the power brick?
That probablly depends on what the person who built it had hanging arround.
Re: (Score:2)
The version posted in TFA doesn't. It's got a DC power connector in the picture. That said, according to TFA, it runs on 3.3V and there's some empty space on the PCB. You could use some of that dead space and solder on a cell connector for a CR2032 or CR2450 if you wanted. Using a CR2032 wouldn't give as much life as a 2450, but wouldn't change the outside dimensions of the device much, either (the 1cm thick is for the ethernet connector). The real question is how lon
1 battery a day will work for a mini spy sever (Score:2)
1 battery a day will work for a mini spy sever
Re: (Score:2)
Let me know when we can make a computer with a holographic interface the size of an American Express card.
We already have projectile weapons the size of key-fob garage door remotes.
Re: (Score:2)
That's not its feet. ;-)
Cheers
Re: (Score:2)
Wireless Connectivity (Score:2, Insightful)
Now if this could serve up pages wirelessly: hello future!
Re:Wireless Connectivity (Score:4, Interesting)
Re: (Score:2)
There's plenty of use for wired embedded devices, such as for sensors, where you may have many of them and don't want to be continously changing batteries. Add power-over-ethernet and this class of device is very useful for all sorts of embedded things where you don't want to have the device battery powered.
Re:Wireless Connectivity (Score:4, Funny)
Dunno.
Re: (Score:2)
I'm sure any smartphone could work well as a web server, and it would have wireless :) The only thing stopping this kind of future for the last few years (okay so mobile webservers are utterly pointless, but mobile browsing is extremely useful) seems to be greedy telcos.
Re: (Score:2)
Just a stab in the dark but it would seem likely to me that the very first uses of a mobile server this small would be phishing and malware dispensing. Human nature and all that...
Re: (Score:3, Interesting)
I haven't RTFA, but last time I saw an article like this it was for an extremely low power server, which only served a page once every 5 seconds or something crazy like that. Perhaps this server has a decent response time, but I'm assuming it will still be pathetic compared to a fully fledged server, or even just a mobile phone.
As for the malware angle, what do you mean? I don't see the benefit in carrying around a microserver when you have a legion of zombies at your disposal (as most malware authors proba
Re: (Score:2)
Making more zombies as you walk down the street being a fake access point or the likes. (That's what I was thinking at any rate when I typed the post.)
Sure it sounds cool.... (Score:3, Insightful)
Re:Sure it sounds cool.... (Score:5, Insightful)
The real point is an embedded webserver can be used to provide easy, simple access to some embedded device using software that is shipped as standard on any PC or any smart phone. There are other uses for things that can speak HTTP than serving huge content-rich web pages. This particular device might not be terribly useful on its own but that's not to say similar devices aren't. There are lots and lots of applications for embedded devices that can host a tiny server of some kind.
Re: (Score:2, Informative)
Indeed, that is exactly the point. Use this device to embed a web server in a larger device.
Here is another device that can serve web pages but is arguably even more useful [avnet.com] (and it is smaller). Instead of a PIC, it's a Virtex 4 FPGA with integrated PowerPC core. Obviously it runs Linux [jwhitham.org.uk], but more importantly, you can put extra hardware in the FPGA, connecting Linux software to whatever other hardware you wish to use. This is very flexible, since you probably won't need any other electronics to make your embe
Re: (Score:3, Insightful)
It's also $700 for the whole package. Even just the mini-module is $250.
The board in the article is small and cheap enough that you could put them in out-of-the-way places and abandon them.
Re: (Score:2)
And then if you don't need to add tat much capability, the Lantronix X-port [lantronix.com] modules are nice. Very handy when you want to add web functionality to something with a simple serial interface or simple i/o.
Re:Sure it sounds cool.... (Score:4, Informative)
that's ~$200 bucks and unless you need it to be pretty small, there are other Linux capable boards which can do more/easier. Think Gumstix for small or even eBox for larger but x86 based.
I think this /. thread is mostly about DIY, small, inexpensive, etc.
LoB
Re: (Score:3, Interesting)
For example, instead of developing some kind of special hardware, wiring and protocols to connect all the devices in your factory, you just run ethernet everywhere and slap one of these things on to all your machines. You then write a simple PERL script to fetch certain URIs from all the machines in the address range, storing performance da
Re:Sure it sounds cool.... (Score:5, Informative)
Add an RS-232 line or some Digital IO and you can now control your thermostat on your iPhone. Everything in your house could have a webserver. Setup a central polling computer using cURL and a MySQL database and track temperatures in every room of the house, or your refrigerator or ... anything in your house.
Get a digital or serial water meter and monitor water usage from the road. Toss in a valve and be able to remotely shut off the water to your house if you know you're going to be out of town for business longer than expected.
Smart Home devices are quite expensive and not very "open". A tinkerer could create their own smart home at the fraction of the cost.
As a controls engineer I can just imagine tracking the temp in every room of my house with respect to outside temp and setting up a sweet PID controller on my thermostat to control temps much better than a single temp sensor in a central location in the house. Toss some flappers into the air ducts and you could probably set up a house to keep a temp +-5 degrees throughout the entire house.
Re: (Score:2)
w/r/t smart home software, hope you've seen http://www.linuxmce.org./ [www.linuxmce.org] I've got a weak linuxmce setup in my home, and it's very nice. Someone with any money at all could have a badass system orders of magnitude cheaper than any other way.
Sure it sounds cool/hot. (Score:5, Funny)
"As a controls engineer I can just imagine tracking the temp in every room of my house with respect to outside temp and setting up a sweet PID controller on my thermostat to control temps much better than a single temp sensor in a central location in the house. Toss some flappers into the air ducts and you could probably set up a house to keep a temp +-5 degrees throughout the entire house."
Or I could buy a programmable thermostat that does all that.
Re: (Score:2)
A commercial device is nowhere near as flexible as a DIY. And it's not as fun.
Re: (Score:3, Insightful)
I have a programmable thermostat. It has 1 temp sensor located in the main hallway. This is no way indicative of temperature in my back bedroom or in the basement. There is no controls output for commercial HVAC duct flaps to direct flow.
The PID controller in it is on the 'safe' side. I'm sure the gain and phase margins are huge because you never know where it's going to be installed. They probably have quite a large hysteresis band to keep from always burning fuel. I could design a controller that was spec
Re: (Score:2)
Does it even do proper PID control? I have only ever seen on/off thermostats, but I haven't looked that much.
Re: (Score:3, Funny)
Probably not in the least. Probably just a on off with some built in hysteresis. Exactly the reason to do something like this.
Now... where did I put that Matlab 2008b CD. Simulink and XPC to control a 1700 sq.ft. house a bit over kill? :)
Re: (Score:2)
This is Slashdot, overkill is not an acceptable word when referring to tech.
Re: (Score:2)
I wouldn't have thought they would use anything as fancy as a PID controller. Just a simple on-off switching control with a reasonablly wide hystersis band so the heater isn't switching on and off all the time.
remote devices, intranet, control systems... (Score:2)
There's lots of applications for little http servers that have nothing to do with "websites".
Stick this server as the "upstream" of a wireless access point, and you've got a cheap throwdown local information server for a business without opening yourself up to wardrivers.
If you have a phone with a SD card and a camera, you can take some pictures then use this to post them on a LAN.
YOu can plug this in when your regular server is down for some reason.
If you're concerned about theft, something like this is ea
Re: (Score:2)
Stick this server as the "upstream" of a wireless access point, and you've got a cheap throwdown local information server for a business without opening yourself up to wardrivers.
Wouldn't a linksys WRTSL54GS (basically a wrt54g with a USB port) running openwrt and serving files off a USB stick be an easier and neater soloution?
Competing solutions isn't a problem... (Score:2)
Wouldn't a linksys WRTSL54GS (basically a wrt54g with a USB port) running openwrt and serving files off a USB stick be an easier and neater soloution?
It's a different solution, certainly. In a lot of circumstances it's superior, and if you have static files you wouldn't even need the USB port. On the other hand, if you already have the WAP (or WAPs), particularly if you've got multiple locations already set up and an existing inventory of devices...?
There are also existing mini-servers like the Gumstix devi
Re: (Score:2)
What i want to see is a webcam that snaps pictures (or video but probably getting too heavy for the PIC and t-flash card and this can host them. Would make a handy, cheap, and pseudo-throwaway security setup.
Re: (Score:2)
http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam [nslu2-linux.org]
Re: (Score:2)
That one would probably not be useful here, since it wouldn't have shared access to the flash card, but web cameras are definitely another application for this general type of webserver.
Re: (Score:2)
I wouldn't stick this in a server cage, but I most certainly would stick it in a small device or home-automation project where a full-sized computer is either not practical, or not feasible.
This kit is a very cheap, extensible platform that one can build upon. I could see these being used as front-ends for other PIC devices.
Re: (Score:2)
using that logic, why would you want a stove in your house when there's a professional cook and good food down the street at the restaurant? Believe it or not, there are many cases where only one or a couple of dozen users would hit a web server.
There might be a serial port device in a medical lab which would be much easier to check on if there was a small web server attached to the port. A school robotics class or even a home garage door position indicator. Would you want to slap and Alien box on any of th
Might be actually useful... (Score:2, Interesting)
I wonder. If these are cheap, small, low power and low heat, could one simply create a vast array of these then use one central server to direct each connection to one "server", with a traditional (LAMP etc) server taking up the excess if the number of units runs out?
Sounds like a holiday project for me...
Re: (Score:2)
If the plan would be to run the back-end on a medium-sized LAMP server and then distribute the load of serving the cached pages via an array of these things, then it could be a very interesting project indeed.
Let us know how it turns out.
Re:Might be actually useful... (Score:5, Funny)
This webserver would fit inside a medium sized LAMP...
Re: (Score:2)
Well, I think you just gave someone an idea for a nano/pico-ITX case mod project.
Re: (Score:2)
So, would that be a Beowulf cluster of these?
Layne
Small scale ethernet (Score:2)
There's quite a bit of small scale ethernet stuff available - my favorite chip at the moment for handling ethernet is Wiznet's tiny W5100 (or its bigger brother the W5300). These contain not only an ethernet MAC/PHY but a TCP offload engine, so your microcontroller can get on with whatever job it needs to and only deal with the higher levels of the protocol - meaning the software on your microcontroller can be simpler and spend more of its time dealing with whatever task you're using it for. The W5100 is in
Re: (Score:2)
The W5100 is in a 0.4mm pitch LQFP-80
If you like that chip you are either much better at soldering than me or can afford the cost and time of getting boards made commercially.
Complicated project for beginners... (Score:3, Informative)
There's a lot going on here and it sounds like a neat project, but I just hope that beginners aren't misled. This is a complicated project and there's a lot of separate skills which would all have to be learned at once: masking/etching PCBs, fine-pitch SMT soldering, lots of pieces of code that all have to play together right.
Just hoping that newbies will realize that there are simpler electronics projects [nerdkits.com] (relevant shameless plug) with much more instructional guidance they should start with before taking on something like this.
--
Hey code monkey... learn electronics! Powerful microcontroller kits for the digital generation. [nerdkits.com]
Re: (Score:2)
Re: (Score:3, Informative)
I would say start out simpler than you did. I started a self-directed Learn Electronics course - i.e what I did is get a pile of components and some breadboard, and do stuff with them to learn.
I started with transistors, resistors, diodes etc. - building logic gates and latches with bipolar transistors, building LED flashers from discrete components rather than a uC and code, then building simple switch mode power supplies to investigate inductors. I then started doing things with 74 series and 4000 series
Re: (Score:2)
Nice project! Two books to recommend for the beginner are:
Don Lancaster, "TTL Cookbook", Howard W. Sams and Co., Indianapolis, 1975, ISBN 0-672-21035-5
and his CMOS cookbook (also by Sams). They are old but will give one an excellent feel for how logic 'legos' can be glommed together.
Also his "Active Filter Cookbook" is great if you want to play with analog signals.
I started out with a perfboard, 9v battery, 7805, a pile of 74xx chips and actually learned enough to put a 6502 based computer board into prod
Re: (Score:2)
I wouldn't call the 1.27mm pitch of SOIC fine pitch. Getting the first couple of pads done can be a bit of a pain but after that it's pretty much as easy as DIP (yes dip is a wider pitch but the very large pads needed for a through hole pin mean the gaps aren't much wider)
But yeah in general I agree, this is a reasonablly high level project, especially if you want to make the PCB yourself.
Duh! (Score:2)
You should have IPv6 address and connectivity on them. China already is running out of IPv4 addresses for gods sake.
Well (Score:2)
I have made smaller (Score:2)
About 8 years ago I was running a webservers on a smartcard CPU's (both Javacard and Microsoft's discontinued .Net card). It's the size of the chip on that SIM card you use in your GSM phone (which is also a smartcard). Smaller and thinner than a US dime. These don't typically have ethernet ports but they do have USB.
XMas Lights - Similar Design Example (Score:2)
It was a little bigger than a business card - but was able to dim 32 channels of AC power for my lighting strands. I Used 2 of these board to control all the lights.
All the lighting commands were pumpted to via. UDP packets from my Linux server - it was a pretty impressive display!
Check it out at: http://www.bradgoodman.com/dimwatt [bradgoodman.com]
Re: (Score:2)
looks pretty promising but without schematics, firmware and other things to build it, the average geek isn't going to put all that effort into it. Maybe posting enough data for others to build might result in updates back to you where mods or improvements can be made.
again, nice work and it looks like a promising project people could try to build with more info.
LoB
Re: (Score:2)
Haven't only because my my initial rev. had a couple bugs (which required wires) and those changes haven't been made into the schematic.
Re: (Score:2)
nice, do you think your design would have any trouble running at 240V?
Re: (Score:2)
By that, I mean everything is rated at 240V (even the wires I happened to use). Since the current is the limiting factor in the components, going to 240 vs 120 would let you run with twice at power.
Could you imagine... (Score:4, Funny)
...a Rolidex Cluster of these?
Re:And this is news why? (Score:5, Informative)
So what does this one make it so special?
You can etch the board yourself and make it at home from parts.
Re:And this is news why? (Score:4, Funny)
"We've seen tiny Web servers in the past, but rarely ones that are home-built."
You couldn't even bother to read the first sentence of the summary?
Re: (Score:3, Insightful)
Re: (Score:2)
As a side scary note, image a tiny bit more power and a second Ethernet jack on this thing. Yo cold set it up to sit as a proxy for a real production web server adding a few lines of malicious JavaScript to any outgoing HTML page.
I don't think the PIC24 processor on this would have the power to do that at an acceptable speed.
Re: (Score:2)
Slashdot has a mostly male audience, but its denizens have aproximately the same ratio of gays to straights as non-nerd sites.
A server is a computer that serves web pages to your computer. A Troll [wikipedia.org] is someone who "posts controversial and irrelevant or off-topic messages in an online community, such as an online discussion forum or chat room, with the intention of provoking other users into an emotional response[1] or to generally disrupt normal on-topic discussion.[2]"
In other words, you [uncyclopedia.org] and yo' momma [uncyclopedia.org].
Now go
Re: (Score:2)
It's not Metrosexual, it's a bunch of hairy dudes that want to feel pretty.