
Installing Linux-GPIB user space
--------------------------------------------------------------------------

A) First steps:
--------------------------------------------------------------------------

o) Unpacking the Software:
	"linux-gpib-user" contains the userspace components of
	Linux-GPIB (the C library, etc.).  For a functioning system
	you will also need the driver components contained in 
	"linux-gpib-kernel". "linux-gpib-kernel" contains the code
	for gpib modules which are loaded into Linux kernel.
	This install file describes the installation of "linux-gpib-user".
	
	Unpack the archives with the 'tar' program, for example
	'tar -xzf linux-gpib-user-4.2.0.tar.gz'.  


B) Installing Linux-GPIB user space
--------------------------------------------------------------------------

o) cd to your linux-gpib-user directory and run the './configure' script.
	Typically it would be run as:
	
	./configure --sysconfdir=/etc
	
	Run './configure --help' for a list of additional options.
	
	If the configure script does not exist (you are using a svn
	checkout), it can be generated by running the './bootstrap'
	script.  You will need automake, autoconf, etc. to generate
	the configure script.

	Type 'make'.  Now the package will be compiled.

	Type 'make install' (as root).  This will
	install the library, header files, etc.  Make sure the
	directory you installed the shared library to is listed in
	your /etc/ld.so.conf file, so that ld can find libgpib.so.  If
	the directory is not listed, add it and then run 'ldconfig'.

	With the default setup, to give a user access to the
	computer's gpib boards you will have to add them to the group
	'gpib'.  If this group does not already exist on your computer
	you may add it by running the command 'groupadd gpib' as root.
	You can then use the 'usermod' tool or edit /etc/groups to
	change the groups the user account belongs to.  Or, you could
	change the permissions on the device files /dev/gpib[0-15] to
	something you like better.  If you are using udev, you can set
	the permissions on the gpib device files with a line like:
	KERNEL=="gpib[0-9]*", MODE="0660", GROUP="gpib" in your udev
	rules.  This is already done by default if you ran
	./configure --sysconfdir=/etc.
        (see $(sysconfdir)/udev/rules.d/99-gpib-generic.rules
	installed by 'make install')

	In the unlikely case you are not using udev, you can use 'chmod' 
	(or edit devfsd.conf if you are using devfs) to change the
	device file permissions.  You may also
	need to manually create the device files /dev/gpibX if they
	don't already exist.  This can be done by running 
	'make device_files_install'.
	
C) Configuring the driver modules
-----------------------------

o) PCMCIA cards

	If you are using a PCMCIA board, copy the files in the etc/pcmcia
	subdirectory to /etc/pcmcia.  You may need to send a SIGHUP signal
	to the cardmgr daemon to force it to reload the files in 
	/etc/pcmcia (alternatively you could use your pcmcia init.d script
	to restart the cardmgr, or you could just reboot).  The driver
	module will be loaded as needed by the cardmgr.
	You may wish to edit the options passed to the gpib_config call in the
	/etc/pcmcia/linux-gpib-pcmcia script.

o) USB devices

	USB hotplug scripts will be installed into
	$sysconfdir/hotplug/usb if they do not already exist.  You may
	wish to edit the GPIB_CONFIG_OPTIONS in the hotplug script for
	your device.  If your device requires external firmware you
	will also need to install firmware files for your device, a
	tarball is available from
	https://linux-gpib.sourceforge.io/firmware/.  Make sure you
	have the "fxload" and either the "hotplug" or "udev" packages
	installed on your computer.  The hotplug scripts will
	automatically upload the firmware to your device and load the
	driver module when the device is plugged in.  If you have
	errors, check your system log files (not dmesg) for messages
	from the hotplug scripts.  For systems using udev the rules
	files in $sysconfdir/udev/rules.d/usb should be installed in
	/etc/udev/rules.d/usb.  This is already done by default if you
	used ./configure --sysconfdir=/etc. The udev rules invoke the
	USB hotplug scripts.  Only in the unlikely event that you do
	not use udev and need hotplug and $sysconfdir != /etc then the
	hotplug files in $sysconfdir/hotplug/usb will need to be
	installed in /etc/hotplug/usb.

	Using multiple-boards of the same type with hotplug requires
	udev support: In the hotplug scripts you can use either the
	serial number $SERIAL or the device path $DEVPATH to decide
	which board is to be associated with which minor in your
	gpib.conf.  Using serial number it does not matter which usb
	ports you use.  Using device path the association will be made
	with the physical usb port in your system. To obtain the
	serial numbers or device paths for your boards plug the boards
	in and check the syslog for the output from the default
	hotplog script. The order of the messages will correspond to
	the order in which you plugged the boards in. Edit the hotplug
	scripts to setup the serial numbers/device paths and minors
	that correspond to your system.
	
D) Configuring the GPIB-Library
-------------------------------

	You may edit $sysconfdir/gpib.conf to set defaults for gpib_config, and 
	add any	devices you wish to open via ibfind().  See the documentation
	in doc/ for more information.

	You need to run the 'gpib_config' utility to setup the driver
	before you can use it (the 'minor' options specifies which
	board index you are setting up):

	gpib_config --minor 0
	
E) Trying it out
----------------

	You may find the examples/ibtest program useful as a starting
	point in trying out your setup.  The examples/ibterm program
	provides a simple terminal interface to send commands to a
	specific instrument and view the response.

F) Bindings for other languages
-------------------------------

	The bindings to other languages will be enabled by default in the
	'./configure' script.  They will not be built if you disable
	them with the appropriate configure option, or if the necessary
	header files/libraries are not found on your machine.

G) Uninstalling
---------------

	Type 'make uninstall' as root in the same directory from which
	the package was originally installed. (linux-gpib-user-4.x.x/)

	Note: The configuration files and scripts are not uninstalled
	by this procedure. They need to be removed manually if you
	wish to re-install the standard distribution configuration
	files and scripts later since existing files are not
	overwritten by the install procedure. Check the following file
	and directories:

	      $sysconfdir/gpib.conf
	      $sysconfdir/hotplug/usb/
	      $sysconfdir/udev/rules.d/