Serial RS-232 Interface
The Pogoplug V2 has a serial header on its printed circuit board. It sits on the edge of the board, next to the JTAG header. The serial header is labeled CON3. I already had to use it once when I locked myself out of the device by screwing up some symbolic links in the file system. The net result was that although the system booted, it did not execute some of its startup scripts and hence I was locked out because the dropbear ssh server and also the telnet daemon were not running. The cloudengines daemon was also not up. Bringing up a console via the serial cable allowed me to quickly fix the problem because it puts you in a root login shell.
I had used a home-brew serial cable with an RS-232 (15V) to 3.3V level shifter IC.
Recently I bought a Nokia CA-42 USB serial cable off eBay for only $1.99 with free shipping. Since most desktops (let alone laptops) don’t have serial D-9 connectors anymore, using serial over USB is to be preferred. The cable I received is probably a clone and not an official Nokia product. Be careful in identifying the wires. I followed a scheme outlined here
Best is to use an Ohm meter and measure which wire connects to which pin on the original connector after cutting the cord. My cable has three wires, colored blue, white and yellow. Clearly, the +3.3V has been omitted and therefore we can assume that the electronics build in the oversized USB A plug are powered via USB.
Seen from top (component side of the board):
------------------------------------------Edge of board------------+
--+---+---+---* *---+---+---+---* |
| | | | | 4 | 3 | 2 | 1 | |
--^---^---^---* *---^---^---^---* |
J1 (JTAG) CON3  |
My cable RS-232 cable Nokia USB
1: 3.3V black red -
2: TXD white brown white
3: RXD black (white) white yellow
4: GND blue black blue
I used minicom on Linux to connect.
You are probably fed up with pogo questions, but perhaps I can convince you to give me a hand. Here is mysetup/plan. I have a pogo (pogo1) in which I have installed openpogo and an nfs server following your instructions. I purchased another pogo (pogo2) in which I'm planning to run a squeeze server. I would like to mount my pogo1's HD on my pogo2 to serve the files to my squeezebox server, but I get a 'Permission denied' error when I mount. exports looks clean and showmounts shows exports.
If your are mounting NFS then that should work. I do pretty much the same thing: I mount my NSLU2 drive over NFS on the my Pogoplug. My mount command is:
mount -t nfs -o hard,udp,nolock nslu2:/share/hdd/data /mnt/nslu2
Installing Openpogo (ipkg)
Some previous blogs assumed that you know how to “open up your Pogoplug” to allow for additional installation of ipkg packages, a simple package manager used in many embedded Linux systems, notably the Linksys NSLU2.
Since a lot of the original web pages on the subject have disappeared with the move to plugbox and ArchLinux installs, I thought it useful to summarize the process here.
Openpogo is just the name for opening your Pogoplug to install more useful software. The main idea is to create a symbolic link /opt which will point to a directory .opt on a hard disk or any suitable USB mass storage device like a USB thumbdrive. The .opt directory will be populated with several files and directories that make installing ipkg packages possible.
We also add /opt/bin and others to the global PATH variable in /etc/profile. A start up script (/etc/init.d/mount_opt) will find the first device in the list /dev/sda1, /dev/sdb1, /dev/sdc1, /dev/sdd1 that holds a .opt directory and mount it on /tmp/mnt_opt. From then on, the root user can run the ipkg package manager and install lots of Linux programs and utilities, even
a complete development system with make, compilers, linker etc. Like I said, all this has been described before and hence all credit goes to the original authors, see for instance:
The one requirement is that you have a spare disk or memory stick that you can
experiment with. This USB disk must have a EXT2 or EXT3 Linux file system on
it. (Easily created with fdisk and mke2fs tools on a Linux host).
Here are the steps to follow:
- Put the Linux formatted USB disk in the Pogoplug and power up the plug.
- Enable ssh on the Pogoplug via its web interface. Look under Settings -> Security.
- Login in to the Pogoplug device (I assume a Linux host machine; use PuTTY on Windows) and go to /tmp:
$ ssh root@pogoplug
# cd /tmp
- Mind that / is a read-only filesystem; must remount read-write
# mount -o rw,remount /
- Create /opt as a new symbolic link in /
# ln -s /tmp/mnt_opt/.opt /opt
- Add execution of 2 scripts to /etc/init.d/rcS:
# cd /etc/init.d
Make copy for safety!
# cp rcS rcS.orig
- Add the following 2 lines at the end of rcS (end with Control-D):
# cat » rcS
- Create a useful profile:
# cat > /etc/profile
export PS1=’\h:\w\$ ‘
Or use vi to edit the file.
Setting PS1 gives a nice shell prompt.
Setting TZ corrects the clock for the EST timezone and daylight saving time.
- Next step is to populate .opt:
Go to the “root” or top-level directory of the mounted disk:
# cd /tmp/.cemnt/mnt_sda1
Note that sda1 could be something else on your system, like sdb1.
Just check the mount command output or do a df.
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock2 32.0M 12.3M 19.7M 38% /
none 125.0M 8.0k 125.0M 0% /tmp
/dev/sda1 109.9G 102.9G 5.9G 95% /tmp/mnt_opt
Make sure you are in the top-level directory of disk partition:
Download the gzipped .opt tar file directly from the internet:
or get it from http://www.box.com/s/pmzoiy9xj8tmmm076zun
Move it onto your Pogoplug (via an upload on its web interface),
and make sure it ends up in the directory /tmp/.cemnt/mnt_sda1.
Now gunzip and untar in the that directory:
# tar xvzf openpogo-usb.tar.gz
- One more thing to do. Copy the mount_opt script over to /etc/init.d:
# cp .opt/mount_opt /etc/init.d
NOTE: there might be a problem with this version of mount_opt!
I removed the “-t ext2” option from the mount command in all 4 instances. Put them back if you have any problem.
- Fix some minor problems with the original root filesystem:
Make sure /dev/null is world writable:
# chmod a+rw /dev/null
same for tty:
# chmod a+rw /dev/tty
- Best go back to read-only mode now!
# mount -o ro,remount /
- Simply reboot and your Pogoplug should be set up for ipkg.
- To test this, log back in with ssh and issue:
# ipkg update
The main reason I want to install NFS server is sharing media with WDTV. I installed transmission in pogoplug for downloading, and the unofficial WDTV firmware has NFS module which is tested fast enough for HD streaming. If I can setup NFS server in pogoplug, I don't need to plug in/out the hard driver to WDTV any more. Thanks for the info, I'll give it a try.
Dear dplaycc, let me know if it works and whether you had to make any changes. It might be interesting if you posted a brief tutorial on connecting WDTV to the Pogoplug.
nmon is a nifty little system monitor that uses the ncurses library to display its output in your terminal window. I natively compiled version 14e for the Pogoplug. It depends on libncurses.so.5 so you better install ncurses via ipkg.
Here it is: nmon. Put it in /opt/bin and make sure it is executable.
I found that coreutils-uptime (and therefore /opt/bin/uptime) does not work correctly. I am referring to coreutils-8.4-1.ipk. Funny thing is that the original /usr/bin/uptime works fine. So simply remove the symbolic link /opt/bin/uptime or rename it.
Yes, I know about Plugbox. I have it running on one of my Pink Pogoplug v2’s. It’s great, and I can only recommend everybody to give it a try. You do need to reflash your boot loader but that is a minor thing given Jeff Doozan’s excellent work. Archlinux is a wonderful distro and opens up a world of new applications for your plug. I was able to connect one of those cheap MiniDV spy cameras and use it as a webcam. You can easily add USB wireless adapters (I use a zonet 2546) and any other USB device, like a CD/DVD player or a USB audio device.
And it is still possible to revert back to the old my.pogoplug.com functionality by just removing the disk or memory stick that holds the plugbox kernel (/boot/uImage).
I actually installed a native build environment (gcc and friends) and build my own kernel and modules. This turned out to give me support for the Pogoplug’s front side LED and also gave me much better support for my USB wireless adapter (the stock kernel’s module gave me memory allocation problems and occasionally hung the system).
Running an NFS Server
In a previous blog we talked about setting up an nfs mount. This time we do the reverse: we use the Pogoplug as an nfs server so that other hosts can connect to it and mount its file systems across the network. There are many good nfs tutorials on the web. See for instance:
Please consult those if you run into problems. Here we merely show how to get the necessary software on the plug and how to do a quick configuration to get it running. We shall see that pretty much everything works out of the (ipkg) box.
First you need to install the nfs server:
pogoplug:~# ipkg install nfs-server
Installing nfs-server (2.2beta47-4) to root…
Installing portmap (4-5) to root…
As you can see it depends on what’s called the portmapper. Both portmap and the nfs-server set up a startup script in /opt/etc/init.d. The portmapper is started as part of the install; the nfs-server is not, because we first need to configure it by supplying a /opt/etc/exports file. To verify that our portmapper is running, we enter the following command on a linux host machine called “turf”, where the Pogoplug is known under the hostname “zonet”:
[geert@turf ~]$ rpcinfo -p zonet
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
Now let’s prepare a useful /opt/etc/exports file (use whatever text editor you prefer):
I learned that /24 cannot be used as an abbreviation for 255.255.255.0.
Also, some options will cause the nfs daemon to abort. Be warned when fiddling with the contents of exports.
Next we start the nfs server daemon:
To verify, again (1) issue the rpcinfo command on the remote host, (2) check the running processes on the Pogoplug with ps, and (3) use showmount on the host to list the exported file systems.
[geert@turf ~]$ rpcinfo -p zonet
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 2 udp 2049 nfs
100003 2 tcp 2049 nfs
100005 1 udp 618 mountd
100005 2 udp 618 mountd
100005 1 tcp 621 mountd
100005 2 tcp 621 mountd
pogoplug:~# ps w
18151 1 1856 S /opt/sbin/portmap
18247 root 2460 S /opt/sbin/rpc.nfsd -f /opt/etc/exports
18249 root 2424 R /opt/sbin/rpc.mountd -f /opt/etc/exports
18579 root 3400 R ps w
[geert@turf ~]$ showmount -e zonet
Export list for zonet:
That’s all! We are done. Any client machine on the 192.168.0.0 subnet can now mount the exported file systems, using e.g.:
[geert@turf ~]$ sudo mount zonet:/ mnt/pogoplug
[geert@turf ~]$ sudo mount zonet:/tmp/mnt_opt mnt/pogoplug/tmp/mnt_opt
And you unmount them again in the reverse order:
[geert@turf ~]$ sudo umount zonet:/tmp/mnt_opt
[geert@turf ~]$ sudo umount zonet:/
I prefer to use the automounter that mounts the file systems under /net/zonet in my case.
PS. I encountered some strange behavior with respect to the /tmp/.cemnt/mnt_sda1 export. It would mount all right, but cd into the mountpoint would never show any files. I resolved the problem by creating a different mountpoint for /dev/sda1 on the Pogoplug. What I did was:
pogoplug:~# mount -o rw,remount /
pogoplug:~# mkdir /mnt/disk
pogoplug:~# mount -o ro,remount /
pogoplug:~# mount /dev/sda1 /mnt/disk
Of course I updated /opt/etc/exports to reflect the change:
and restarted the nfs daemon:
Now mounting zonet:/mnt/disk on a client works fine.
If anyone figures out what went wrong with /tmp/.cemnt/mnt_sda1 let me know.
Hi, I'm planning to install NFS server into my pogoplug so I can use it as my media center to share with other computers and also WDTV. Could you please send me the instruction on how to configure it?
I am curious to learn how you think to go about installing an nfs server? There is no kernel module for it, and ipkg does not list (a good) one. Anyway, assuming that you have the necessary daemons running (portmap, nfsd, etc.) then all you need to do is export some directories. Here is a good source on how to do all that: http://nfs.sourceforge.net/nfs-howto/ar01s03.html
The official wireless adapter of the Pogoplug looks like a nice white USB stick. Once initialized, you will notice that it uses the kernel module called rt3070sta.ko. This hints at a device manufactured by Ralink. This company provides excellent Linux support and it should be easy for anybody to build this driver from source.
Knowing the chipset of the wireless adapter, also means that we can look for alternatives. I found a cheap ($8 when on sale) Zonet ZEW2545 USB Wireless adapter which has USB ID 148f:3070 “Ralink Technology, Corp. RT2870 Wireless Adapter”, hence a chipset similar to the Pogoplug wireless device. I tried it and indeed it works well!
If you need to activate it by hand, use:
# /sbin/udhcpc -i ra0 -R -b -p /var/udhcpc_ra0.pid
I am curious to learn of other (cheap) wireless adapters that work with the Pogoplug.