Driver Commands
At the heart of the WANPIPE driver operation is the 'wanrouter' operation script. It is used to start/stop/restart and display WANPIPE current status and environment.
usage: /usr/sbin/wanrouter <command>
Â
Sangoma Card Commands
All Sangoma Card control commands start with the 'wanrouter'
Â
Usage:Â wanrouter:Â {options}Â <wanpipe#> <interface>
 The following commands are executable commands that you type in your Linux command line
Command | What does it do? |
---|---|
wanrouter start | Starts all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES |
wanrouter stop | Stops all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES |
wanrouter restart | restarts all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES |
wanrouter start <wanpipe#> | Starts a single port on your card. |
wanrouter stop <wanpipe#> | Stops a single port on your card. |
wanrouter restart <wanpipe#> | Restarts a single port on your card. |
wanrouter start <wanpipe# if_name> | Starts a single interface on the port of your card |
wanrouter stop <wanpipe# if_name> | Stops a single interface on the port of your card |
wanrouter restart <wanpipe# if_name> | Restarts a single interface on the port of your card |
wanrouter list | lists all active ports on your card. |
wanrouter modules | Displays the Sangoma Driver (a.k.a Wanpipe) kernel modules |
wanrouter status | Displays all active ports for all Sangoma cards in your system. |
wanrouter summary | Summary of configuration files for your card, which are all located in /etc/wanpipe directory |
wanrouter hwprobe | Displays all detected Sangoma Cards in your server. |
wanrouter conflogs | Displays Sangoma driver configuration file syntax errors |
wanrouter messages | Displays Sangoma driver kernel event messages |
wanrouter version | Displays Sangoma driver version number. Useful to identify the age of your driver in comparison to the latest release |
Â
Kernel Driver Errors
All Card and driver errors/events will be displayed in:
-> /var/log/messages
To watch the errors/events live on your Linux command line type:
-> tail -f /var/log/messages
Â
Line Errors and Driver Statistics
After a successful Driver startup,any extra debugging, such as line tracing or CSU/DSU debugging, will be performed using:
/usr/sbin/wanpipemon -g
For automated Line Error debugging run:
/usr/sbin/wanrouter debug <if_name>
   where <if_name> is wanpipe interface name.
Â
Â
Driver Power User Operation
Â
Wanpipe package contents
Wanpipe Kernel Drivers
   The drivers are listed in order of dependency.
        sdladrv.o               : Hardware Layer
        wanrouter.o         : Wanpipe Protocol Interface Layer
        wanpipe_syncpp.o   : Wanpipe PPP/CHDLC Protocol
        wanpipe.o            : Wanpipe multi-protocol layerÂ
                                 (Frame-Relay,PPP,CHDLC,...)
        af_wanpipe.o       : Wanpipe API socket layer
Â
User space programs
Â
Â
2.1 Configuration (/usr/sbin)
wancfg: Wanpipe configuration tool
Â
cfgft1: Wanpipe FT1 config tool for S508FT1 and S5143 cards
           (For all other cards use wancfg)    Â
2.2 Operation (/usr/sbin)
wanconfig
Wanpipe operation tool that parses the config file and executed config ioctl() calls to the kernel driver.
wanconfig -a /etc/wanpipe/wan_adsl.list card wanpipe1 up
wanrouter
Wanpipe operation script used to start/stop/restart Wanpipe drivers. The wanrouter script uses the above wanconfig to start wanpipe as well as standard "ifconfig" to bring all necessary interfaces up.
Â
2.3 Debugging/Monitoring
wanpipemon
Wanpipe debugging application used to debug the hardware, drivers and sync line.
      Graphical Mode: wanpipemon -g
      Raw trace: wanpipemon -i <if name> -c tr
        Interpreted trace: wanpipemon -i <if name> -c ti
        Alarms : wanpipemon -i <if name> -c Ta
       Hardware echo canceller monitoring: wanpipemon -i <if name> -c ehw
Â
Â
Driver Manual Startup
If a power user desn't want to use the wanrouter master script. Here is the break down of the wanpipe startup sequence:
Â
wanrouter start
Â
Load Kernel Modules
       insmod sdladrv.o
       insmod wanrouter.o
       insmod wanpipe_syncppp.o
       insmod wanpipe.o
       insmod af_wanpipe.o
   or
        modprobe af_wanpipe
Configure and Start Drivers
If using ADSL
  /usr/sbin/wanconfig -a /etc/wanpipe/wan_adsl.list card wanpipe1 up
else
   /usr/sbin/wanconfig card wanpipe1 up
Start up all network interfaces
ifconfig wan0 <local ip> pointopoint <remote ip> netmask 255.255.255.255
Confirmation
tail -f /var/log/messages
Check the events and driver statistics.
cat /proc/net/wanrouter/status
Check driver state
Â
wanrouter status
Driver External Scripts
Â
The wanrouter utility will also EXECUTE any external
script that is located in /etc/wanpipe/scripts directory.
Furthermore wanrouter utility will execute number of
scripts depending on what is being started or stopped.
Global Start/Stop Script
------------------------
   Â
   Global Start : wanrouter start
   Global Stop  : wanrouter stop
   Global Restart: wanrouter restart
   Script Location:   /etc/wanpipe/scripts
   Â
    Start Script Name: start
   Â
      Script "start" will execute after a sucessfull
      "wanrouter start" command. The wanrouter startÂ
      command   will start one or more configuredÂ
      wanpipe devices.
    Stop Script Name : stop
      Script "stop" will execute after a sucessfull
      "wanrouter stop" command. The wanrouter stopÂ
      command   will stop one or more configuredÂ
      wanpipe devices.
Â
Device Start/Stop Script
------------------------
   Device start : wanrouter start wanpipe1
   Device stop  : wanrouter stop wanpipe1
   Device restart: wanrouter restart wanpipe1
   Â
   Script Location:   /etc/wanpipe/scripts
   Â
    Start Script Name: wanpipe#-start Where #={1,2,3,4...}
   Â
      Script "wanpipe1-start" will execute after:
         -> Device Start
         -> Global Start (if wanpipe1 is part of the start list)
      Â
   Stop Script Name : wanpipe#-stop  Where #={1,2,3,4...}
      Script "wanpipe1-stop" will execute after:
         -> Device Stop
         -> Global Stop (if wanpipe1 is part of the start list)
Â
Interface Start/Stop Script
---------------------------
   Interface start : wanrouter start wanpipe1 w1g1
   Interface stop  : wanrouter stop wanpipe1 w1g1
   Interface restart: wanrouter restart wanpipe1 w1g1
   Â
   Script Location:   /etc/wanpipe/scripts
   Â
    Start Script Name: wanpipe1-w1g1-start
   Â
      Script "wanpipe1-start-w1g1" will execute after:
         -> Interface Start
         -> Device Start
         -> Global Start (if wanpipe1 is part of the start list)
      Â
    Start Script Name: wanpipe1-w1g1-stop
   Â
      Script "wanpipe1-stop-w1g1" will execute after:
        -> Interface Stop
        -> Device Stop
        -> Global Stop (if wanpipe1 is part of the start list)