Some people require a computer that is online 24 hours a day, 7 days a week, that runs simple servers and services, and is accessible from the internet. Often, there is no need for this computer to be powerful, so just taking any bog standard PC that continuously gobbles up several dozens of Watts is a total waste of electricity. Popular ways to minimize power consumption are using old laptops, underclocking the CPU, or trying to beef up simple routers so that they get the abilities of a normal computer, albeit with severe memory and storage restrictions.
There are some low-power solutions specifically designed to fill this gap in the computer market. A few examples are the SheevaPlug and GuruPlug and the Alix system boards. There are even computers that can be mounted in the wall like a power socket. However, most of these run on non-x86 compatible processors. This is mostly not a problem since people often compile a custom Linux for these computers anyway, or use a Linux distribution that comes with these devices. But, it would be interesting if a computer existed that both consumes very little power and can run standard x86 binaries. This would also allow to build and test the operating system and utilities on a standard PC without the need for an emulator.
With the advent of the Vortex86 System-on-Chip, such computers have become possible. The Vortex86 is an entire low-power x86-compatible computer on a single chip. It only requires few extra components and RAM chips, and uses only two Watts of power. It supports the i586 instruction set and comes in two variants (at the time of this writing; a third variant is coming up). The naming of these two variants, the “Vortex86SX” and “Vortex86DX” have made some people believe that these CPU's are just beefed-up 486 CPU's, but they're more than that.
Of course, most people can't do much with a raw 581-pin BGA package. They need a finished product that can be used as an actual PC. At the time of this writing, there are only few such finished products available. One company that has a range of computers using the Vortex86 CPUs, is NorhTec. They have the Gecko EduBook, a laptop which can run on standard AA batteries, and the Gecko Surfboard, a Commodore-like keyboard with built-in computer. However, for a simple headless box that will be gathering dust most of the time, those are overkill or unpractical. Norhtec also offers specific headless boxes, but they are rather expensive and only available in large quantities.
The Chinese have come with their own offering of a headless Vortex86-based computer, which I stumbled upon mostly by accident. It is not well-known and as with most of these Chinese products, not well advertised. The device is called the BTplug and proved to be exactly what I was looking for. It has only the bare essentials: a Vortex86DX CPU at 933MHz, 512MB RAM, a 44-pin laptop IDE header, two USB 2.0 ports and one 10/100 Ethernet port. It is claimed to use less than 4W. The price was pretty OK: US $93 + $25 shipping and handling, which amounts to less than €100 at the time I ordered it. For a bit extra, you get an additional IDE to CompactFlash adapter + cable.
$25 is not cheap for shipping such a small box but the package proved to be sent by express courier, so I didn't have to wait the usual two weeks. It arrived only a few working days later.
Judging from the BTplug website that only shows a photo of the ‘motherboard’ at the time of this writing(1), it may seem that you'll only get a circuit board with power adapter (and the optional 44-pin IDE cable and CF adaptor). So it was a pleasant surprise to see that the BTplug actually comes with a nice white plastic enclosure. Although it is called a
plug computer on the website, it isn't exactly one like the SheevaPlug, but it comes close. The rest of the package contents were a 12V 1A mains adapter with USA prongs, a European socket adapter and a DVD with Linux disk images. I specifically mentioned in the PayPal payment form that I needed something compatible with Belgian power sockets. If you live in a country with non-USA power sockets and want to order one of these, don't forget to notify the seller.
The BTplug enclosure measures 107×107×38mm. It is easily opened by removing three small screws. The board itself is 100×79mm. As you can see from the first photo on this page, the CPU doesn't even have a heatsink. There are provisions to mount one. As you'll read further on, if you plan to run this machine in an environment that is even a little warm, I do recommend to mount a heatsink. I also recommend drilling holes in the bottom and sides of the enclosure to provide some airflow.
Next to the input/output ports mentioned above and the DC input jack, there are some more provisions on the board: two TTL-level serial ports, a set of GPIO ports, and an extra USB port. All of these are not immediately accessible though, you will need to solder PCB headers onto the board and make your own cables to use these extra ports. See the pinouts section for more information.
The DVD with Linux distributions that came with the BTplug seemed promising at first, as it contained various supposedly ready-to-use disk images that would boot the device and start an SSH server, pretty essential to get access to the machine. There is a tiny 48.5MB image to be run from a USB flash disk, two large Debian images of about 1.4GB to be run from either IDE or USB, and one 163MB Debian image to be run from a CompactFlash card. However, all images are in an obscure format that I have been unable to use. The files have extension “.GHO” which would indicate that they are Norton Ghost images (supported by versions up to Ghost 2003). They also start with the correct ‘magic number’ for a Ghost file. However, I tried various versions of Ghost (including 2003) and none correctly recognized the images. Ghost reported the only image that it could open as being of more than 1 TeraByte in size, yeah right!
I mailed the seller for more information, but never got a response. Until someone can give a hint as to what program could open these files, I have to say that the DVD that comes with the BTplug can only be used as a coaster. That is, if you don't have a habit of spilling too much of your drink, because the coaster has a hole in the middle.
Even if the images would have worked, I still would have installed my own Linux, just to have something that only contains what I really need. I decided to install Gentoo because I am familiar with it. Mind that I don't recommend Gentoo to everyone. It's a great distro if you don't mind getting your hands dirty and if you want to be able to tweak almost everything. If you just want something that works, you may want to try other distros.
The great advantage of a Vortex86-based system like the BTplug is that it is x86 compatible. You can prepare and tweak a bootable Linux system on your PC (directly or in a VM), put it on a USB stick or hard drive, check if it boots on your PC, and then try to boot the BTplug with it. If the boot has failed, you can plug the stick/drive back in your PC and check the logs. That's also exactly what I did first. As an initial test, I downloaded Puppy Linux because I had read on forums that people have successfully booted it on the Gecko EduBook. Puppy is a very small distro (only 50MB) that can be installed to and run from a USB stick, and it allows to install extra software. I booted the Puppy USB stick on my trusty old Athlon XP PC, set the root password, installed an SSH server and added some scripts to
/etc/init.d/ to automatically start Ethernet and get an address through DHCP upon boot. Then I plugged this stick in the BTPlug and booted it. This worked: after checking my router's DHCP logs for which address was assigned, I could connect to the BTplug through SSH.
Puppy Linux is designed to be a portable Linux with a graphical interface that can be booted anywhere. It's kind of your own portable desktop environment. Thus, despite its small size, it's full of stuff that is of no use on the BTplug which doesn't even have circuitry for connecting a display. Also, Puppy is heavily geared towards being used through the graphical interface. Using it from the command-line only is not really recommended, so it was only useful as a first test and to see what kernel modules it loads to get running on the BTplug.
Only recently I discovered that the manufacturer of the Vortex86DX has a page with their own Linux distribution, called X-Linux. It may be worth checking out if you don't want to build your own kernel, but judging from the description you'll still need good knowledge about Linux to do something useful with it.
The next step was to build my own Gentoo Linux specifically for the BTplug. I did this entirely on my old Athlon XP PC, not just because it has the convenience of a monitor, but because it's a lot faster than the Vortex86. I won't go into the details of installing Gentoo of course. I'll only mention some important points:
/tmpas RAM disks with tmpfs. This again avoids wear of the flash disk and is much faster. For Gentoo, mounting
/var/tmp/portageas tmpfs is also a good idea if you plan to install packages on the running system. If you're using a rather large flash disk, you can create a swap file as a life buoy in case tmpfs runs out of RAM, but swapping on the flash disk is to be avoided at all costs.
R6021 Host Bridge (rev 02), R6031 ISA Bridge (rev 02), R6040 MAC Controller, R6060 USB 1.1 Controller, R6061 USB 2.0 Controllerand
IDE Device 1011 (rev 01).
/etc/kernel-config/) if you're unsure about certain kernel options.
rootdelay=10” to the kernel line to get my PC to boot from USB. For the BTplug this seems unnecessary.
pnpbios=off” to the kernel parameters for booting the BTplug.
I first installed Linux on a 2.5" USB hard drive. As you may have experienced, such drives rely on the assumption that most USB ports can deliver a current larger than the 500mA dictated by the USB 2.0 standard. This assumption doesn't always hold, hence USB-powered disks will start skipping or outright refuse to work if they don't get enough power. The bad news is that the USB ports on the BTplug seem to adhere to the USB standard and don't deliver much more than 500mA, because my external disk was constantly on the limit between working and not working. A solution is to provide external power, but since it was a 2.5" disk with 44-pin connector anyway, another option was to take the disk out of the enclosure and hook it up directly to the IDE connector on the board, and this worked perfectly.
Now, the big problem was that although the activity LED clearly showed that the system booted at least up to a certain point, there was no sign of life on the Ethernet port. There was also nothing in the logs when connecting the disk back to the PC, so the boot must have failed early. I needed a way to see what was going on, and the only option was to use the serial ports to connect another computer as a serial console. The big problem was that there is no documentation at all for the BTplug, so although I knew that some of the headers on the motherboard were serial ports, I didn't know which ones and what the pinout was. Given my previous futile attempt to contact the seller, I figured it would be faster to figure out myself how to get a working serial connection. I compiled a simple program that continually sends data on the ttyS0 serial port and ran it (through SSH) from the Puppy USB stick. Then I used an oscilloscope to detect on which pin (or rather, hole) the serial signal appeared. From the voltages I could also see which pins were input and which ones output. I then modified the test program to alternatively send and read, and searched the Rx pin by looping the Tx pin to the two candidate input pins. The result of this experiment can be seen in the pinout section.
I soldered headers onto the board, but it is not sufficient to simply connect those pins to the serial port of a PC because the BTplug uses TTL signal levels, which are inverted and of lower voltage compared to RS-232. So I needed to convert the signals as well. One can buy simple TTL-to-RS232 or even direct TTL-to-USB adapters, but I was too impatient to wait for one to be delivered, so I built my own with a dual op-amp. If you want to build one yourself according to the circuit at the right, make sure to use an op-amp that is fast enough for a baud rate of 115.2k if you want to get into the BIOS of the BTplug. Also, check that the op-amp can handle -12V w.r.t. the ground on its inputs, or add an extra diode at Tx232.
With the serial connection working, debugging problems on the BTplug became an order of magnitude easier. It's basically the same as connecting a monitor. Moreover, it allows to change BIOS settings as well (worst idea ever: disable serial access in the BIOS). You can use another PC with Putty under Windows, Minicom under Linux, or ZTerm under OS X to emulate a serial console (or get that VT100 from the attic). In my case, two things proved to have prevented to BTplug from booting: the hardware clock was so far in the past that the ext2 file check panicked and on top of that, eth0 got renamed to eth1 because of the different MAC between the BTplug and the PC on which I built the Linux. So, you can do without the serial console if you avoid pitfalls like these, and get networking and SSH to work from the start. Once connected through SSH, you're off. But believe me, you can save yourself a lot of frustration and wasted time with a little bit of soldering and by getting a TTL adapter. You can mount a 2.5mm or 3.5mm stereo jack for easy plug-in serial access later on.
An alternative that doesn't require a serial console (hence no soldering) is to use netconsole which allows logging through UDP via the network cable. This will not allow to get into the BIOS of course, but for most people that will be unnecessary anyway.
Once the Gentoo Linux was properly set up for the BTplug, I cloned it to a 16GB SD card with rsync and swapped the hard disk with an IDE-to-SD adaptor. The serial connection proved again useful to fix the bits that I forgot to set up after the rsync. Now if I want to do a large update, I simply rsync the system back to the USB drive, update it on my faster computer (either by booting or chrooting) and then rsync it back. This is both fast, easy to troubleshoot, and minimizes flash write operations due to the update.
First of all, does the BTplug consume less than 4W as promised? Yes it does! With the supplied 12V mains adapter, average power consumption is about 3.3W. It fluctuates a bit, but only occasionally reaches 4W. I figured though that nothing on the motherboard requires more than 5V and the circuit near the DC jack serves as a DC regulator. So I plugged in a 5V adapter just for kicks. Surprise: it works! More surprise: it brings total power consumption further down to an average of about 2.8W. This is probably due to two things: my 5V adapter being more efficient than the provided 12V adapter, and less losses in the regulator circuit because it only has to pass through the incoming power without conversion.
The BTplug would be ideal for Power-over-Ethernet, because it meets all the requirements. I don't have the means to test it though, but I'm afraid it is not implemented. The lay-out of the motherboard doesn't show signs of PoE, and most of all, it is not mentioned on the website. They would not forget to mention such an important feature.
I have configured my BTPlug as a tiny low-power NAS, with an attached 1 TB 2.5" HD sitting on top of it. The HD cannot draw enough power from the BTPlug, yet it is still possible to run both devices from a single power supply. The easy way is to use a powered USB hub if you can find or solder a 5V power plug onto a USB cable. Connect the BTPlug to the hub with this cable as well as with the USB uplink cable. The hard disk will then get the USB signal from the BTPlug and the power from the hub. Or if you don't mind soldering a little more, you can make a simpler device that does the same from some leftover parts like I did.
The next thing I tested is how well the Vortex86DX @933MHz performs, as well as the system as a whole. First of all, I ran a simple benchmark program of my own that counts how many times various calculations and data-processing operations can be executed during a fixed time. I have been running that program on many different machines so this allowed me to conclude that overall, the BTplug is somewhat comparable to a fast Pentium II or a slow Pentium III-based PC. It heavily depends on the task however, for convolving an image the Vortex86 is slower than anything I've benchmarked yet, but for creating a word histogram from text it is comparable to a Pentium 4. Emerging small packages in Gentoo is perfectly feasible, but you won't want to compile a kernel on the BTplug if you're in a hurry.
A note about the Vortex86DX: I have found rumours on some forums that the Vortex86DX would support MMX, but this is untrue. The cpu flags in
/proc/cpuinfo only mention
fpu tsc cx8, and a test program to check the availability of MMX fails. The newer Vortex86MX does support MMX.
As for I/O, I tested if the 100MBit Ethernet is exploited to its limit by downloading and uploading large files to and from a RAMdisk through FTP over the local network. The speed was close to 10MB/s in both cases, so the only bottleneck is the speed of the network. I also tested copying files from and to an external USB hard drive. I obtained speeds between 15MB/s and 25MB/s, which is more than enough to saturate the network connection. So, putting these two together gives the most useful scenario for people who intend to use this as a NAS: I uploaded a file directly from the USB disk through Ethernet to another machine. This gave 7.5MB/s, so there seems to be some overhead(3), but it is still pretty good. SCP is limited by the CPU: I got 3MB/s when scp'ing from a RAMdisk to another computer.
The first months I was using the BTPlug as a NAS, I encountered occasional total system freezes. These were completely random and only seemed to happen during heavy I/O load, for instance when running bittorrent or copying a lot of data from or (especially) to a USB disk. The problem seemed to be related to NFS, therefore I switched to netatalk to mount shares on my Mac through AFP. This appeared to eliminate the crashes and also proved much less hassle in daily use than relying on OS X' crippled NFS support.
A while later though, the crashes returned, again triggered by heavy I/O load. It became obvious that heat played a big role: the crashes always happened on hot days, never on cold winter days. The total lack of ventilation in the plastic case obviously did not help, therefore I drilled a lot of holes in it and mounted a heatsink on the CPU. Even this did not help on real hot summer days, so mounted a small fan to vent the case, which made all the difference: the machine has been running rock-solid ever since. My conclusion is that you will want to keep this thing as cool as possible, I would recommend keeping the CPU below 40°C.
I have encountered very sporadic cases where after booting up, either the USB interface performed poorly (very slow transfer speeds), or there was no network connection although the ethernet interface appeared OK to the operating system. Both these problems were fixed by a reboot. It is unclear whether these were hardware glitches, bugs in my particular custom-built Linux, or related to the overheating problem.
The BTplug is an x86-compatible headless computer that is both very small and very power-efficient. Because the BTplug motherboard is well-built and is therefore mostly a transparent interface to the Vortex86DX SoC, many of the following points apply to any Vortex86DX-based computer in general. Its qualities and drawbacks are as follows:
So, it is cheap and small, both in physical size and power usage. This makes it ideal to run permanently, with e.g. USB storage attached as a NAS, and/or as a small lightweight server with much more RAM and storage than the typical router with custom firmware. The CPU is pretty capable and can easily run for instance bittorrent software. The only caveat is the difficulty to get it running. You need to either connect a serial console, or boot from an operating system that has the right support for the hardware and automatically starts an ssh server. The bottom line is, if you're looking for a computer like this and you don't mind to tinker a bit, this is certainly worth checking out.
(1): now (2011/12/14), there is a new version in a slick metallic housing, which has four USB ports and room for a 2.5" HD as well. For the rest, the specs are the same and the lay-out of the board is probably similar.
(2): I briefly considered using LogFS for the filesystem, but it had only recently been added to the kernel. Moreover, LogFS is only really useful if one has direct access to the flash memory, which is not the case with SD or CompactFlash cards in an IDE adaptor. Most controllers in such cards have at least some basic provisions for wear leveling, and the more expensive cards have advanced wear leveling built-in. I guess that with my minimal precautions my SD card will survive longer than the useful lifetime of the BTplug anyway.
(3): Afterwards I discovered that the duplex setting of the NIC is not always properly auto-configured, which can cause severe performance loss. With full duplex enforced through ethtool, I easily reach 10MB/s as well when reading from an external disk through ftp and NFS.