This post is intended to help those that need to connect to a GPIB device, such as an oscilloscope, using theirs standard PC with an USB connection and an USB-to-GPIB device (such as the National Instruments GPIB-USB-B or GPIB-USB-HS). I assume you are running a recent linux distribution, such as Ubuntu 10.04 (although should work for previous versions as well).
The first thing to do is get the latest linux-gpib driver from here.
Then install the linux-gpib (see the INSTALL file) which is a simple "./configure" then "make" then "make install". Now the tricky part is that you actually need to do a few modifications to what is said there, since in 2008 some Linux distros used the hotplug system which is now obsolete. First of all, modify the /etc/gpib.conf file to match the gpib-usb-b device, having a line like this:
board_type = "ni_usb_b" /* type of interface board being used */a
Alternatively, as I did, you can get a working gpib.conf file from here.
Now from either "your_linux_gpib_dir/usb/ni_usb_gpib/" or "/etc/hotplug/usb/" (where these files get installed by default), copy "ni_usb_gpib" to "/lib/udev" ("ni_usb_gpib.usermap" is not needed, since we'll be adding the necessary rules in the "/etc/udev/rules.d/" folder).
The next step is to download the ni_gpib_usb_b firmwire update from here and unzip the necessary contents (mainly ni_gpib_usb_b/) to "/lib/firmware/" (and NOT in "/usr/share/usb" as the README/INSTALL says - that's obsolete).
Now, since you have changed the location of the firmwire you should change the "/lib/udev/ni_usb_gpib" script. Update the "DATADIR" variable as follows:
DATA_DIR=/lib/firmwire
and then change all the occurrences of "$DATADIR/usb/" to "$DATADIR/".
Then modify also the last line of the ni_usb_gpib script (the one starting with $FXLOAD) with the following:
$FXLOAD -D ${DEVNAME} -I $FIRMWARE -s $SS_LOADER
The diff of the whole script is available here.
Next, create a file in /etc/udev/rules.d/ like "99-linux_gpib_ni_usb.rules" with this content:
SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="3923", SYSFS{idProduct}=="702[ab]", MODE="660", GROUP="plugdev", SYMLINK+="usb_gpib"
SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="3923", SYSFS{idProduct}=="702[ab]", RUN+="/lib/udev/ni_usb_gpib"
KERNEL=="gpib[0-9]*", ACTION=="add", MODE="660", GROUP="plugdev"
where "plugdev" is simply a group to which your user (the one that will be using the device) is a member (so that you don't need root access). The idVendor and idProduct are selected based on my "lsusb" output for the GPIB-USB-B device. You should put there the IDs matching your device, taking in consideration that idProduct will change from 702b to 702a when the firmwire is updated.
For additional reading on the topic of udev and its rules I recommend this, and this.
As a last thing, you might find that your GPIB-USB-B locks at some point. You can restart the device via something like this:
"sudo usb_modeswitch -p 702a -v 3923 -R"
You might need to install that via "sudo apt-get install usb-modeswitch".
In order to use the linux-gpib driver you can either use the C API or the Python bindings (which can be easily installed via "sudo apt-get install python-gpib").
Take it from there to suit your needs.