FreeBSD support for the Velleman K8055 USB Experiment Board

The Velleman K8055 USB Experiment Interface Board is a low cost USB interface with multiple analog and digital inputs and outputs produced by Velleman (www.velleman.be). There have been at least two implementations for Linux of libraries which drive the board (libk8055.sourceforge.net and linuxk8055.free.fr). Support on FreeBSD has been limitted by two factors:

  1. the board appears as a HID device and does not appear to correctly accept input from the host via the hid driver.
  2. FreeBSD does not currently provide a method which does not require recompiling the kernel to add a usb quirk that would make the device not bind to a hid driver.
Rather than a simple port of the the Linux code, a complete reimplementation has been developed. The reimplementation was preferrable as it allows a degraded mode of operation to be offered if FreeBSD binds the K8055 to a hid driver. This facility is not offered by the Linux libraries.

The code and program provided here will locate a K8055 board and allow access to it. If the K8055 binds to the hid driver limitted functionality will be provided by the code ie it will be able to read from the card but cannot write to the card. If the K8055 binds to a ugen driver then full functionality is available. A command line program - k8055cmd - provides a demonstration of the functions found in k8055.c and libk8055bsd.a

The code does NOT use libusb (libusb.sourceforge.net) and hence can serve as a model for those wishing to implement their own native usb interfaces under FreeBSD.

Please note: The code is supplied "AS IS" under a BSD licence

Source code:

Archive of linux sources:

To compile the linux sources these patches may be useful: