FarSync Drivers | ![]() |
![]() |
---|
If you have a number of FarSync Flex USB devices in your system, then you may find that each time the system is restarted, or you unplug them and plug them back in again, the device name for a particular device changes. There is a way to fix the name to a device serial number to ensure that it always has the same device name.
Previously, the mapping of Flex's to specific device numbers was achieved through the use of udev, but due to the ever evolving nature of the Linux Kernels, it was decided that the mapping functionality should be placed within the Farsync Flex driver itself.
Since release 2.0.1 of the Farsync driver, the mapping is now achieved through the use of the following configuration file:
/etc/farsite/farsync/serials.config
Entries in the configuration file are of the following format:
6 U0010009 7 U1040177
This example matches the Flex with serial number U0010009 to hdlc6 or sync6 (for the WAN and OEM drivers respectively) and Flex U1040177 to hdlc7 or sync7.
The configuration file is read when the flex driver is loaded. If a device number is already in use (say for the farsync cards - which are loaded before the Flex's), then the request for the mapping will fail and the Flex will not be installed.
To see which device numbers are already in use by the Farsync cards and Flex's, type the following commands:
# more /proc/farsync # more /proc/fsflex
To enable the mapping of Flex's to specific device numbers, the following steps are required:
In the kernel-oem directory, edit the Makefile. At the end of the
EXTRA_CFLAGS line add the following: -DSPECIFY_DEV_NAME
Then do:
# make clean # make # make install
In the directory /etc/farsite/farsync, edit the serials.config file as
desired.
Then stop and start the driver with:
# /etc/init.d/farsync stop # /etc/init.d/farsync start
To check if a Flex has been mapped to a particular device number, you can do:
# more /proc/fsflex
For the WAN driver, things are a little more complicated as the default HDLC module doesn't let you specify your own device numbers. We have provided a patch for the HDLC module which changes this behaviour, so that you can specify a device number.
Note: This functionality is only available for Linux kernels 2.6.25 and later.
If you require this functionality for earlier versions of the kernel, please
contact farsite support at
support@farsite.com.
Follow the instructions for downloading the Kernel source
and for building the HDLC module.
Additionally you will also need to copy the usr/src/linux/include/linux/hdlc.h
to the kernel-hdlc directory
In the kernel-hdlc directory, edit the
Makefile. At the end of the EXTRA_CFLAGS line add the following:
-DSPECIFY_DEV_NAME
Then do:
# make clean # make (the hdlc module is patched as part of the make) # make install
In the directory /etc/farsite/farsync, edit the serials.config file as
desired.
Then stop and start the driver with:
# /etc/init.d/farsync stop # /etc/init.d/farsync start
To check if a Flex has been mapped to a particular device number, you can do:
# more /proc/fsflex
If a configuration file doesn't exist or if -DSPECIFY_DEV_NAME is not declared in the Makefile, then the device numbers are allocated incrementally with the next free device number.
Copyright © 2001-2021 FarSite Communications Ltd. |
![]() |
---|