Isdn: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Stub}}
*[[Configurazione di una connessione ISDN]]
 
*[[Configurazione di una connessione ISDN a 128k in multink]]
== Configurazione del modulo della scheda ISDN ==
*[[Configurazione di una linea di backup isdn manuale]]
Se si stà installando la scheda Eicon Diva Pci 2.01, modificare i parametri di carimento del modulo hisax dando il tipo di scheda giusto ed il protocollo EuroIsdn:
 
<pre>
sudoedit /etc/modprobe.d/arch/i386
...
options hisax type=11 protocol=2
...
</pre>
 
Ricaricare il modulo hisax:
 
sudo rmmod hisax
sudo modprobe hisax
 
 
Il syslog mostrerà:
 
<pre>
Jul  7 19:20:29 ergo kernel: HiSax module removed
Jul  7 19:20:36 ergo kernel: HiSax: Linux Driver for passive ISDN cards
Jul  7 19:20:36 ergo kernel: HiSax: Version 3.5 (module)
Jul  7 19:20:36 ergo kernel: HiSax: Layer1 Revision 2.46.2.5
Jul  7 19:20:36 ergo kernel: HiSax: Layer2 Revision 2.30.2.4
Jul  7 19:20:36 ergo kernel: HiSax: TeiMgr Revision 2.20.2.3
Jul  7 19:20:36 ergo kernel: HiSax: Layer3 Revision 2.22.2.3
Jul  7 19:20:36 ergo kernel: HiSax: LinkLayer Revision 2.59.2.4
Jul  7 19:20:36 ergo kernel: HiSax: Total 1 card defined
Jul  7 19:20:36 ergo kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax (0)
Jul  7 19:20:36 ergo kernel: HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6
Jul  7 19:20:36 ergo kernel: PCI: Enabling device 0000:00:09.0 (0004 -> 0006)
Jul  7 19:20:36 ergo kernel: ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 11 (level, low) -> IRQ 11
Jul  7 19:20:36 ergo kernel: Diva: IPAC PCI card configured at 0xd4a5f000 IRQ 11
Jul  7 19:20:36 ergo kernel: Diva: IPAC PCI space at 0xd48b3000
Jul  7 19:20:36 ergo kernel: Diva: IPAC version ff
Jul  7 19:20:36 ergo kernel: Eicon.Diehl Diva: IRQ 11 count 10816
Jul  7 19:20:36 ergo kernel: Eicon.Diehl Diva: IRQ 11 count 10822
Jul  7 19:20:36 ergo kernel: HiSax: DSS1 Rev. 2.32.2.3
Jul  7 19:20:36 ergo kernel: HiSax: 2 channels added
Jul  7 19:20:36 ergo kernel: HiSax: MAX_WAITING_CALLS added
</pre>
 
== Software di supporto ==
 
Installare il software di supporto
 
sudo apt-get install isdnutils
 
Accettare i default, ed inserire i parametri relativi alla propria linea ed alla connsessione internet da configurare.
 
Modificare il file per i parametri di dialing:
 
<pre>
sudoedit /etc/isdn/isdn.conf
...
[GLOBAL]
COUNTRYPREFIX  = +
COUNTRYCODE    = 39
AREAPREFIX      = 0
AREACODE        =  031
 
...
</pre>
 
 
Modificare la modalità di dialing:
 
<pre>
sudoedit /etc/isdn/device.ippp0
...
DIALMODE=manual        # XXX_  other values can be 'on' and 'off'
...
</pre>
 
Riavviare i servizi isdn:
 
sudo /etc/init.d/isdnutils restart
Si dovrà avere:
 
<pre>
Jul  7 19:36:29 ergo ipppd[5013]: Terminating on signal 15.
Jul  7 19:36:29 ergo ipppd[5013]: closing fd 8 from unit 0
Jul  7 19:36:29 ergo ipppd[5013]: link 0 closed , linkunit: 0
Jul  7 19:36:29 ergo ipppd[5013]: Exit.
Jul  7 19:36:29 ergo kernel: ippp_ccp: freeing reset data structure d2a92800
Jul  7 19:36:29 ergo isdnlog: Got signal 15
Jul  7 19:36:29 ergo isdnlog: exit now 7
Jul  7 19:36:29 ergo isdnlog: File /var/run/isdnlog.isdnctrl0.pid removed!
Jul  7 19:36:29 ergo isdnlog: File /var/lock/LCK..isdnctrl0 removed!
Jul  7 19:36:29 ergo kernel: HiSax: debugging flags card 1 set to 4
Jul  7 19:36:29 ergo isdnlog: isdnlog Version 4.69 starting
Jul  7 19:36:29 ergo isdnlog: Error: could not load holidays from /usr/share/isdn/holiday-xx.dat: No such file or directory
Jul  7 19:36:29 ergo isdnlog: Dest V1.01: File '/usr/share/isdn/dest.cdb' opened fine - Dest 1.0 int (+h) AT DE NL CH BE
Jul  7 19:36:29 ergo isdnlog: Error: could not load rate database from /usr/share/isdn/rate-xx.dat: No such file or directory
Jul  7 19:36:29 ergo isdnlog: (ISDN subsystem with ISDN_MAX_CHANNELS > 16 detected, ioctl(IIOCNETGPN) is available)
Jul  7 19:36:29 ergo isdnlog: isdn.conf:2 active channels, 0 MSN/SI entries
Jul  7 19:36:29 ergo isdnlog: (Data versions: iprofd=0x06  net_cfg=0x06  /dev/isdninfo=0x01)
Jul  7 19:36:29 ergo isdnlog: Everything is fine, isdnlog-4.69 is running in full featured mode.
Jul  7 19:36:29 ergo kernel: isdn: Verbose-Level is 2
Jul  7 19:36:29 ergo ipppd[5903]: Found 1 device:
Jul  7 19:36:29 ergo ipppd[5904]: ipppd i2.2.12 (isdn4linux version of pppd by MH) started
Jul  7 19:36:29 ergo ipppd[5904]: init_unit: 0
Jul  7 19:36:29 ergo kernel: ippp, open, slot: 0, minor: 0, state: 0000
Jul  7 19:36:29 ergo kernel: ippp_ccp: allocated reset data structure d2a92800
Jul  7 19:36:29 ergo ipppd[5904]: Connect[0]: /dev/ippp0, fd: 8
Jul  7 19:36:30 ergo kernel: isdn_net: ippp0: dial rejected: interface not in dialmode `auto', signalling dst_link_failure
</pre>
 
== Modifica gestione default route ==
 
L'initscript di default fa si che si imposti la default route via ippp0 all'attivazione del servizio isdn.
Questo non è desiderabile se si ha un'altra connessione di rete.
Per disabilitare questocomportamento:
 
* Commentare in /etc/isdn/device.ippp0 le righe da 271 a 274 e da 347 a 349:
 
<pre>
sudoedit /etc/isdn/device.ippp0
...
        #if [ "$bindnum" = 0 ]; then
        #    route del default 2>/dev/null
        #    route add default netmask 0 ${device}
        #fi
...
        #if [ "$bindnum" = 0 ]; then
        #    route del default netmask 0 2>/dev/null
        #fi
...
 
</pre>
 
Commentare anche i comandi che modificano le default route in
 
/etc/ppp/ip-up.d/00-ipppd
/etc/ppp/ip-down.d/99-ipppd
 
Inserire invece
 
<pre>
sudoedit /etc/ppp/ip-up.d/00-ipppd
 
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
OLD_GW=`route -n | grep '^0.0.0.0' | grep UG | tr -s ' ' | cut -f 2 --delim=' '`
echo $OLD_GW > /var/tmp/00-save-default-gw
case "$PPP_IFACE" in
        ippp0)  route del default
                route add default netmask 0 $PPP_IFACE
                ;;
esac
</pre>
 
e
 
<pre>
sudoedit /etc/ppp/ip-down.d/99-ipppd
 
#!/bin/bash
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
case "$PPP_IFACE" in
        ippp0)  if route -n | grep '^0\.0\.0\.0' | grep -q " $PPP_IFACE" ; then
                    route del default dev $PPP_IFACE
                fi
                ;;
esac
route add default gw `cat /var/tmp/00-save-default-gw` && rm -f /var/tmp/00-save-default-gw
</pre>
 
 
 
Riavviare il servizio isdn ed il networking, e verificare che la default route si settata corretamente
 
sudo /etc/init.d/isdnutils restart; sudo /etc/init.d/networking restart; route -n
 
== Caso di linea punto-punto ==
 
'''ATTENZIONE: se la linea isdn usa un centralino, può darsi che sia configurata non nella modalità standard (punto-multipunto) ma sia una punto-punto, spesso assciato ad una numerazione a ricerca automatica.'''
 
Se così fosse, quando si fa un dialing, si ottiene l'errore:
 
<pre>
Aug  8 11:58:25 firest kernel: ippp0: dialing 1 7027020000...
Aug  8 11:58:25 firest kernel: isdn: HiSax,ch0 cause: E001B Aug  8 11:58:34 firest kernel: isdn_net: local hangup ippp0 Aug  8 11:58:34 firest kernel: ippp0: Chargesum is 0
</pre>
 
L'errore E001B (man isdncause E001B) indica proprio questa configurazione.
 
'''OCCORRE STACCARE TUTTI GLI ALTRI DISPOSITIVI ISDN PER POTER USARE QUESTA LINEA, DATO CHE LA MODALITA' PUNTO-PUNTO PERMETTE DI COLLEGARE UNA SOLA PERIFERICA ALLA BORCHIA ISDN'''
 
 
 
Per mettere la scheda in modalità point-to-point è sufficiente lanciare il comando:
 
sudo hisaxctrl HiSax  7 1
 
Si leggerà in syslog:
Aug  8 12:58:25 firest kernel: HiSax: set card in PTP mode
Aug  8 12:58:25 firest kernel: LAYER2 WATCHING ESTABLISH
 
(naturalmente  "sudo hisaxctrl HiSax  7 0" mette in point-multipoint....)
 
Per mantenere questa modifica al reboot, inserire questa riga in /etc/modutils/actions:
 
sudoedit /etc/modutils/actions
...
post-install hisax hisaxctrl HiSax  7 1
...
 
Applicare la configurazione:
sudo update-modules
 
Verificare:
 
cat /etc/modules.conf | grep hisax
post-install hisax hisaxctrl HiSax 7 1
 
Oppure inserire in /etc/isdn/device.ippp0 (riga 99):
 
<pre>
....
case "$dowhat" in
start)
    # Set point-to-point mode
    hisaxctrl HiSax 7 1
    # XXX_
...
</pre>
 
Se non si stacca il centralino o l'altra periferica isdn dalla borchia isdn, si ottiene l'errore E0251
 
== Collegamento ==
 
Collegarsi:
 
sudo isdnctrl dial ippp0
 
Si avrà:
 
<pre>
Jul  7 19:38:53 ergo kernel: ippp0: dialing 1 7027020000...
Jul  7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling ? with ''  BEARER: Unrestricted digital information, CCITT standardized coding
Jul  7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling ? with ''  64 kbit/s, Circuit mode
Jul  7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling +39 31/7027020000, Como with '031764171'  RING (Data)
Jul  7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling +39 31/7027020000, Como with '031764171'  CHANNEL: BRI, B1 needed
Jul  7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171'  COLP *INVALID* -- ignored!
Jul  7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171'  CONNECT (Data)
Jul  7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171'  INTERFACE ippp0 calling 7027020000
Jul  7 19:38:56 ergo kernel: isdn_net: ippp0 connected
Jul  7 19:38:56 ergo ipppd[5904]: Local number: 031764171, Remote number: 7027020000, Type: outgoing
Jul  7 19:38:56 ergo ipppd[5904]: PHASE_WAIT -> PHASE_ESTABLISHED, ifunit: 0, linkunit: 0, fd: 8
Jul  7 19:38:56 ergo ipppd[5904]: Remote message:
Jul  7 19:38:56 ergo ipppd[5904]: MPPP negotiation, He: No We: No
Jul  7 19:38:56 ergo ipppd[5904]: local  IP address 151.29.249.254
Jul  7 19:38:56 ergo ipppd[5904]: remote IP address 151.6.139.50
</pre>
 
Scollegarsi:
 
sudo isdnctrl hangup ippp0
 
Si avrà:
 
<pre>Jul  7 19:41:25 ergo kernel: isdn_net: local hangup ippp0
Jul  7 19:41:25 ergo kernel: ippp0: Chargesum is 0
Jul  7 19:41:25 ergo ipppd[5904]: Modem hangup
Jul  7 19:41:25 ergo ipppd[5904]: Connection terminated.
Jul  7 19:41:25 ergo ipppd[5904]: taking down PHASE_DEAD link 0, linkunit: 0
Jul  7 19:41:25 ergo ipppd[5904]: closing fd 8 from unit 0
Jul  7 19:41:25 ergo ipppd[5904]: link 0 closed , linkunit: 0
Jul  7 19:41:25 ergo ipppd[5904]: reinit_unit: 0
Jul  7 19:41:25 ergo ipppd[5904]: Connect[0]: /dev/ippp0, fd: 8
Jul  7 19:41:25 ergo kernel: ippp_ccp: freeing reset data structure d2a92800
Jul  7 19:41:25 ergo kernel: ippp, open, slot: 0, minor: 0, state: 0000
Jul  7 19:41:25 ergo kernel: ippp_ccp: allocated reset data structure d2a92800
Jul  7 19:41:25 ergo isdnlog: Jul 07 19:41:25 tei 96 calling +39 31/7027020000, Como with '031764171'  Normal call clearing (User)
Jul  7 19:41:26 ergo isdnlog: Jul 07 19:41:26 tei 96 calling +39 31/7027020000, Como with '031764171'  HANGUP ( 0:02:31 I= 56.1Kb O= 69.8Kb)
Jul  7 19:41:26 ergo kernel: isdn_net: ippp0: dial rejected: interface not in dialmode `auto', signalling dst_link_failure
</pre>
 
PEr evitare collegamenti accidentali:
 
sudo /etc/init.d/isdnutils stop
 
Per non far partire il support isdn al boot deseleiona isdnutils:
 
rcconf
 
 
'''LA DEFAULT ROUTE NON VIENE CANCELLATA'''
 
 
== Debug della scheda ==
 
Si possono debuggare gli eventi isdn con:
 
<pre>
cat /dev/isdnctrl0
77:25.67 Card1 ISAC STAR 48
77:25.67 Card1 ISAC MODE 0
77:25.67 Card1 ISAC ADF2 80
77:25.67 Card1 ISAC ISTA 0
77:25.67 Card1 ISAC CIR0 7c
77:25.67 Card1 HSCX B ISTA 0
77:25.67 Card1 HSCX A ISTA 0
77:25.67 Card1 HSCX B STAR 48
77:25.67 Card1 HSCX A STAR 48
<pre>
 
cd /etc/isdn/
isdncause E001B
less /usr/share/doc/isdnutils-base/README.HiSax.gz
man isdn_cause
man isdnctrl
sudo /etc/init.d/isdnutils restart
 
sudo isdnctrl dial ippp0
sudo isdnctrl hangup ippp0
sudo isdnctrl ippp0 secure off
sudo isdnctrl ippp0 status
sudoedit isdn.conf
sudoedit device.ippp0
sudoedit ipppd.ippp0
</pre>
 
 
<pre>
 
 
 
Jun 29 11:26:51 firecn kernel: HiSax: Linux Driver for passive ISDN cards
Jun 29 11:26:51 firecn kernel: HiSax: Version 3.5 (module)
Jun 29 11:26:51 firecn kernel: HiSax: Layer1 Revision 2.46.2.5
Jun 29 11:26:51 firecn kernel: HiSax: Layer2 Revision 2.30.2.4
Jun 29 11:26:51 firecn kernel: HiSax: TeiMgr Revision 2.20.2.3
Jun 29 11:26:51 firecn kernel: HiSax: Layer3 Revision 2.22.2.3
Jun 29 11:26:51 firecn kernel: HiSax: LinkLayer Revision 2.59.2.4
Jun 29 11:26:51 firecn kernel: HiSax: Total 1 card defined
Jun 29 11:26:51 firecn kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax (0)
Jun 29 11:26:51 firecn kernel: HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6
Jun 29 11:26:51 firecn kernel: HiSax: DSS1 Rev. 2.32.2.3
Jun 29 11:26:51 firecn kernel: HiSax: 2 channels added
Jun 29 11:26:51 firecn kernel: HiSax: MAX_WAITING_CALLS added
Jun 29 11:27:12 firecn kernel: HiSax: debugging flags card 1 set to 4
Jun 29 11:27:12 firecn isdnlog: isdnlog Version 4.69 starting
Jun 29 11:27:12 firecn isdnlog: Error: could not load holidays from /usr/share/isdn/holiday-xx.dat: No such file or directory
Jun 29 11:27:12 firecn isdnlog: Dest V1.01: File '/usr/share/isdn/dest.cdb' opened fine - Dest 1.0 int (+h) AT DE NL CH BE
Jun 29 11:27:12 firecn isdnlog: Error: could not load rate database from /usr/share/isdn/rate-xx.dat: No such file or directory
Jun 29 11:27:12 firecn isdnlog: (ISDN subsystem with ISDN_MAX_CHANNELS > 16 detected, ioctl(IIOCNETGPN) is available)
Jun 29 11:27:12 firecn isdnlog: isdn.conf:2 active channels, 0 MSN/SI entries
Jun 29 11:27:12 firecn isdnlog: (Data versions: iprofd=0x06  net_cfg=0x06  /dev/isdninfo=0x01)
Jun 29 11:27:12 firecn isdnlog: Everything is fine, isdnlog-4.69 is running in full featured mode.
Jun 29 11:27:12 firecn kernel: isdn: Verbose-Level is 2
Jun 29 11:27:12 firecn ipppd[13969]: ipppd i2.2.12 (isdn4linux version of pppd by MH) started
Jun 29 11:27:12 firecn isdnlog: (HiSax driver detected)
</pre>
 
== Riferimenti ==
 
http://www.klaus.franken.de/DE-ISDN-HOWTO/html/DE-ISDN-HOWTO-3.html#ss3.4
 
http://groups.google.com/group/de.alt.comm.isdn4linux/browse_thread/thread/1fce1a4b47718efe/5635f55fe9933931?lnk=st&q=HiSax%2Cch0+cause%3A+E001B+diva&rnum=1&hl=it#5635f55fe9933931
 
http://www.plzk.de/archiv/files/docs/FritzCard.PCI.Linux-HOWTO.html
 
http://www.wurtel.cistron.nl/i4l-howto-uk.html#TESTEN-KAART
 
http://www.isdn4linux.de/faq/i4lfaq-6.html#config_links
 
http://edu.let.unicas.it/lgei/lgei9803/lgei9803_1.html
 
http://www.pro-linux.de/t_netzwerk/debian-isdn.html
 
http://trieste.linux.it/node/11
 
http://www.debianhowto.de/doku.php/de:howtos:sarge:hylafax_avm_isdn
 
http://dipper.info/project/asterisk/

Latest revision as of 17:04, 8 August 2006