Setting up an environment under linux to use the UNET requires a few steps
which are different from those necessary to use standard PCI-based Excalibur
cards.  They include:

1)Creating a file called ExcaliburDevices.ini in the /etc/ directory which
should look something like this:

[DEV1]
DeviceType=EXC-1553UNET/Px
ConnectType=USB
IsRemote=00000001
ProductID=0x6010
VendorID=0x0403
Serial_Number=*
DebugTheseModules=00000000
[DEV2]
DeviceType=EXC-1553UNET/Px
ConnectType=NET
IsRemote=00000001
UDPPort=00001553
IPAddress=010.072.063.045
MACAddress=06:00:55:4E:45:54
DebugTheseModules=00000000
[DEV6]
DeviceType=EXC-UNET2
ConnectType=USB3XX
IsRemote=00000001
ProductID=0x601f
VendorID=0x0403
Serial_Number=*
DebugTheseModules=00000000

---------
Each UNET configured as USB device requires the following lines:
DeviceType=EXC-1553UNET/Px
ConnectType=USB
IsRemote=00000001
ProductID=0x6010
VendorID=0x0403
Serial_Number=*
DebugTheseModules=00000000

The UNET2 modular device has the following changes:
DeviceType=EXC-UNET2
ConnectType=USB3XX
ProductID=0x601f
VendorID=0x0403

For "Serial_Number=*"
- use * as a default if you have only one UNET connected
- if you have more than one UNET, you must enter the actual serial number
of the device (located on the back of the UNET);
e.g., s/n 123 should be listed as "Serial_Number=CEXC1553000123" for a 1553 UNET

For a 429 UNET, use
DeviceType=DAS-429UNET/RTx and
Serial_Number=CEXC0429000123

If you want to use an Excalibur PCI(e) card along with the UNET, make sure that the device number of that card is not
used in the ExcaliburDevices.ini file.  The device number is based on the dip-switch setting of the card and is always
between 0 and 15 inclusive.  It can be seen by looking for the "Unique ID" in the /proc/excalbr virtual file.
UNET device numbers can be greater than 15, so there is no need for a conflict.

A sample ExcaliburDevices.ini file is provided in this directory.

For "DebugTheseModules=00000000", 
- if you want debug turned on for Px module 0, set bit 00 to 1, i.e., 00000001
- if you want debug turned on for Px module 1, set bit 01 to 1, i.e., 00000002
- if you want debug turned on for the Discrete module, set bit 02 to 1, i.e., 00000004
- if you want debug turned on for the all modules, set all bits to 1, i.e., 00000007

---------
Each UNET configured as EtherNET device requires the following lines:
DeviceType=EXC-1553UNET/Px
ConnectType=NET
IsRemote=00000001
UDPPort=00001553
IPAddress=010.072.063.045
MACAddress=06:00:55:4E:45:54
DebugTheseModules=00000000

If you have changed the IPAddress or MACAddress of the device, you should list the
updated values here.

For "DebugTheseModules=00000000", 
- if you want debug turned on for Px module 0, set bit 00 to 1, i.e., 00000001
- if you want debug turned on for Px module 1, set bit 01 to 1, i.e., 00000002
- if you want debug turned on for the Discrete module, set bit 02 to 1, i.e., 00000004
- if you want debug turned on for the all modules, set all bits to 1, i.e., 00000007

2)In standard RHEL systems, the ftdi_sio kernel module is automatically loaded
when the UNET is plugged in to a USB port, and this will prevent the Excalibur
drivers from working.  The ftdi_sio can be removed manually with the command
(as root):
        modprobe -r ftdi_sio 
In order to automatically prevent the ftdi_sio from loading, insert the
following line into /etc/modprobe.d/blacklist.conf:
        blacklist ftdi_sio
To make sure that the ftdi_sio module is not loaded, call
	lsmod | grep ftdi_sio
which should not show any output.
(Note: either of these procedures will prevent any FTDI-based serial device
from working.  In case of such a conflict, the ftdi_sio must be allowed to
load, and then it must be unbound from the UNET by finding the device under
the /sys filesystem and writing to the unbind virtual file.  This should be a
very rare scenario.)

3)A USB device is given limited permissions by default when plugged in.  The
UNET needs read and write permissions to operate, so in order to use it as a
non-root user, it is necessary to add a file to the directory /etc/udev/rules.d/
(with a name such as 99-excalibur-unet.rules, for example), containing the
following lines;

ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666"
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="601f", MODE="0666"

To verify that this worked, call lsusb which should show a line like
	Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Then a call to ls -l /dev/bus/usb/001/002 should show something like
	crw-rw-rw-. 1 root root 189, 1 Jun 19  2017 /dev/bus/usb/001/002
showing that the UNET device is world-writable.

Now we provide a script called setup-UNET.sh which performs all the above
configuration. It needs to be run only once (as root) and after rebooting, the
system will be configured for the UNET (other than the library paths described
below.)

4)In order to compile the demos and any applications using the Excalibur
libraries for the UNET, it is necessary to link with the FTDI library
libftd2xx.a and Excalibur's board-level libraries libExc4000.a and libexchost2dpr.a
in addition to the library for the protocol being used (lib1553UNetPx.a for 
1553 or libExcDiscr.a for Discrete) as described in the README file in that protocol's directory. 

As of the latest version of Excalibur Software Tools, we support also the
modular UNET2.  This change in the library necessitates linking with the
provided libftd2.so and libftd3.so shared libraries.  This is necessary even
for programs which do not use the UNET or UNET2!  (See Makefiles in the Demo
directories for examples of compiler command lines.)

At runtime these shared libraries must be available to the program either by
placing them in a system library path such as /usr/local/lib or by setting the
LD_LIBRARY_PATH environment variable to include the directory where they are
located, i.e. by executing
export LD_LIBRARY_PATH=.
before running the program (if the .so libraries are located in the current
directory.)

A script named setupenv is included which will add the lib directory under
this installation to LD_LIBRARY_PATH.  Run as follows:

. setupenv

5)Note: The Excalibur PCI/PCMCIA kernel drivers are not needed to use the UNET.

6)Individual README files for each Software Tools:
More detailed instructions on use of the Software Tools is contained in the
specific README files in the directories of the specific Software Tools packages.

7)UNetPhex Memory Dump Tool
The directory UNetPhex contains code and an executable for the UNetPhex utility
for dumping memory on Excalibur modules.
