Farsync card

From Opendigitalradio
Revision as of 12:09, 16 April 2020 by Andimik (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Use with ODR-DabMux

To use the Farsync card with the ODR-DabMux multiplexer, the raw output has to be used:

raw://<device name>

<device name> is the name of the device under linux.

Usually, it is

raw://sync0

See below for more information on the farsync card on Linux.

Some information about the FarSite FarSync TE1 card

http://www.farsite.com/synchronous_X.21_RS422_V.35_RS530_PCI_PCIe_cards/farsync_e1_G.703_G.704_pci_card_linux_windows.shtml

The TE1e model is preferred because the external clock input will allow you to connect a reference to avoid clock drift between audio encoders, multiplexer and modulators.

About clock sources: Media:TE1eExtSyncClockConfigForSFN-V2.pdf


On 05. Nov 2013, Kevin Curtis (FarSite) has communicated the following to the mmbTools mailing list:

Driver versions.

We try our best to keep up with the new Kernel releases, but this is sometimes an impossible task, so we now just try and keep up with the Ubuntu releases instead. However, if you do not find a release of the drivers that is compatible with the Kernel version that you need to work with, then please email support@farsite.com and will will do our best to resolve your issue.

Driver version compatibility

Each new release of the FarSync driver usually adds new functionality, and this normally means that the fstioc_info structure, which is used to pass configuration/ststus information between the farsync driver and an application, is changed also. We add new configuration/status fields to the end of the structure. In order to save you having to rebuild your application, say for example the CRC-DabMux tool, each time we make a release we have made it possible to tell the driver to be compatible with a specific previous version of the fstioc_info structure. This can be done in various ways. For example:

  • specify the base fstioc_info structure version at module load time. This is then the default value for all API sessions. If there is not a value set at module load time, then the structure version is assumed to be the latest version.
  • use the farutil <device> set_iocver <version> command. This will set the base version for a give FarSync port, e.g. sync0.
  • the application can use the ioctl(FSTCMD) with the command value of FSTCMD_SET_VERSION

In the case of the MMB Tools I suspect you would use the first option and select the structure version at module load time.

We have been using version numbers since 1.09.xx and for the FarSync base 2.1.x release the version numbers and their meanings are as follows:

  • 0 - compatible with versions 1.07.xx to 1.09.02
  • 1 - compatible with version 1.09.03 and 1.09.04
  • 2 - compatible with version 1.09.05
  • 3 - compatible with version 2.0.x
  • 4 - compatible with version 2.1.x

Setting the version with the module runtime parameter

The farsync and fsflex drivers can be passed a module load time parameter called fst_iocinfo_version. Depending on how the module is loaded the value can specified in one of two ways:

when using modprobe to load the kernel modules, add the following lines to the /etc/modprobe.conf file

       options farsync fst_iocinfo_version=<value>
       options fsflex fst_iocinfo_version=<value>

when using insmod to load the kernel module, append the parameter to the insmod command, for example

       insmod farsync.ko fst_iocinfo_version=2
       insmod fsflex.ko fst_iocinfo_version=2

Setting the version using the farutil command

When using the farutil command to set the compatibility version number please make sure that it is used before the FarSync port has been opened for use. When you have set the value you can check it has been set correctly. Here is an example:

farutil sync0 set_iocver 3
farutil sync0 get_iocver 


Setting the version using the ioctl(FSTCMD)

If you want to be sure that your application will always work with a given version of the structure you can add the following to the initialisation section of your code:

static void
do_set_iocver (int version)
{
   static struct fstioc_cmd my_cmd;
   unsigned char iocinfo_version;

   iocinfo_version = version;
   printf("Requesting IOC Info structure version to be %d\n",
   iocinfo_version);
   my_cmd.command = FSTCMD_SET_VERSION;
   my_cmd.version = 1;
   my_cmd.input_data_len=1;
   my_cmd.status = 0x55555555;
   my_cmd.data_ptr = &iocinfo_version;
   req.ifr_data = (char *)&my_cmd;
   if (ioctl(sock, FSTCMD, &req))
   {
       perror("Error in setting IOC Info version number\n");
       exit(0);
   }
   if (my_cmd.status == 0xaaaaaaaa)
   {
       printf("IOC Info version set to %d\n", iocinfo_version);
   }
   else
   {
       printf("Error processing IOC Info version. Status is %x\n", my_cmd.status);
   }
}


How do I know what my device names are called? You can use the command "cat /proc/farsync"

# more /proc/farsync 
FarSync OEM Driver version 2.0.8 - Patch Level 00 - Build -b191
2 Cards found
       sync0-sync1:(K4739218) FarSync T2U     IRQ193,  2 ports, State: Running 
       sync2-sync2:(K5329089) FarSync TE1     IRQ185,  1 ports, State: Running 
Total number of ports = 3

Note also that the State should be Running, and if it not this value there may have been a problem loading the card with it firmware. Consult the Trouble Shooting Guide on the product CD for more help in this case.

Versions of FarSync TE1 cards.

We now have three versions of the FarSync TE1 card as follows:

  • TE1: A single port PCI card with an RJ48 and BNC tx and rx connector.
  • TE1R: A single port PCI card with a RJ48 connector only
  • TE1e: A single port PCI Express with an RJ48 and BNC tx and rx connector with an external clock input of up to 10mhz through a SMA connector is supported to allow synchronisation of the output data clock, to, for example, a GPS source.


Compilation Errors on install

If you are installing the FarSync drivers and encounter compilation errors when building the driver, then check to see if there is a later version of the driver for download on our website. If there is a later version then please use this one.

If there are still compilation errors, check to see if there are any patches for this version of the driver on our website. If there are please install them.

If there are still compilation errors then contact support@farsite.com

The farsync drivers and latest patches can be found at http://farsite.com/custsupp/Download_FarSync_software.htm

Application Stability Issues

If your application crashes as soon as it is started, then it may have been compiled for an earlier version of the FarSync driver. Loading the farsync module specifying the correct fstioc_info version will probably resolve the issue.

Personal tools