EiconIsdnCard

Notes for getting the Eicon DIVA Server BRI-2M ISDN card working with a 2.4 linux kernel.

(note these instructions are extremely old and probably completely wrong by now)

Overview

I was given an Eicon ISDN card and asked to get it working on a linux box, for use as a dial-in modem server. These are my notes from that process.

Note: Armin Schindler, the Linux maintainer for this driver, has noted that www.melware.net is the only URL that is guaranteed to exist in the future. So, if any of these links don't work, go there.

First you need the drivers from:

http://isdn4linux.org/armin/divas/

There appear to be some drivers here:

http://www.eicon.com/worldwide/products/MediaGateways/DivaServerforLinux.htm

But I didn't use them, I think they are outdated.

Here's a somewhat useful FAQ:

http://www.melware.de/en/320408000000000________cnt=rfnbr22.htm#FAQ%20DIVAC

Get firmware files from:

ftp://ftp.isdn4linux.org/pub/isdn4linux/utils/eicon/firmware/

You want the file protocols_all.tar.bz2. Contents of this file go in /usr/share/eicon.

Building the source

I got this card working on a RedHat 9 machine with kernel 2.4.20. You need to make a few changes in the sources to get them to compile, due to changes in signal handling from RedHat's inclusion of NPTL. Here's a diff:

--- divasmain.c.old     2004-04-20 15:16:26.000000000 -0400
+++ divasmain.c 2004-04-20 15:18:01.000000000 -0400
@@ -585,7 +585,8 @@
        /* Set to RealTime */
        current->policy = SCHED_RR;
        current->rt_priority = 99;
-       current->nice = -20;
+
+#define Sigmask_lock sighand->siglock

        strcpy(current->comm, pisr->dpc_thread_name);

@@ -595,9 +596,9 @@
                        break;
                if (signal_pending(current)) {
                        /* we may want to do something on signals here */
-                       spin_lock_irq(&current->sigmask_lock);
+                        spin_lock_irq(&current->Sigmask_lock);
                        flush_signals(current);
-                       spin_unlock_irq(&current->sigmask_lock);
+                        spin_unlock_irq(&current->Sigmask_lock);
                } else {
                        (*(pisr->callback)) (pisr, pisr->callback_context);
                }
--- i4lididrv.c.old     2004-04-20 15:17:03.000000000 -0400
+++ i4lididrv.c 2004-04-20 15:18:48.000000000 -0400
@@ -322,15 +322,17 @@

   strcpy(current->comm, "kdiva2i4ld");

+#define Sigmask_lock sighand->siglock
+
   for(;;) {
     down_interruptible(&diva_thread_sem);
     if(!(atomic_read(&thread_running)))
       break;
     if(signal_pending(current)) {
          /* we may want to do something on signals here */
-         spin_lock_irq(&current->sigmask_lock);
+         spin_lock_irq(&current->Sigmask_lock);
          flush_signals(current);
-         spin_unlock_irq(&current->sigmask_lock);
+         spin_unlock_irq(&current->Sigmask_lock);
     } else {
          run_task_queue(&tq_divad);
     }

Remove the files in /usr/src/linux/drivers/isdn/eicon and replace with the source files you have downloaded. Follow these instructions:

http://isdn4linux.org/armin/divas/HowTo_install_on_Debian.txt

for info on how to build the drivers and a kernel which supports isdn.

modules.conf

Your modules.conf should contain the following:

alias char-major-43 diva2i4l
below diva2i4l divas
post-install divas /sbin/divactrl load -f NI -s 2 -1spid 21255522220101 -2spid 21255522220101

That loads the right modules and downloads the firmware to the card whenever you attempt to use the ISDN tty device (/dev/ttyI0). The firmware is one of the files in /usr/share/eicon (program finds the right one automatically). It also sets your SPIDS (ISDN telephone numbers) and protocol (NI was the correct one for us in the US, your protocol will depend on what country you are in). SPIDS are assigned by whoever you get your ISDN service from.

ISDN modem setup

You can use the isdn modem similarly to an analog modem by interacting with the device /dev/ttyI0. See the man page for ttyI for details.

To test with minicom (or any other terminal emulator) tell it to use the port /dev/ttyI0. Then, feed the ISDN device an init string like you would an analog modem:

AT&E5552222&B512+FCLASS=8S14=10

the number after &E is the phone number the isdn device is connected to, minus area code. This can be found in /etc/syslog when you try to connect. If it's not set, you see this in your syslog:

kernel: isdn_tty: call from 2125553333 -> 5552222 ignored

and you will see the following in your terminal emulator:

NO MSN/EAZ

if you try to dial out.

The S14=10 is important too - that sets the ISDN card to act as an analog modem.

If you successfully set up the ISDN card and attempt to call in to it, you will see this in syslog:

kernel: isdn_tty: call from 2125553333, -> RING on ttyI0

and this in minicom:

CALLER NUMBER: 2125553333
RING

Loaded Modules

lsmod should show these modules loaded:

diva2i4l               62452   1  (autoclean)
divas                  88712   0  (autoclean)
divadidd               13568   0  (autoclean) [diva2i4l divas]
isdn                  138144   1  (autoclean) [diva2i4l]
slhc                    6756   0  (autoclean) [isdn]

mgetty setup

Your /etc/mgetty+sendfax/mgetty.cnf should contain the following:

port ttyI0
  init-chat "" \d\d\d+++\d\d\dATZ OK AT&E5552222&B512+FCLASS=8S14=10 OK
  modem-type data

and add the following to /etc/inittab to enable mgetty on the isdn port ttyI0:

m1:35:respawn:/sbin/mgetty ttyI0

remember to killall -HUP init to make init re-read inittab.

Other notes

Don't use isdnctrl at all. divactrl handles all the setup and control for this card.

When you plug the NT1 (isdn terminator box?) into the isdn line, the "LINE" led will glow solid, then start blinking slowly. After you initialize the eicon card, the LINE led will go out. I think if it comes back on that indicates an error condition. The L-BK led never comes on and I have no idea what it does.

When you are testing different configs, power cycle the machine to make sure the card and drivers are in a known good state. I had some frustration where I changed settings but the card didn't work until I did that.

CategoryGeekStuff

CategoryLinuxStuff



Our Founder
ToolboxClick to hide/show