Windows and Mac OSX operative systems are not very restrictive with permissions and one can usually access the serial ports with any particualr effort. Linux systems, however, are a bit mor restictive and it may happen that one does not have the access rights to read or write in the the serial port. In modern Linus distributions it is enough to belong to the dialout group in order to have access to /dev/ttyUSBn device file. If your user does not belong to that group then you will have to add it. To check if you are already in the dialout group type
id
Older distributions of Linux used the udev™ package. When installing alibava-gui as a super user, a new group will be created named alibava. Also a new udev rule will be added granting read/write permissions to the members of that group. In order to grant any user with read/write permissions on the USB bus you will have to make him/her a member of the alibava group. This must be made as super user by typing the following
/usr/sbin/usermod -aG alibava {your user name}
For that to work the installation should be made as super user. If you installed alibava-gui withour root privilegues, then you will have to create the alibava group and install the udev rules manually as root by typing
/usr/sbin/groupadd -f alibava
followed by the execution the script install-udev.sh. The script can be found on the top folder of the distribution bundle.
To check that the installation has been done properly, plug in an Alibava card on your USB hub and check that there is a file called /dev/alibava0. If this is so the udev rules are properly installed and the members of the alibava group will be able to read from and write to the device. Also, alibava-gui will automatically detect in which port the Alibava card is connected. If alibava-gui is not able to figure out that, it will quit unless you force the program to try to open another device at the command line (see Section 2.2 ― How to launch the program).
In some versions of Linux, the udev rules defined in install-udev.sh do not work and one can just add the user to the dialout group with the same command as for the alibava group.
In alibava-gui version older than 0.1.6-3 the program was not able to detect the Alibava card and no udev rules were provided. In that case one was forced to do things manually. In order to allow alibava-gui to read from and write to the device there were a number of steps to follow which are explained below.
When the Alibava card is plugged in the computer, the driver decides which port to use and alibava-gui did not have any means of discovering which one it was in an automatic way.
After plugging in the card, one should type
dmesg
and look for the port that the driver has selected. The name is usually /dev/ttyUSBn where n is 0 most of the times. Another problem encountered quite often is that a normal user does not have read/write permissions. To solve that you should type
change_priv n
where n is the number you found for /dev/ttyUSBn. If it is 0, you do not need to specify it.
change_priv needs super user permissions. That means that you should install alibava as super user. This will make the program run with superuser attributes even if you launch it from within your account.
Once this is done, one launches the alibava application by typing
alibava-gui [options] [config_file]
where config_file a file where all the settings have been saved. The options can be
--gui | Shown the main GUI. This is the default |
--no-gui | The program runs without a GUI |
--emulator | Simulates (Emulates) the data. Useful to get familiar with the application |
--nevts=n | Set n as the maximum number of events in the run |
--sample=n | Number of events to acquire in the motherboard before transmitting the data to the PC |
--dev=/dev/ttyUSBn | Set /dev/ttyUSBn as the port to communicate with the motherboard in case n is not the usual 0 |
--out=out_file_name | Sets the path and name of the output data file |
--pedestal | Acquire a Pedestal run when in no-gui mode |
--source | Acquire a RadSource run when in non-gui mode. Other required settings should be provided through a configuration file. |
--calib | Acquire a Calibration run when in non-gui mode. Other required settings should be provided through a configuration file. |
--laser | Acquire a Laser run when in non-gui mode. Other required settings should be provided through a configuration file. |
--activate-plugin | Activates the plugin if defined in the configuration file. |
--firmware=n | Forces a given version of the firmware. |
--soap-port=nn | port number ofr the alibava-gui soap server |
In general, when running in GUI mode, all the options listed above can be set in the various dilaogs. One could, for instance give some of the options at the start of alibava-gui to have those values by default at the beginning. When running in non GUI mode options need to be provided to change the default values. Note also that some of the options in the table above assume that there is some more information in a configuration file provided at the command line. Most of the times the default values of the program will not procuded the expected effect. This is particularly true for the scan parameters needed when making calibration runs.
Older versions of the alibava-gui program (before 0.4.0-1) used to assume that the firmware version was 0. If this is not the case, when running in non-gui mode one has to specify the firmware version. There are currently version 0 (the very first), version 1 and version 2, which is handled form alibava-gui version 0.4.0-1.