个人工具

“UbuntuHelp:BinaryDriverHowto/EiconDiva”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第17行: 第17行:
 
</nowiki></pre>
 
</nowiki></pre>
 
=== Building kernel modules ===
 
=== Building kernel modules ===
First, install the necessary packages for building modules: <code><nowiki>linux-source, build-essentials, libncurses-dev</nowiki></code> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
+
First, install the necessary packages for building modules: <pre><nowiki>linux-source, build-essentials, libncurses-dev</nowiki></pre> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
You have to manually unpack kernel sources and create the symlink in order that your kernel sources can be found under <code><nowiki>/usr/src/linux</nowiki></code>:
+
You have to manually unpack kernel sources and create the symlink in order that your kernel sources can be found under <pre><nowiki>/usr/src/linux</nowiki></pre>:
 
<pre><nowiki>
 
<pre><nowiki>
 
cd /usr/src
 
cd /usr/src
第29行: 第29行:
 
./Build -mrproper -nowait
 
./Build -mrproper -nowait
 
</nowiki></pre>
 
</nowiki></pre>
<code><nowiki>-mrproper</nowiki></code> is the same as usual (clean everything before starting) and <code><nowiki>-nowait</nowiki></code> is for not waiting 15 seconds !
+
<pre><nowiki>-mrproper</nowiki></pre> is the same as usual (clean everything before starting) and <pre><nowiki>-nowait</nowiki></pre> is for not waiting 15 seconds !
 
The license informations should be displayed and you have to accept it. The you should have the following messages:
 
The license informations should be displayed and you have to accept it. The you should have the following messages:
 
<pre><nowiki>
 
<pre><nowiki>
第40行: 第40行:
 
PROCESSING: Build Divatty ...  OK
 
PROCESSING: Build Divatty ...  OK
 
PROCESSING: Cleanup ... OK
 
PROCESSING: Cleanup ... OK
 +
 
SUCCESS. You can configure and start your Diva adapter now.
 
SUCCESS. You can configure and start your Diva adapter now.
 
</nowiki></pre>
 
</nowiki></pre>
第50行: 第51行:
 
Those modifications are not mandatory. Your software may work, as it may not work. Those modifications are made for making the drivers Debian compliant.
 
Those modifications are not mandatory. Your software may work, as it may not work. Those modifications are made for making the drivers Debian compliant.
 
==== udev ====
 
==== udev ====
All the stuff is installed, it has to be a little tuned to work properly. First, disabled melware (opensource) kernel module to load during boot phase by adding them to the blacklist udev section. For this edit <code><nowiki>/etc/modprobe.d/blacklist-eicon</nowiki></code> with your favorite editor and enters the following lines:
+
All the stuff is installed, it has to be a little tuned to work properly. First, disabled melware (opensource) kernel module to load during boot phase by adding them to the blacklist udev section. For this edit <pre><nowiki>/etc/modprobe.d/blacklist-eicon</nowiki></pre> with your favorite editor and enters the following lines:
 
<pre><nowiki>
 
<pre><nowiki>
 
# do not load melware eicon drivers
 
# do not load melware eicon drivers
第60行: 第61行:
 
</nowiki></pre>
 
</nowiki></pre>
 
==== Init script ====
 
==== Init script ====
The installation process add a script in <code><nowiki>/etc/rc2.d</nowiki></code>. This script call at startup <code><nowiki>/usr/lib/eicon/divas/divas_cfg.rc</nowiki></code> script. Now, we are going to add some minor changes to this script to correctly position rights on the device (the device should belong to the <code><nowiki>dialout</nowiki></code> group and be group writable). The patch can be found [http://www.porcheron.info/patch-divas_cfg.rc.diff here].
+
The installation process add a script in <pre><nowiki>/etc/rc2.d</nowiki></pre>. This script call at startup <pre><nowiki>/usr/lib/eicon/divas/divas_cfg.rc</nowiki></pre> script. Now, we are going to add some minor changes to this script to correctly position rights on the device (the device should belong to the <pre><nowiki>dialout</nowiki></pre> group and be group writable). The patch can be found [http://www.porcheron.info/patch-divas_cfg.rc.diff here].
 
Apply it:
 
Apply it:
 
<pre><nowiki>
 
<pre><nowiki>
第66行: 第67行:
 
patch -p0 patch-divas_cfg.rc.diff
 
patch -p0 patch-divas_cfg.rc.diff
 
</nowiki></pre>
 
</nowiki></pre>
Reboot the machine. Your <code><nowiki>/dev/capi20</nowiki></code> should have the following rights:
+
Reboot the machine. Your <pre><nowiki>/dev/capi20</nowiki></pre> should have the following rights:
 
<pre><nowiki>
 
<pre><nowiki>
 
ls -l /dev/capi20
 
ls -l /dev/capi20
第72行: 第73行:
 
</nowiki></pre>
 
</nowiki></pre>
 
== Administration / Maintenance ==
 
== Administration / Maintenance ==
Eicon drivers come with a light http server for managing the card. Installation process add the following line to the <code><nowiki>/etc/inetd.conf</nowiki></code>:
+
Eicon drivers come with a light http server for managing the card. Installation process add the following line to the <pre><nowiki>/etc/inetd.conf</nowiki></pre>:
 
<pre><nowiki>
 
<pre><nowiki>
 
diva-cfg        stream  tcp    nowait  root.daemon    /usr/lib/eicon/divas/diva_httpd diva_httpd /usr/lib/eicon/divas/httpd
 
diva-cfg        stream  tcp    nowait  root.daemon    /usr/lib/eicon/divas/diva_httpd diva_httpd /usr/lib/eicon/divas/httpd
 
</nowiki></pre>
 
</nowiki></pre>
By default, there is no <code><nowiki>inetd</nowiki></code> on Ubuntu. In order to get access to this server inetd is necessary, you have to install the following packages <code><nowiki>netkit-inetd</nowiki></code> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
+
By default, there is no <pre><nowiki>inetd</nowiki></pre> on Ubuntu. In order to get access to this server inetd is necessary, you have to install the following packages <pre><nowiki>netkit-inetd</nowiki></pre> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
Add a password to access the interface by editing the following file <code><nowiki>/usr/lib/eicon/divas/httpd/login/login</nowiki></code> and replacing (as it is explained) the <code><nowiki>XX</nowiki></code>.
+
Add a password to access the interface by editing the following file <pre><nowiki>/usr/lib/eicon/divas/httpd/login/login</nowiki></pre> and replacing (as it is explained) the <pre><nowiki>XX</nowiki></pre>.
 
You have access to the card manager interface by accessing in your favourite browser [http://server:10005]
 
You have access to the card manager interface by accessing in your favourite browser [http://server:10005]
 
== Conclusion ==
 
== Conclusion ==

2007年12月6日 (四) 10:05的版本

Introduction

Eicon build and sell some nice BRI card for voice or data exchanges. It can be nicely integrated with Asterisk. You can find a presentation of the cards here. Why choose binary drivers whereas some drivers included in Ubuntu kernel exists ? Because Eicon only supports its own binary drivers and the drivers are coming with a nice tools set for configuring and managing your card.

Installation

Download driver on Eicon website

The list of the drivers can be found on this webpage. Download the corresponding version for your card. You would have to choose the source Debian package. For exemple, for our Diva Card 4BRI, we choose the 8.2beta1 (which is much better than 7.7) linux driver. You have to fill the form for downloading...

Install the package

Install the package you have downloaded on Eicon website. It will install:

  • kernel module source (that will be compiled in next section)
  • binary firmwire
  • utilities

Just proceed to installation:

sudo dpkg -i divas4linux_EICON-106.57-1.deb

Building kernel modules

First, install the necessary packages for building modules:
linux-source, build-essentials, libncurses-dev
(see InstallingSoftware). You have to manually unpack kernel sources and create the symlink in order that your kernel sources can be found under
/usr/src/linux
:
cd /usr/src
tar xvjf linux-source-2.6.15.tar.bz2
ln -s linux-source-2.6.15 linux

You are ready to launche the build:

cd /usr/lib/eicon/divas/src
./Build -mrproper -nowait
-mrproper
is the same as usual (clean everything before starting) and
-nowait
is for not waiting 15 seconds !

The license informations should be displayed and you have to accept it. The you should have the following messages:

OK
PROCESSING: Call 'make dep', please be patient ... update 'version.h' ... OK
PROCESSING: Call 'make modules', please be patient ... OK
PROCESSING: Build MTPX adapter driver ... OK
PROCESSING: Install Diva modules ... divadidd.ko, divas.ko, diva_mnt.ko, diva_idi.ko, divacapi.ko, kernelcapi.ko, capi.ko diva_mtpx.ko OK
PROCESSING: Cleanup ... OK
PROCESSING: Build Divatty ...  OK
PROCESSING: Cleanup ... OK

SUCCESS. You can configure and start your Diva adapter now.

Launch the configuration utility.

cd ..
./Config

Tuning your installation

Those modifications are not mandatory. Your software may work, as it may not work. Those modifications are made for making the drivers Debian compliant.

udev

All the stuff is installed, it has to be a little tuned to work properly. First, disabled melware (opensource) kernel module to load during boot phase by adding them to the blacklist udev section. For this edit
/etc/modprobe.d/blacklist-eicon
with your favorite editor and enters the following lines:
# do not load melware eicon drivers
blacklist       divacapi
blacklist       divadidd
blacklist       diva_idi
blacklist       diva_mnt
blacklist       divas

Init script

The installation process add a script in
/etc/rc2.d
. This script call at startup
/usr/lib/eicon/divas/divas_cfg.rc
script. Now, we are going to add some minor changes to this script to correctly position rights on the device (the device should belong to the
dialout
group and be group writable). The patch can be found here.

Apply it:

cd /usr/lib/eicon/divas
patch -p0 patch-divas_cfg.rc.diff
Reboot the machine. Your
/dev/capi20
should have the following rights:
ls -l /dev/capi20
crw-rw-r-- 1 root dialout 68, 0 2006-05-11 17:25 /dev/capi20

Administration / Maintenance

Eicon drivers come with a light http server for managing the card. Installation process add the following line to the
/etc/inetd.conf
:
diva-cfg        stream  tcp     nowait  root.daemon     /usr/lib/eicon/divas/diva_httpd diva_httpd /usr/lib/eicon/divas/httpd
By default, there is no
inetd
on Ubuntu. In order to get access to this server inetd is necessary, you have to install the following packages
netkit-inetd
(see InstallingSoftware). Add a password to access the interface by editing the following file
/usr/lib/eicon/divas/httpd/login/login
and replacing (as it is explained) the
XX
.

You have access to the card manager interface by accessing in your favourite browser [1]

Conclusion

Then, you should be able to use your card. You just have to setup your application. Enjoy !