Pogoplug

From David Darts Wiki

Revision as of 19:51, 3 January 2012 by WikiSysop (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Pogoplug V2 (pink) can be used to build an inexpensive (and energy-efficient) Debian server. It comes with a 1.2GHz Marvell Sheeva CPU, 256MB of RAM, and 128MB of NAND (32MB root partition, 92MB mtdblock3 partition).

Contents

Required Equipment

  • Pogoplug V2 (the pink one)
  • USB Flash Drive

Installing Debian

  • Insert a USB drive into your Pogoplug
  • Connect your Pink Pogoplug to your router with an ethernet cable and power up the device
  • Now, from a computer connected to your router, open a web browser and log in to your router admin page (e.g. http://192.168.1.1) to find the IP address that your Dockstar has been assigned on your network.
  • Next, open a terminal and connect to the Pogoplug partition of your Dockstar via SSH:
ssh root@IP_Address_Of_Your_Pogoplug
  • When prompted, enter the default password: ceadmin
  • Next, prevent your Pogoplug from auto-updating by running the following killall command (Note: this step is an extra precaution and may not be needed).
killall hbwd

NOTE: You should configure partition 1 as Linux (ext2) with a minimum of 512MB (the default bare-bones installation is 280MB.) Partiton 2 should be configured as Linux Swap (256MB).

fdisk /dev/sda
  • Once your USB drive is formatted, enter the following commands to install Debian Squeeze:
cd /tmp

wget http://dev.shyd.de/dockstar/dockstar.debian-squeeze.sh

chmod +x dockstar.debian-squeeze.sh

export PATH=$PATH:/usr/sbin:/sbin

./dockstar.debian-squeeze.sh

More info on Jeff Doozan's forum

  • The script will now download and extract the debian image on your USB flash drive. This will take some time - mine took about 20 minutes in total.
  • When the install is finished, the script will prompt you to reboot into your new install. After a couple of minutes, reconnect to your Pogostick via SSH. Note: my router re-assigned my Dockstar with the hostname "debian" which allowed me to login via SSH using:
ssh root@debian
  • Depending on your router, you may need to use the IP address instead. You can confirm the IP address (and hostname if assigned) of your Pogoplug by logging in to your router's admin page.

Change Password

  • The default password for your new Debian install is "root." Once you're logged in, you should change your password to something more secure:
passwd

Install Nano (Optional)

The base install comes with the Vi text editor though if you're not a Vim expert, you may consider also installing the GNU Nano text editor:

apt-get update
apt-get install nano

Upgrade to Wheezy

Once Squeeze is up and running, you can upgrade to Wheezy by changing your /etc/apt/sources.list to point to wheezy instead of squeeze.

nano /etc/apt/sources.list

Notice I've also changed the country code to us:

deb http://ftp.us.debian.org/debian wheezy main

Now issue the following commands:

apt-get update 

apt-get dist-upgrade 

reboot

Note: During the upgrade, answer "y" to the two disk device ID questions.

After rebooting, you can ssh into your Wheezy install and double-check that you're now running the Linux 3.x kernel:

uname -a

Create an 802.11n AP (Access Point)

DavyGravy on Jeff Doozan's Forum has posted an excellent HowTo to turn your Pogoplug/Dockstar into an Access Point. You'll need to pick up a TP-Link TL-WN821N V3 (or TP-Link TL-WN822n V2) wireless N USB adapter to get this up and running. You should be able to find these USB adapters on Amazon or eBay for under US$25.

Motion

Motion is a CCTV software motion detector developed for Linux. It can monitor video signal from one or more cameras and is able to detect if a significant part of the picture has changed saving away video when it detects that motion is occurring (it can also do time lapse videos, etc).

First you'll need a Linux compatible webcam. To test if your cam is being recognized by your system, connect it before booting and then run:

lsusb

You should see a line something like this: <preBus 001 Device 004: ID eb1a:2571 eMPIA Technology, Inc. M035 Compact Web Cam</pre>

To install motion, you'll need to temporarily point your sources.list to the squeeze repository:

nano /etc/apt/sources.list

Now refresh your sources and install:

apt-get update
apt-get install motion

After installation, don't forget to point your /etc/apt/sources.list back to wheezy.

The motion configuration file can be found:

/etc/motion/motion.conf

To start motion from the command line, simply type:

motion

The default directory where webcam images are dumped is: /tmp/motion

To stop motion, use: ^C (Control+C)

FTP File Transfer

Wput is a free utility that is able to upload files to a ftp-server.

To test the system, first set up a free file & image hosting account at http://www.badongo.com.

Then try uploading an image file to your badongo.com user account with:

wput test.jpg ftp://username:password@ftp.badongo.com

You can upload all of the files in a directory by replacing the file name with a an asterisk:

wput *.jpg ftp://username:password@ftp.badongo.com

Send Email from the Command Line

First install sendemail and the required libraries by opening a terminal and issuing the following command:

sudo apt-get install sendEmail libnet-ssleay-perl libio-socket-ssl-perl

Reboot for good measure.

Now you're ready to send emails from the command line. Here's an example using Gmail's SMTP server:

sendEmail -f my.address@gmail.com -t someone@somedomain.com \
-u "Hello World" -m “this is a test message” \
-s smtp.gmail.com \
-o tls=yes \
-xu usernameonly -xp mypasswd

Here's a second example using the SMTP server provided by an ISP (Time Warner):

sendEmail -f myaddress@isp.net \
-t myfriend@somedomain.com \
-s smtp-server.nyc.rr.com \
-u “Hello world again” \
-m “Hi , this is another test email.”

More info here.

Microblog from the Command Line

Twidge is a command line tool for interacting with microblogging sites such as Twitter and identi.ca.

To install:

apt-get install twidge

To setup with Twitter:

twidge setup

To update your status on Twitter:

twidge update "140 character blah blah blah"

To list all Twidge commands:

twidge lscommands

htop Interactive Process Viewer

htop is an interactive process viewer for Linux that allows you to monitor the load on your CPU, memory, etc.

Install with:

apt-get install htop

Run with:

htop
Personal tools