Monday, July 11, 2011

Setting up the Dreamplug

Just recently I got a Dreamplug from Global Scale Technologies. It is pretty cool in that it only draws 5W of power and comes with plenty of processing power and features for all sorts of things. It is initially designed for prototyping for full scale products. However it is great for the hobbyist to mess with and have a lower powered computer for servers, voip, etc.

In my case I got one to primarily act as little home server for file sharing, ssh, printer sharing, and scanner sharing. Eventually I would like to deploy one at the studio for backups and archiving as well. In the past I have used old desktops, but my latest one died and I got tired of paying the money to run a whole machine that sits idle 90% of the time. But as with anything the 10% of the time I need it, I need it, so it is definitely worth keeping around.

These are just some notes of things I ran into and I hope someone will find useful. I know I will on the next round with one of these.

Of course the website and user guide pretty much has zero information on it. At least it has nothing very useful. It mainly talks about the ports and interface and such.

In the box you get way more that it seems. The power supply can disconnect and be run with a DC cable. It can act as a brick or you can use another power cable. It comes with sliding connectors allowing you to switch. It also comes with cover plates for exposed contacts and a Cat5e network cable (which will handle gigabit).

Mine came preloaded with Debian Lenny. I was expecting it to have Ubuntu. Not sure what is going on there. Seems that many pre-shipped with Ubuntu, but mine is Debian, so no clue. But things did work out of the box. I am more of a RedHat guy and got spoiled with the GUI's in Ubuntu. So Debian (even though closely related to Ubuntu) is different enough to be a little slow going.

Since it came preloaded it was already partitioned and everything. It looks to have about 2GB of onboard storage which is nice. It starts up as a wireless access point as you can see from /root/ It also starts up Samba, SSH, Bluetooth, FTP and (attempts) lighttpd. The AP is automatically set up to bridge to eth0 which is DHCP. It also boots at runlevel 2.

To get on the machine, I had eth0 DHCP and I picked it up off of my DHCP server. You can ssh in with root and the default password (check the UserGuide for it).

Oh and BTW, the LED's are obnoxiously bright. If you look in the script and the wlan script, you can see how to turn them on and off. But not sure how to dim them and definitely not how manipulate the power one. May need some opaque tape for that.

So for my setup first things first:

  • Change root passwd
  • Turn off the AP by running
  • Remove it by commenting out /root/ in /etc/rc.local. That will also turn off bluetooth. On reboot, it will be LAN only.
  • Set a static IP for eth0. Since mine will just be a server (already have a firewall/router) there is no need really for eth1 or wireless. So you have to edit /etc/network/interfaces and change it to static with the right address, gateway, and netmask. However a bit of a gotcha is that ifplugd will stomp on it. So you must take out eth0 out of /etc/default/ifplugd. More information available here:,1960.msg5610.html#msg5610.
  • Change hostname in /etc/hostname
  • Oh yeah and install NTP (aptitude install ntp) which defaults to the debian pool. Then change the timezone: dpkg-reconfigure tzdata

After that initial round, that at least takes care of the tricky stuff. After that it should all be regular *nix stuff.

Other stuff I did:

  • Installed LAME which wasn't as trivial as I had hoped. Added "deb lenny main" to /etc/sources. Then I had to add the GPG key "gpg --keyserver --recv-key 07DC563D1F41B907" then "gpg -a --export 07DC563D1F41B907 | apt-key add -". Then "apt-get update." Took a few rounds of this to get some of the additional keys and I had to comment out a local apt repository from global scale. Then trivially "apt-get install lame" More information about getting lame from here: (Lame is slow as shit on this box BTW)
  • Installed smbclient (apt-get install smbclient) which then updated the rest. I decided to swap out the smb.conf file with the default one since it has comments that act as documentation.
  • Installed nmap, mainly to make sure I close all the right ports. Right now my only linux machine is a netbook with a crazy small keyboard.
  • Removed mysql from the startup scripts then uninstalled ( update-rc.d -f mysql remove, etc. apt-get remove mysql-common, etc.)
  • apt-get autoremove since there were some packages it was complaining about.
  • Added Cups Printing:
    aptitude update
    aptitude install cups cups-client hpjis
    aptitude install links
    links http://localhost:631/
  • Then added Scanner Sharing
    aptitude install sane
    ... bunch of configuration
  • Installed and configured samba

Performance specs are decent depending on what you are doing. Anything using the memory cards is dog slow. Off of an Esata Hard Drive things are much better. Samba speeds are excellent, it also does great as a scanning server. SSH under high loads is pretty slow (ie. sshfs). I set up a squid server and changing the default cache directory to hit the Esata drive makes it much much faster. I tested some basic MP3 compression and file compression tests, they are also slow.

Essentially this thing is geared for I/O such as a NAS or router. While it will work doing some CPU intensive stuff, don't hold your breath. Excellent for a power efficient small server with great I/O. Pretty happy with what it will be doing for me.

I will be posting more tests regarding SSH port forwarding and web page delivery as time progresses.


JRuss said...

I just got a DreamPlug at Christmas this past 2011. I have followed some online help to set it as a static client on my LAN. I also turned of the WAP, and installed a VNC server so I could log in to a GUI.

I'd be interested to hear about how you configured an eSATA and any type of auto-mount information. Is it all basic Debian mnt commands?

How is it performing as a NAS?

aortizjr said...

I never bothered with a GUI, the command line works just fine. To me that is extra resources lost.

I didn't bother with automounts since that can be a problem if something goes wrong. You can end up in a hung state at the mount level. I had a problem with a faulty external SD Card for instance. So I had to use the JTAG.

There is a boot-up script in root that starts the wireless. I added the standard mount commands there. So if it fails, at least the machine is fully booted and I can troubleshoot.

As a NAS I get about 35MB/s off it. But there are other bottle necks in my setup... cheap switch, crappy laptop NIC's, samba, drive speed, etc. It is a single external drive drive, and kind of a cheap one with a mediocre chipset. Direct connect with the drive over eSATA I get about 50MB/s.

I think that is pretty good, definitely enough for streaming HD, storing photos, music, etc. Probably could handle a small office.

Justin said...

I am thinking of getting a DreamPlug for a small office backup nas. I wanted to jump/run a modified Centos, Centos Rx30, as a backup to my main server. I'd only do it for short period it takes to get my main server back up.

Is this setup possible? Maybe add an esata drive?