Editorials - Steps in making your Linux running ISDN
Apply's for kernel 2.0.x & 2.2.x


    Ok, you got your self an Internal ISDN card and you wish it to work under linux...
    I must tell you this will be a nice journey, it can be long also but the buttom line - It is working!.

    What is the first step you must take when you wish to get your card working? Or even when you are on the market shopping for a new card? You most look at the HiSAX.readme to see if your card is listed their as supported. If its not on the supported card list (which is on our main ISDN page) don't buy it or try to replace it.
    Currently all the major ISDN manufactures got support for their cards under the HiSAX driver.

    What is the HiSax Driver?
    HiSax is a Linux hardware-level driver for passive ISDN cards with Siemens chipset (ISAC_S 2085/2086/2186, HSCX SAB 82525). It is based on the Teles driver from Jan den Ouden. It is meant to be used with isdn4linux, an ISDN link-level module for Linux written by Fritz Elfert. The driver was written by Karsten Keil.

    Good, your card is supported so whats next?
    Kernel 2.0.36 (the stable kernel) have added ISDN support for much more cards and drivers by adding HiSAX as part of it. But, HiSAX is still a work in progress, can be even a new version every day. So, what should you do?
    The HiSAX development and new versions are locates on SuSE FTP area. What you need to do is ftp to ftp.suse.com and go to /pub/isdn4linux/v2.0/isdn and get the latest one. They are uploaded as isdn-xxxxxx.tar.gz where xxxxxx stands for the date (16-02-99 is the latest, isdn-9902161200.tar.gz).

    Good now you have the lates ISDN support available for your machine but it is not compiled onto your kernel... Yes a kernel compilation is needed :-) . Don't be worried to much. The kernel-HOWTO can help you a lot to understand how to compile the kernel.
    If you downloded isdn-xxxxxx.tar.gz newer than 15.11.98 than you should open it on your /usr/src directory and it will be opened to the right directories updating your linux source.

    What should you check for compilation onto the kernel when compiling?

      Section "Code Maturity level options":
      Prompt for development and/or incomplete code/drivers: No

      Section "General Setup":
      Networking support: Yes

      Section "Networking options":
      TCP/IP networking: Yes
      all other items are up to you.

      Section "Network device support":
      Network device support: Yes
      PPP (point-to-point) support: Yes
      all other items are up to you

      Section ISDN subsystem":
      <M> ISDN support (NOTE: if your card is PnP you need to answer M for Module other wise it will not work)
      <Y> Support synchronous PPP (NEW)
      <Y> Use VJ compression with synchronous PPP (NEW)
      <Y> Support Audio via ISDN (NEW)
      <Y> Support generic MP (RFC 1717) (NEW)

      <M> HiSAX Siemens ChipSet driver Support (NEW)

        <Y> HiSAX Support for Euro/DSS1 (NEW)
        This is the ISDN protocol used in my country
        <M> HiSAX Support for Teles 16.3c (NEW)
        Now you need to mark your card. If your card is PnP you need to mark it with M as Module!
        I have Teles 16.3c PnP so i marked it as a module

    I assume now that you have compiled your kernel succesfully. Again if you encounter any problams go read the The kernel-HOWTO.
    The kernel has the ISDN support, this stage of detecting your card is not finished yet.
    Now you have to go to read our "Howto use the HiSAX ISDN Driver" which is also found on site.
    Basiclly it is explaining how to load the HiSAX driver and which settings are needed for different cards. If you have a PnP card you will also need to use pnpdump utility and configure /etc/isapnp.conf so Linux will know to load your card succesfully.
    I will give an example with my experience with my Teles 16.3c PnP card:

    As root:

      #pnpdump > /etc/isapnp.conf
      I now edited the file and put my card settings by unchecking the # were needed
      and on (ACT Y) to operate it (This are MY settings your may be different!)

        (INT 0 (IRQ 9 (MODE +E)))
        (IO 0 (BASE 0x0580))
        .
        .
        (ACT Y)
        ))

      Last thing was to edit /etc/modules on my Debian 2.0 linux, and to put this line:

        hisax type=14 protocol=2 irq=9 io=0x580

      Now Reboot

      When booting into linux you should see something similar to (this is the HiSAX.readme example):

        Apr 13 21:01:59 kke01 kernel: HiSax: Driver for Siemens chip set ISDN cards
        Apr 13 21:01:59 kke01 kernel: HiSax: Version 2.9
        Apr 13 21:01:59 kke01 kernel: HiSax: Revisions 1.14/1.9/1.10/1.25/1.8
        Apr 13 21:01:59 kke01 kernel: HiSax: Total 1 card defined
        Apr 13 21:01:59 kke01 kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax1 (0)
        Apr 13 21:01:59 kke01 kernel: HiSax: Elsa driver Rev. 1.13
        ...
        Apr 13 21:01:59 kke01 kernel: Elsa: PCF-Pro found at 0x580 Rev.:C IRQ 9
        Apr 13 21:01:59 kke01 kernel: Elsa: timer OK; resetting card
        Apr 13 21:01:59 kke01 kernel: Elsa: HSCX version A: V2.1 B: V2.1
        Apr 13 21:01:59 kke01 kernel: Elsa: ISAC 2086/2186 V1.1
        ...
        Apr 13 21:01:59 kke01 kernel: HiSax: DSS1 Rev. 1.14
        Apr 13 21:01:59 kke01 kernel: HiSax: 2 channels added

      If you get "HiSax: 2 channels added" than your card is detected by the Linux System.
      If you facing any error massages please refer to "Howto use the HiSAX ISDN Driver"


    Obtaining the ISDN4K-UTILS software:
    No we are not done :-) . Your card is detected but you need the utilities to get it working.
    Here comes to our help ISDN4k-UTILS an ISDN link-level module for Linux written by Fritz Elfert.
    You need to obtain the latest isdn-4k-utils also from SuSE ftp site at /pub/isdn4linux/v2.1/isdn4k-utils. The isdn4k-utils-xxxxxx.tar.gz IS NOT included in your kernel source. The latest is 26-01-99 as this document is being written.
    You need to untar it and read the README and INSTALL instructions. isdn4k-utils providing Linux the software for operating your ISDN card.

    What is left to be done after your compilation was succesful?
    NOTE: This is necessery if you are using an old ISDN4K-Utils. Newer versions currected this problam.
    You need to see that all of the devices were created under /dev. If not, you need to run the script which makes them and is located under [the directory you opened isdn4k-utils-xxxxxx.tar.gz]/isdn4k-utils/scripts. The script is called makedev.sh . Look if you have /dev/isdnctrl, if not make a symbolic link:

      $ln -s isdnctrl0 isdnctrl

    This will add a symbolic link from isdnctrl -> isdnctrl0.

    Please refer to the documentation that is part of the isdn4k-utils for all of the details.

    After isdn4k-utils was compiled succesfully:

    You need to add / edit some files and put information that is needed inorder to connect to your ISP (Internet Service Provider).

    /etc/resolv.conf: Here you will need to enter your ISP Hostname and the DNS servers.

      search (your isp host name)
      nameserver (DNS server of your ISP)

    /etc/ppp/ioptions: Make a file name IOPTIONS for Isdn OPTIONS.

      this is my ioptions for my isp (using PAP) and Teles 16.3c ISDN card:

      /dev/ippp0
      lock
      noipdefault
      passive
      defaultroute
      user (your user name)
      -chap

    /etc/ppp/pap-secrets: if your isp using pap for authenticating you will have to edit this file and enter your info.

      #PAP authentication file: /etc/ppp/pap-secrets
      #This file should have a permission of 600.
      # ~#chmod 600 /etc/ppp/pap-secrets
      # Username      Server      Password      IP address
      "youruser"       *                "yourpass"

    Make a script to call your isp. Look at ISDNCTRL man page for more help and information.

    This is my DIAL script:

      #!/bin/bash                     
      # Make sure that you are using a recent snapshot of isdn drivers and utils
      # downloadable from ftp.suse.com/pub/isdn4linux/
      # Please fill in the following info:
      
      DIAL=ISP_NUMBER                    # your isp number
      USER=YOUR_USER_NAME                # your username
      
      HISAX_OPTIONS="type=14 protocol=2" # hisax module options
                                         # type=14 for Teles 16.3c
                                         # protocol=2 for the Euro/DSS1 protocol
      
      case "$1" in
      
        on)
          if ! lsmod | grep hisax >/dev/null; then
            modprobe hisax $HISAX_OPTIONS
          fi
          if lsmod | grep hisax >/dev/null; then
            if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $2}'` = 0 ]; then
              isdnctrl verbose 3
              isdnctrl system on
              isdnctrl addif ippp0
              isdnctrl addslave ippp0 ippp1
              for i in 0 1 ; do
                isdnctrl eaz ippp$i $i
                isdnctrl addphone ippp$i out $DIAL
                isdnctrl huptimeout ippp$i 0
                isdnctrl l2_prot ippp$i hdlc
                isdnctrl l3_prot ippp$i trans
                isdnctrl encap ippp$i syncppp
              done
              isdnctrl status ippp0 on
              if [ "$2" = "2" ]; then
                isdnctrl status ippp1 on
              fi
              ifconfig ippp0 -arp -broadcast
              ipppd user $USER file /etc/ppp/ioptions
              sleep 2
              isdnctrl dial ippp0
              if [ "$2" = "2" ]; then
                isdnctrl dial ippp1
              fi
              sleep 8
              route add default ippp0
              if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $2}'` = 0 ]; then
                echo -e "\aError - Connection not established."
                echo "Please check your username, your password, and your provider number."
                isdnctrl hangup ippp0
                isdnctrl delif ippp0
                killall ipppd 
             else
                if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $3}'` = 0 ]; then
                  echo -e "\aConnected on 1 channel."
                else
                  echo -e "\aConnected on 2 channels."
                fi
              fi
            else
              echo -e "\aAlready connected - nothing done."
            fi
          else
            echo -e "\Error - Hisax could not be loaded."
            echo "Please make sure that you are using the correct hisax options for your card."
          fi
          ;;
      
        switch)
          if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $2}'` = 0 ]; then
            echo -e "\aNot connected. Please use '`basename $0` on' first to connect."
          else
            case "$2" in
              1)
                if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $3}'` != 0 ]; then
                  isdnctrl hangup ippp1
                  isdnctrl status ippp1 off
                  echo -e "\aChannel 2 disconnected."
                else
                  echo -e "\aChannel 2 is not connected - nothing done."
                fi
                ;;
              2)
                if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $3}'` = 0 ]; then
                  isdnctrl status ippp1 on
                  isdnctrl dial ippp1
                  sleep 8
                  if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $3}'` != 0 ]; then
                    echo -e "\aChannel 2 connected."
                  else
                    echo -e "\aError - Could not establish connection on channel 2."
                    echo "Please make sure that your ISP allows dual-channel connection for your login."
                  fi
                else
                  echo -e "\aAlready connected on channel 2 - nothing done."
                fi
                ;;
              *)
                echo -e "\aPlease use '`basename $0` switch 1' or '`basename $0` switch 2'."
                ;;
            esac
          fi
          ;;
      
        off)
          if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $3}'` != 0 ]; then
            isdnctrl hangup ippp1
          fi
          if ps x | grep ipppd | grep -v grep >/dev/null; then
            if [ `head -n 6 /dev/isdninfo | grep usage | awk '{print $2}'` != 0 ]; then
              isdnctrl hangup ippp0
            fi
            killall ipppd
            route del default
            ifconfig ippp0 down
            isdnctrl delif ippp0
            sleep 1
            echo -e "\aConnection closed."
          else
            echo -e "\aNot connected - nothing done."
          fi
          ;;
      
        *)
          echo -e "\aUsage: `basename $0`  \n"
          echo -e "where  is one of the following:\n"
          echo -e "  on [2]        connect to provider. with '2' option - connect on both channels."
          echo -e "  switch [1|2]  switch between 1 or 2 channels, while connected."
          echo -e "  off           disconnect from provider.\n"
          ;;
      
      esac
      
      
      

    Editorial written by Ofir Arkin aka [MIA] version 1.0


Main - Books - Editorials - Linux & Unix Links - Tutorials - X Window Managers - FTP
Distributions - Gimp - Perl - About Us - Sitemap - Mail Us! - Security - Linux Vs. NT - What's New?

Created By [MIA], November 16, 1998 ,Copyright © LinuxPowered.com 1998-1999
Last Modified  Februaty 20, 1999