]> Topfield Puppy for Ubuntu 9.10 (with Linux 2.6) | Big Bee Consultants Ltd

Topfield Puppy for Ubuntu 9.10 (with Linux 2.6)Topfield Puppy for Ubuntu 9.10 (with Linux 2.6)

The Topfield PVR has long been distinguished for its USB interface that allows archiving of you recordings etc. Access to this USB port from a Linux device is achieved via Puppy or Ftpd-topfield (the latter is not discussed here).  Puppy is an old dog now (comments by its author). It does not work on Ubuntu 9.10 because the Linux 2.6 kernel has dropped the old usbfs in favour of sysfs.  Peter Urbanec (the author) recommends modifying your Linux kernel to re-enable usbfs.

That seems a bit drastic, so instead we're going to use a third-party patch to add sysfs support to Puppy, so we can use it on Ubuntu 9.10 without changing the kernel. The patch is attached below (and originally came from here). 

Building the Patched Puppy

Steps I took:

  1. download the Puppy source code
  2. download the puppy_1.14.sysfs.patch patch
  3. tar jxvf puppy_1.14_src.tar.bz2
  4. cd puppy_1.14
  5. patch puppy.c ../puppy_1.14.sysfs.patch
  6. make
  7. sudo cp puppy /usr/bin

You now have a new puppy binary you can use to access your TF5800 via Ubuntu.  I have attached below my binary, compiled for 32-bit Ubuntu 9.10 - this may save you the effort of compiling it yourself, or it may not work; YMMV.

Usage Outline

$ puppy
Usage: puppy [-ipPqv] [-d <device>] -c <command> [args]
-i             - ignore packet CRCs (for compatibility with USB accelerator patch)
-p             - packet header output to stderr
-P             - full packet dump output to stderr
-q             - quiet transfers - no progress updates
-v             - verbose output to stderr
-d <device>    - USB device, for example /dev/bus/usb/001/003
-c <command>   - one of size, dir, get, put, rename, delete, mkdir, reboot, cancel, turbo
args           - optional arguments, as required by each command

Version: 1.14, Compiled: Feb 14 2010

For example, I find the USB port for my Toppy using lsusb:

$ lsusb
Bus 002 Device 003: ID 0d62:001c Darfon Electronics Corp.
Bus 002 Device 002: ID 04f2:0963 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 11db:1000 Topfield Co., Ltd. PVR
Bus 001 Device 002: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Based on the bus and device numbers, Puppy can access the Toppy.

$ puppy -c dir -d /dev/bus/usb/001/006
d                    0 Wed Jan  1 00:00:00 2003 DataFiles
d                    0 Wed Jan  1 00:00:00 2003 ProgramFiles
d                    0 Wed Jan  1 00:00:00 2003 MP3
d                    0 Wed Jan  1 00:00:00 2003 Photos
d                    0 Wed Jan  1 00:00:00 2003 Settings

Using Toppy as Normal User (non-root)

It's bad practice to use the priviledged root-user when not necessary. If Puppy works with sudo, e.g.

$ sudo puppy -c dir

but gives you an error message such as this:

$ puppy -c dir
ERROR: Can not open /proc/bus/usb/003/005 for read/write: Permission denied

then please see the article by Tero Karvinen on how to fix this.

  • See also: Guppy, the GUI for Puppy
AttachmentSize
puppy_1.14.sysfs_.patch6.63 KB
puppy (ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15)36.37 KB