bladeRF/host/drivers/linux
Jon Szymaniak b7c335a69a Merge branch 'dev-libusb_support' into bladerf
This merge introduces libusb-1.0 support into libbladeRF. This is now
preferred over the Linux driver backend for the time being, as it will
allow quicker ports to Windows and OSX. The Linux driver will be
significantly refactored and improved at a later time; it is not
recommended for use with this set of changes.

As of this commit, Windows and OSX builds are still works in progress.
Linux builds have been tested and verified.

** Important **
This branch also introduces CMake support, code base reorganization, and
significant API changes. Please review the updated API header (best viewed
via the Doxygen-generated html files.)

If you've been working out of the bladerf branch, it is recommended that
you clean up the following:

1. Uninstall Linux kernel module, if you have it loading at boot
2. Remove installed libbladeRF files (libbladeRF.h, pkg-config, files, .so's)
3. Remove installed CLI program
4. Remove udev rules

Please review the new "Getting started" text and the instructions in the
README.md and  host/README.md files for the new build procedure.

Manually resolved Conflicts:
	README.md
	host/drivers/linux/bladeRF.c
	host/utilities/bladeRF-cli/src/interactive/interactive.h
	linux/lib/src/bladerf.c
2013-08-25 13:53:13 -04:00
..
bladeRF.c Merge branch 'dev-libusb_support' into bladerf 2013-08-25 13:53:13 -04:00
bladeRF.h libbladeRF & CLI: [WIP] In the process of switching over to CMake 2013-08-12 03:24:16 -04:00
Makefile libbladeRF & CLI: [WIP] In the process of switching over to CMake 2013-08-12 03:24:16 -04:00
README.md libbladeRF & CLI: [WIP] In the process of switching over to CMake 2013-08-12 03:24:16 -04:00

bladeRF Linux Kernel Driver

The linux kernel driver implements a USB device and has some buffering to be able to place multiple packets in flight at a time achieve the high datarates associated with USB 3.0 Superspeed.

Requirements

Even though we build a module for the kernel, your kernels source code is required to build against. We've tested with kernels as old as 3.5.0, but we mostly use Ubuntu for testing and development.

Building

  1. make
  2. See that bladeRF.ko has been made.
  3. sudo insmod bladeRF.ko

The kernel module should now be installed and ready to be used.

bladeRF udev Rule

Usually the udev rules associated with USB devices use the VID and PID to determine the matching for the rule and change the mode to be accessible to users of that group. In our testing, it's been seen that the particular udev rule changes the mode of /dev/bus/usb/... but not the preferred dev entry we create of /dev/bladerf#. Due to this, we have a relatively broad udev rule:

KERNEL=="bladerf*", MODE="0660", GROUP="plugdev"

Please feel free to suggest a tighter rule that applies the appropriate mode to the /dev/bladerf# entry.