FarSync Drivers | ![]() |
![]() |
---|
There are a number of ways of checking the operational status of the farsync or fsflex driver and the associated ports. This section outlines a few commands that may be used to answer some common questions.
When nothing seems to work, or the Linux system does not seem to know about the existence of the FarSync devices then the first thing to check is to see if the FarSync drivers have been loaded. Use the ls command to check for the existence of /proc/farsync and /proc/fsflex. If these files exist then the drivers are loaded.
If the drivers are loaded but the interfaces still do not work, then the next thing is to check that the cards are running. Use the "more /proc/farsync" command to check the State of the card and that it is Running, e.g.
[root@odeon ~]# more /proc/farsync FarSync WAN Driver version 1.09.05 - Patch Level 00 - Build -b23 1 Cards found hdlc0-hdlc3:(W7418039) FarSync T4U IRQ5, 4 ports, State: Running Total number of ports = 4 Total number of async connects = 0 [root@odeon ~]#
Note that if you have more than one card installed the second card may show a State of Reset. This may be because the card has not been downloaded and started because there was no config file to trigger this processes when the driver is started. This is not a problem, but the situation can be rectified so that the card is loaded by just creating a config file for the first port on the card.
Please also note that if you are not using the first port on the card, and therefore have deleted or not created the config for the first port, the card will not be loaded when the driver is started.
Use the "more /proc/fsflex" command to check that the USB devices have been enumerated, e.g.
[root@odeon ~]# more /proc/fsflex FarSync Flex WAN Driver version 1.09.05 - Patch Level 00 - Build -b23 2 Cards found hdlc4-hdlc4: FarSync Flex-1 (U0010063), 1 ports, State: Running hdlc5-hdlc5: FarSync Flex-1 (U0010096), 1 ports, State: Running Total number of ports = 2 Total number of async connects = 0 [root@odeon ~]#
Use the "farutil hdlc0" command to check the configuration is as you expect.
[root@zaphod ~]# farutil hdlc0 Farutil for FarSync version 1.09.05 card: T4E+ FarSync WAN T-Series ports: 4 state: Running normally firmware id: 5 firmware vers: 3.00.00 Async ports present Clock Synthesiser present Configuration for port 0 physical: X.21 (RS422/V.11) cable status: Cable presence detected active inputs: None active outputs: Control clock: Internal detected speed: 10000000 encoding: Manchester NRZIClocking: Disabled termination: Resistive protocol: Sync PPP linemode: HDLC Buffer configuration: no of rx buffers: 16 size of rx buffers: 4096 no of tx buffers: 8 size of tx buffers: 8192 [root@zaphod ~]#
If you have set external clocking, then the "clock" field should indicate if the clock has been detected or not. The clock detection circuits on the FarSync device may not work at speeds lower than 2400 bps. If the clock is not detected it may indicate a cable issue.
You may also like to check the "active inputs" field. If there are none, then is this may also indicate a cable issue.
Use the ifconfig command with no parameters. This lists all the interfaces in the UP state. If the FarSync interface is not listed then it hasn't been set up with an ifup or ifconfig command.
[root@zaphod ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:E0:81:2B:C7:C0 inet addr:193.240.96.206 Bcast:193.240.96.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:81ff:fe2b:c7c0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:793 errors:0 dropped:0 overruns:0 frame:0 TX packets:471 errors:0 dropped:0 overruns:0 carrier:0 collisions:3 txqueuelen:100 RX bytes:157516 (153.8 KiB) TX bytes:103548 (101.1 KiB) hdlc0 Link encap:Point-to-Point Protocol inet addr:10.0.0.1 P-t-P:10.0.0.2 Mask:255.255.255.255 UP POINTOPOINT NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:17 Base address:0xa800 Memory:ff420000-ff430000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1326 errors:0 dropped:0 overruns:0 frame:0 TX packets:1326 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2150068 (2.0 MiB) TX bytes:2150068 (2.0 MiB) [root@zaphod ~]#
Use the farutil hdlc0 stats command to get detailed stats on the interface.
[root@zaphod ~]# farutil hdlc0 stats Farutil for FarSync version 1.09.05 card: T4E+ FarSync WAN T-Series ports: 4 state: Running normally Port Statistics: Rx packets 100 Rx bytes 150000 Tx packets 100 Tx bytes 150000 Rx errors 0 Tx errors 0 Rx dropped 0 Tx dropped 0 Rx errors detail: Tx errors detail: Rx length 0 Tx aborted 0 Rx over run 0 Tx carrier 0 Rx crc 0 Tx fifo 0 Rx frame 0 Tx under run 0 Rx fifo 0 [root@zaphod ~]#
Use the "tail /var/log/messages" file to check for any errors.
Use the farutil hdlc0 stats command to get detailed stats.
While the default values of the card transmit and receive buffers (8 buffers of 8192 bytes) should be sufficient for WAN operation, they may need to be tuned for some OEM applications. Check the Kernel log file for the following condition:
Receive Buffer Unavailable
If see see error messages in the Kernel log indicating that a
receive buffer was not available when required, e.g.
May 20 15:16:36 zaphod kernel: fst:
Rx buffer unavailable on card 0 port 0
This usually indicates that the card is receiving data faster than the
driver can copy it. This can happen when the receive frame size is
small and the link speed is high. It indicates that you need to configure more receive buffers for
the port. The default is 8 buffers, and this can be increased with
the numrxbuffers/sizerxbuffers command.
A simple line monitor that dumps transmit and receive frames is provided in source form. To build it change to the common/ directory and enter the following command:
make farmon
and then execute it with the following command:
./farmon hdlc0
it will provide an output something like:
[root@odeon kernel2.6-hdlc]# ../common/farmon hdlc0 Opening port hdlc0 to monitor Setting up Signal and Exit handlers hdlc0 TX: Seq: 13: Time 151365: Len 12 0804a1d0: ff 03 c0 21 09 04 00 08 00 02 28 35 ...!......(5 hdlc0 RX: Seq: 14: Time 151368: Len 12 0804a1d0: ff 03 c0 21 09 04 00 08 00 02 2d 7e ...!......-. hdlc0 TX: Seq: 15: Time 151368: Len 12 0804a1d0: ff 03 c0 21 0a 04 00 08 00 02 28 35 ...!......(5 hdlc0 RX: Seq: 16: Time 151372: Len 12 0804a1d0: ff 03 c0 21 0a 04 00 08 00 02 2d 7e ...!......-.
Copyright 2001-2010 FarSite Communications Ltd. |
![]() |
---|