Search:  
Gentoo Wiki

HOWTO_ISDN_Alt


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Based on the forum HOWTO by My_World

Contents

Notice

As you saw in the title; this has been tested in South Africa because I could not get the conventional ISDN How-To's to work on our telecoms exchanges. Not sure if this will work in Europe or the States, but I would love to know if someone from there could try it and reply here!

ISDN HOWTO

My setup has a USB ISDN TA (U.S. Robotics) so I'll start from there and take us through the whole procedure of setting up ISDN.

Kernel Setup

Firstly we have to make sure we have the correct USB support compiled.

lspci -v

Look at the list and find the USB controller your motherboard supports and compile it into your kernel.

Example of my moterboard:

Code: lspci -v
0000:00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1) (prog-if 10 [OHCI])
       Subsystem: nVidia Corporation: Unknown device 0c11
       Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 20
       Memory at fdffe000 (32-bit, non-prefetchable)
       Capabilities: [44] Power Management version 2

0000:00:02.2 USB Controller: nVidia Corporation CK8S USB Controller (rev a2) (prog-if 20 [EHCI])
       Subsystem: nVidia Corporation: Unknown device 0c11
       Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 22
       Memory at fdffd000 (32-bit, non-prefetchable)
       Capabilities: [44] #0a [2098]
       Capabilities: [80] Power Management version 2

(According to my setup)

Linux Kernel Configuration: isdn config
Device Drivers -> USB support
 --- USB Host Controller Drivers
   <*> EHCI HCD (USB 2.0) support
   [*]   Full speed ISO transactions (EXPERIMENTAL)
   [*]   Root Hub Transaction Translators (EXPERIMENTAL)
   <*> OHCI HCD support
   < > UHCI HCD (most Intel and VIA) support
 --- USB Device Class drivers
        <*> USB Modem (CDC ACM) support

To use dial-up you also need the following in your kernel:

Device Drivers -> Networking support
 <*>   PPP (point-to-point protocol) support
           [*]     PPP multilink support (EXPERIMENTAL)
           [*]     PPP filtering
           <*>     PPP support for async serial ports
           <*>     PPP support for sync tty ports

Compile the kernel and reboot the machine.

Device

Now for the easy part, setting up and using the USB modem. If you run a UDEV system then pretty much all has been done for you allready, but with DEVFS you will need to create the modem nodes to be able to use them.

The defvs way

mkdir /dev/usb

mknod /dev/usb/ACM0 c 166 0
mknod /dev/usb/ACM1 c 166 1
mknod /dev/usb/ACM2 c 166 2
mknod /dev/usb/ACM3 c 166 3

ln -s /dev/usb/ACM0 /dev/modem

The udev way

Look inside /dev for the following device, this will be the USB modem:

/dev/ttyACM0
ln -s /dev/ttyACM0 /dev/modem

Testing

There are several ways to test the modem and see if it works/responds, one is simply firing up kppp (if you are a KDE user) and querying the modem to see the result, the other one I often use is to simply pass the following command and watch the modem lights to see if there is any response from the physical modem (not teminal response, watch the lights blinking on the modem):

cat /dev/modem
CTRL + c to cancel.

Dialup client

Now simply set up your dial-up client to use the modem, try it once but disconnect immediately once you confirm the modem works. The following part will explain why.

As most of us know ISDN comes in two flavours, 64K and 128K, single and multilink. To achieve multilink the modem uses the second B-channel on the line to establish another 64K connection, and combining the two (64K + 64K = 128K) gives one multilink. However, almost all modems are set to dial the second channel on demand and to drop the second channel/"line" once the speed is no longer required, and this could wreak havoc on ones phone bill.

So, we need to tell the modem to use either only one B-channel for fixed 64K dial-up, or we have to tell the modem to use a fixed 128K multilink (using both channels) i.e. not constantly dropping the second line.

This is where the AT command set for your modem comes in handy. If you do not have an extensive modem manual (including AT commands) then I would suggest you phone the manufacturer and ask for one to be e-mailed/faxed to you, or you could visit the website of the modem manufacturer and see if they have a manual to download.

What we are looking for in the manual is something similar to the following found in my ISDN TA manual (note: this is an example of a 3Com U. S. Robotics ISDN Terminal Adapter):

PPP Mode
The PPP mode is set using AT*PPP=
Command:      Result:
AT*PPP=0      Sets all PPP-related values to their defaults
AT*PPP=1      Transparent Async-to-Sync PPP
AT*PPP=2      Single Link PPP
AT*PPP=3      128 Kbps MultiLink PPP
AT*PPP=4      MultiLink PPP with DBA (default)


Here we have what we are looking for! For my setup to work: If I need only 64K then I will add the following AT init command to my dial-up client;

AT*PPP=2

If I need fixed multilink:

AT*PPP=3 

And that's all there is to it, save, exit and dial up. To make sure everything is 100% (can never be too sure where money is involved :P ) get a detailed account printout from the telecoms company you use and see if there is only one constant connection to the internet or allot of 1-5 sec dropped calls to the net. If there is nothing out of the ordinary, you have mastered ISDN!

A few examples of setting up dial-up clients

KPPP

KPPP is the easiest to do, just fire it up and create your account first, then go to the modem section and add a new modem. Select /dev/modem as the device, go to the next tab and query the modem. You should see a response and a printout from the modem. This means your modem is recognised and ready for use. Now go to advanced features and underneath the ATZ init string add the string you need for your account:

AT*PPP=2

or

AT*PPP=3

What I did was to create two modems, one 64K one 128K and simply choosing the one I need before I dial up! That is the beauty of KPPP, multiple modems! :P

Wvdial

Setting up wvdial is also pretty easy. Here is a sample of my wvdial.conf:

File: wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 57600
Init = ATZ
Init2 = AT*PPP=3
Phone = 0860007249
Username = username( at )isp
Password = password( at )isp

And this is the output you should get in the terminal once you dial in using wvdial:

Code: wvdial
 --> WvDial: Internet dialer version 1.54.0
 --> Initializing modem.
 --> Sending: ATZ
 OK
 --> Sending: AT*PPP=3
 AT*PPP=3
 OK
 --> Modem initialized.
 --> Sending: ATDT0860007249
 --> Waiting for carrier.
 ATDT0860007249
 CONNECT 128000
 --> Carrier detected.  Waiting for prompt.
 ~[7f]}#@!}!} } }4}#}$@#}%}&[16]b|
 }"}&} } } } y^~
 --> PPP negotiation detected.
 --> Starting pppd at Fri May 13 22:15:15 2005
 --> pid of pppd: 11842
 --> Using interface ppp0
 --> local  IP address 155.239.xxx.xxx
 --> remote IP address 155.239.xxx.xxx
 --> primary   DNS address 196.43.xxx.xxx
 --> secondary DNS address 196.25.xxx.xxx

That is all there is to it! Enjoy.



net.ppp0

Added by sandcrawler

I use the same ISDN TA here in the states and rather than have it hooked to a specific client I have it on my server setup for dial on demand. Using this well written guide you should already have the modem working. You'll want to emerge the additional package of net-dialup/ppp. This will include the script net.ppp0 which you can add to your default runlevel later. From there you can edit the /etc/conf.d/net.ppp0 script in accordance with your ISP and hardware setting. My sanitized settings appear like this.

File: net.ppp0


PEER="yourdomain.net"
DEBUG="yes"
PERSIST="no"
ONDEMAND="yes"
MODEMPORT="/dev/ttyACM0"
LINESPEED="115200"
INITSTRING=""
DEFROUTE="yes"
HARDFLOWCTL="no"
ESCAPECHARS="no"
PPPOPTIONS=""
USERNAME="username"
PASSWORD="easy2pwn"
NUMBER="1234567"
REMIP=""
NETMASK=""
IPADDR=""
MRU="768"
MTU="768"
RETRYTIMEOUT="30"
IDLETIMEOUT="600"
PEERDNS="no"
AUTOCFGFILES="no"
AUTOCHATSCRIPT="no"
TEMPLATEDIR=/etc/ppp

That file is well commented and should serve you well. Many of my settings are set manually in the chat scripts as I was debugging the process at first and found it easier just to leave the config "as is." If you don't feel comfortable with the chat scripts amke sure to set the two "AUTOxxxxx" lines to "yes." With net.ppp0 started, you should have dial on demand from the PC you have the adapter hooked to. Using either a nice squid proxy or an Iptables NAT you can extend this meager connection to the rest of your network. Feel free to contact me(PMs)on the Gentoo Forums if any questions arise. P.S. Sorry if this is redundant to other wikis, but it's the first I came across searching for other TA's hat might work and I just had the urge to contribute

Retrieved from "http://www.gentoo-wiki.info/ISDN"

Last modified: Sat, 30 Aug 2008 23:10:00 +0000 Hits: 12,382