ftpd‑topfield patches to 0.7.7p (and puppy to 1.14p)
ftpd‑topfield patches to 0.7.7p (and puppy to 1.14p)
I've patched the standard ftpd‑topfield distribution (obtained from
this site) to
better handle multiple toppies being on the USB bus. Given that they
will probably drop into standby mode when not doing anything you can't
reliably refer to specific ones by the order they appear on the USB bus
as the result of that depends on which ones are on at any given time.
Similar patches have now been applied to puppy. I've also added code
to ignore CRC checks on packets with zero checksums, so you don't need
to specify the -i option if you have the USB Accelerator patches
on your Toppy. The orginal code was
collected from here.
Update - March 2011
A tidy up has been done and both utiltities moved to patch-level
"p".
- The code taken from libusb has had function names changed to avoid
clashes when using dynamic libusb libraries. This has resulted in the
pre-built tools failing to run on some systems.
- STATIC, LIBUSBLOC and FORCELIBUSBLOC have been added to the
Makefiles to enable building in various ways:
- STATIC=1
- Will link in libusb statically. This allows a build of the tools
which doesn't depend on libusb being present when actually running it
- so allows me to build such a version for people to download. (It
does require libusb to be present when actually building it).
- LIBUSBLOC=/path/to/libusb/installation
- Allows you to tell the build where to look for libusb header files and
libraries
- FORCELIBUSBLOC=/path/to/libusb/installation
- Will add the path into the executable's RPATH. Probably not useful
for anyone.
The patches here use libusb to scan the bus for devices specified
by the --devices option (or -X, which is now activated):
- use first found (default)
- use the Nth (count from 0)
- use mmm/nnn as Bus mmm Dev nnn
- use Toppy with given serial number (and R2‑D2 has a firmware
patch to set this to a value other than the standard
"1000")
They also removes the use of any /tmp/puppy lock file from
ftpd-topfield since claiming a USB device is exclusive anyway.
NOTE:
This also removes the ability to pre-empt another
ftpd‑topfield process which currently owns the device when it gets
back to waiting for its next command.
The source files available here are:
These Pre-built binaries are available
NOTE:
The dynamically-linked libusb versions require that a
version of libusb version 0.1.x (not 1.0.x) be installed on the
system. If you don't already have that, use the statically-linked
ones.
The download file-names reflect the build-style - you'll probably want
to rename them to puppy and ftpd‑topfield before
use.
- armv5tel
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled on a
SheevaPlug Computer running Debian Squeeze and kernel 2.6.38.
These expect to find a run-time loader called ld-linux.so.3.
This would be found in /lib. If it is absent (as, for
example, on the RaspBMC distribution) then create this as a symlnk to
whichever run-time loader is on the system.
e.g. on RaspBMC you can do this by (as root):
ln -s ld-linux-armhf.so.3 /lib/ld-linux.so.3
- mips
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled on an
Asus wl500gx running Oleg's 1.9.2.7b10 with the optware feed from
ipkg.nslu‑linux.org
- mips - fully-static
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled on an
Asus wl500gx running Oleg's 1.9.2.7b10 with the optware feed from
ipkg.nslu‑linux.org and linked statically to both libusb and
uClibc (libc)
- x64
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled in
64-bit mode on an AMD computer running Mandriva2010.2. This requires
glibc 2.7+.
- i686
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled in
32-bit mode on an AMD computer running Mandriva2010.2. This requires
glibc 2.7+.
- x64 (older)
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled in
64-bit mode on an Intel computer running RedHat4. This only requires
glibc 2.2.5.
- i686-older
- puppy_1.14p and ftpd‑topfield‑0.7.7p, compiled in
32-bit mode on an Intel computer running RedHat4. This only requires
glibc 2.2.5.
- armv5tel-TEST!!. Do NOT use this unless you know why it is here!!
- puppy_1.14q, compiled on a
SheevaPlug Computer running Debian Squeeze and kernel 3.7.4.
- puppy
with statically linked libusb
Compiling ftpd‑topfield
I have intended to make the original code builds still work. The
build method is to unpack the source, cd to the ftpd‑topfield
directory and run:
- make
- This will build the new code, with device bus scanning as
mentioned above
- make OLD_DEV_SCAN=1 USE_LIBUSB=1
- This will build the old code, but use libusb to find the device.
It will create /tmp/puppy lock files.
- make OLD_DEV_SCAN=1
- This will build the old code, but read the
/proc/bus/usb/devices file to determine devices (which is a
deprecated method). It will create lock files.
Compiling puppy
Similarly the intent is to allow original code builds still work. The
build options are to unpack the source, cd to the puppy
directory and run:
- make
- This will build the new code, with device bus scanning as
mentioned above
- make OLD_DEV_SCAN=1
- This will build the old code reading the
/proc/bus/usb/devices file to determine devices.
It will create lock files.
Both compilations also now have STATIC and LIBUSBLOC options to control
libusb linking. See the top of the page for details.
The Toppy USB protocol
Since you (and I) may wish to know what this is I've extracted a copy of
USB_Dll_(09Jun2004).pdf from
this zip file.
It's here as USB-protocol.pdf.
21 March 2011