[svn-commits] tzafrir: branch 1.2 r2713 - in /branches/1.2: ./ Makefile README

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 11 07:42:00 CDT 2007


Author: tzafrir
Date: Wed Jul 11 07:41:59 2007
New Revision: 2713

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2713
Log:
Get ourselves the nice README from 1.4 .

Modified:
    branches/1.2/   (props changed)
    branches/1.2/Makefile
    branches/1.2/README

Propchange: branches/1.2/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jul 11 07:41:59 2007
@@ -31,3 +31,4 @@
 hdlcverify
 timertest
 Module.symvers
+README.html

Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?view=diff&rev=2713&r1=2712&r2=2713
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Wed Jul 11 07:41:59 2007
@@ -307,6 +307,9 @@
 
 stackcheck: checkstack all
 	./checkstack *.ko */*.ko
+
+README.html: README
+	asciidoc -n -a toc $<
 
 ztdiag: ztdiag.o 
 	$(CC) -o $@ $^

Modified: branches/1.2/README
URL: http://svn.digium.com/view/zaptel/branches/1.2/README?view=diff&rev=2713&r1=2712&r2=2713
==============================================================================
--- branches/1.2/README (original)
+++ branches/1.2/README Wed Jul 11 07:41:59 2007
@@ -1,75 +1,283 @@
 Zapata Telephony Interface Driver
-
-Note:
-See
-http://www.voip-info.org/tiki-index.php?page=Asterisk%20Zaptel%20Installation
-for more verbose and updated version of this document.
-
-Requirements:
-	Some of the testing programs still require the zapata library
-	The zttool program requires libnewt
-
-To install:
-	check zconfig.h for any specific configuration changes
-	make
-	make install
-
-Here is a list of what module to use with what hardware
-
-Module Name	Hardware
-===========     ========
-pciradio        PCI Radio Card Zaptel
-
-tor2		T400P - Quad Span T1 Card
-		E400P - Quad Span E1 Card
-
-torisa		Old Tormenta1 ISA Card
-
-wct4xxp		TE405P - Quad Span T1/E1 Card (5v version)
-		TE410P - Quad Span T1/E1 Card (3.3v version)
-
-wct1xxp		T100P - Single Span T1 Card
-		E100P - Single Span E1 Card
-
-wcte11xp	TE110P - Single Span T1/E1 Card
-
-wcfxo		X100P - Single port FXO interface
-		X101P - Single port FXO interface 
-
-wctdm   	TDM400P - Modular FXS/FXO interface (1-4 ports)
-
-wctdm24xxp      TDM800P -  Modular FXS/FXO interface (up to 8 ports)
-                TDM2400P - Modular FXS/FXO interface (up to 24 ports)
-
-wcusb   	S100U - Single port FXS USB Interface
-
-xpp             the Astribank USB channel bank
-
-ztd-eth         TDM-over-ethernet
-
-ztd-loc         Dynamic local spans
-
-ztdummy		Zaptel Timing Only Interface
-
-
-The module "zaptel" is required by all others. "ztdynamic" is required by 
-ztd-eth and by ztd-loc.
-
-Helper Utilities
-================
-This directory includes many helper utilities. Some of them are more 
-useful for debugging. The more useful ones of them:
-
-ztcfg       Configure zaptel spans / channels.
-zttool      Watch and monitor zaptel spans (also: cat /proc/zaptel/* ).
-ztmonitor   Monitor (visually or to the speaker) or record a zaptel channel.
-zttest      Test the zaptel timing source.
-fxotune     Tune some characteristics of the FXO chip to reduce generated echo.
-torisatool  A tool to configure the old torisa cards. Others don't need it.
+=================================
+Asterisk Development Team <asteriskteam at digium.com>
+$Revision$, $Date$
+
+Zaptel is a short for ZAPata TELephony.
+
+Supported Hardware
+------------------
+Digital Cards
+~~~~~~~~~~~~~
+- wct4xxp: 
+  - Digium newer quad-span T1/E1/J1 cards: Wildcard TE420P/TE410P/TE405P 
+  - Digium newer dual-span T1/E1/J1 cards: Wildcard TE220P/TE210P/TE205P 
+- wcte12xp: Digium Wildcard TE120P and the TE122P single-span T1/E1/J1 card
+- wcte11xp: Digium Wildcard TE110P T1/E1/J1
+- wct1xxp: 
+  - Wildcard T100P (old single-span T1)
+  - Wildcard E100P (old single-span E1)
+- tor2: Tormenta quad-span T1/E1 card from the Zapata Telephony project
+- torisa: The old dual-span ISA T1 card from Zapata Telephony
+
+
+Analog Cards
+~~~~~~~~~~~~
+- wctdm24xxp: 
+  - Digium TDM2400P card: up to 24 analog ports
+  - Digium TDM800P card: up to 8 analog ports
+- wctdm: Digium TDM400P card: up to 4 analog ports
+- xpp: Xorcom Astribank: a USB connected unit of up to 32 ports
+  (also BRI)
+- wcfxo: X100P, similar and clones. A simple single-port FXO card
+- wcusb: Digium S100U: A simple single-port USB FXS unit
+
+
+Other Drivers
+~~~~~~~~~~~~~
+- pciradio: Zapata Telephony PCI Quad Radio Interface
+- wctc4xxp: Digium hardware transcoder cards (also need zttranscode)
+- ztd-eth: TDM over Ethernet (TDMoE) driver. Requires ztdynamic
+- ztd-loc: Mirror a local span. Requires ztdynamic
+- ztdummy: A dummy driver that only provides a zaptel timing source.
+
+
+Build Requirements
+------------------
+You will need a matching kernel source tree and a working Linux build 
+system. Some of the programs require some additional libraries.
+
+
+Kernel Source / "Headers"
+~~~~~~~~~~~~~~~~~~~~~~~~~
+- Building zaptel requires a kernel build tree.
+- This should basically be at least a partial kernel source tree and
+  most importantly, the exact kernel .config file used for the build as
+  well as several files generated at kernel build time.
+- KERNEL_VERSION is the output of the command `uname -r`
+- If you build your own kernel, you need to point to the exact kernel
+  build tree. Luckily for you, this will typically be pointed by the
+  symbolic link /lib/modules/KERNEL_VERSION/build which is the location
+  zaptel checks by default.
+- If you use a kernel from your distribution you will typically have a
+  package with all the files required to build a kernel modules for your
+  kernel image.
+  * On Debian Etch and above and any Ubuntu this is
+    +++ linux-headers-`uname -r` +++
+  * On Fedora RHEL and compatibles (e.g. CentOS) this is the
+    kernel-devel package. Or if you run kernel-smp or kernel-xen, you
+    need kernel-smp-devel or kernel-xen-devel, respectively.
+  * On SUSE you seem to need the package kernel-source .
+  * In some distributions (e.g.: in RHEL/CentOS, Fedora, Ubuntu) the 
+    installation of the kernel-devel / kernel-headers package will 
+    be of a version that is newer than the one you currently run. In 
+    such a case you may need to upgrade the kernel package itself as 
+    well and reboot.
+- To point explicitly to a different build tree: set KSRC to the kernel 
+  source tree and KVERS to the exact kernel version:
+
+  make KVERS=2.6.18.Custom KSRC=/home/tzafrir/kernels/2.6.18
+
+
+Kernel Configuration
+~~~~~~~~~~~~~~~~~~~~
+If you build a custom kernel, note the following configuration items:
+
+- CONFIG_CRC_CCITT must be enabled ('y' or 'm'). On 2.6 kernels this can 
+  be selected These can be selected from the "Library Routines" submenu 
+  during kernel configuration via "make menuconfig".
+- If you don't have any zaptel hardware, you need ztdummy.
+  * ztdummy on i386/amd64 and later kernels (>= 2.6.15) can (and should)
+    use the system's RTC (Real Time Clock).
+  * Alternatives to that for ztdummy are a UHCI USB controller (USB
+    controllers made by Intel or VIA) or a kernel that has HZ=1000
+    (default on kernels 2.6.0-2.6.12, optional on newer kernels. Not
+    possible on 2.4).
+
+
+A Build System
+~~~~~~~~~~~~~~
+gcc and friends. Generally you will need to install the package gcc.
+There may be cases where you will need a specific version of gcc to build
+kernel modules.
+
+
+Extra Libraries
+~~~~~~~~~~~~~~~
+Some libraries are needed for extra utilities that are provided with
+Zaptel
+
+- libusb is needed for building fpga_load, needed for firmware loading of
+  the Xorcom Astribank.
+- libnewt is needed to build the optional but useful utility zttool.
+
+
+Distribution-Specific Instructions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+==== Debian 4.0 (Etch)
+  apt-get install linux-headers-`uname -r` build-essential libnewt-dev libusb-dev
+
+==== Debian 3.1 (Sarge)
+  apt-get install kernel-headers-`uname -r` build-essential libnewt-dev libusb-dev
+
+==== RHEL4 / CentOS 4
+You need the following non-kernel-related packages:
+
+  yum install gcc newt-devel libusb-devel
+
+If the following command produces an error, you need to install
+ithe kernel devel package:
+
+  ls /lib/modules/`uname -r`/build/.config
+
+The right one depends on your kernel version. If the following command
+produces output you have an SMP kernel:
+
+  uname -r | grep smp
+
+and thus need to run:
+
+  yum install kernel-smp kernel-smp-devel
+
+If that command produced no output, you have a non-SMP kernel:
+
+  yum install kernel kernel-devel
+
+At this point you should probably reboot to get the new kernel in effect.
+
+
+Installation
+------------
+----------------------------------
+make
+make install
+# To install init scripts and config files:
+#make config
+----------------------------------
+
+
+Zaptel PERL modules
+-------------------
+The directory xpp/utils has, in addition to helper utilities for the
+Xorcom Astribank, a collection of perl modules to provide information
+related to Zaptel. The perl modules themselves are under xpp/utils/zconf .
+In xpp/utils there are several utilities that use those modules:
+- xpp-specific: zt_registration, xpp_sync, xpp_blink .
+- General: lszaptel, zapconf, zaptel_hardware
+
+On zaptel 1.2 they are not installed by default. To install them, run:
+
+  make -C xpp/utils install
+
+Those utilities require the perl modules to be installed, however they
+will also look for them in the directory zconf, and thus can be run
+directly from the zaptel source tree. For example:
+
+  ./xpp/utils/zaptel_hardware
+
+To get usage information on a program, you can also use perldoc
+(sometimes provided in a package separate from perl itself). For
+instance:
+
+  perldoc ./xpp/utils/xpp_blink
+
+zapconf is currently experimental and intended to eventually replace
+genzaptelconf by a more maintainable code.
+
+
+Zaptel Device Files
+-------------------
+Userspace programs will usually interact with Zaptel through device
+files under the /dev/zap directory (pedantically: characted device files 
+with major number 196) . Those device files can be generated statically
+or dynamically through the udev system.
+
+* /dev/zap/ctl (196:0) - a general device file for various information and
+  control operations on the zaptel channels.
+* /dev/zap/NNN (196:NNN) - for NNN in the range 1-249. A device file for
+  zaptel channel NNN. It can be used to read data from the channel
+  and write data to the channel.
+* /dev/zap/transcode (196:250) - Used to connect to a zaptel transcoding
+  device.
+* /dev/zap/timer (196:253) - Allows setting timers. Used anywhere?
+* /dev/zap/channel (196:254) - Can be used to open an arbitrary zaptel
+  channel. This is an alternative to /dev/zap/NNN that is not limited to
+  249 channels.
+* /dev/zap/pseudo (196:255) - A timing-only device. Every time you open
+  it, a new Zaptel channel is created. That Zaptel channel is "pseudo" -
+  Zaptel recieves no data in it, and only sends garbage data with the
+  same timing as the Zaptel timing master device.
+
+
+Zaptel Timing
+-------------
+A PBX system should generally have a single clock. If you are connected
+to a telephony provider via a digital interface (e.g: E1, T1) you should
+also typically use the provider's clock (as you get through the
+interface). Hence one important job of Asterisk is to provide timing to
+the PBX. 
+
+Zaptel "ticks" once per millisecond (1000 times per second). On each
+tick every active zaptel channel reads and 8 bytes of data. Asterisk
+also uses this for timing, through a zaptel pseudo channel it opens.
+
+However, not all PBX systems are connected to a telephony provider via
+a T1 or similar connection. With an analog connection you are not synced
+to the other party. And some systems don't have Zaptel hardware at all.
+Even a digital card may be used for other uses or is simply not
+connected to a provider. Zaptel cards are also capable of providing timing 
+from a clock on card. Cheap x100P clone cards are sometimes used for
+that pupose.
+
+If all the above fail, you can use the module ztdummy to provide timing
+alone without needing any zaptel hardware. It will work with most
+systems and kernels.
+
+You can check the zaptel timing source with zttest, which is a small 
+utility that is included with zaptel. It runs in cycles. In each such
+cycle it tries to read 8192 bytes, and sees how long it takes. If zaptel
+is not loaded or you don't have the device files, it will fail
+immedietly. If you lack a timing device it will hang forever in the
+first cycle. Eitherwise it will just give you in each cycle the percent
+of how close it was. Also try running it with the option -v for a
+verbose output.
+
+
+Spans and Channels
+------------------
+Zaptel provides telephony *channels* to the userspace applications. 
+Those channels are channels are incoreperated into logical units called
+*spans*.
+
+With digital telephony adapters (e.g: E1 or T1), a span normally 
+represents a single port. With analog telephony a span typically
+represents a PCI adapter or a similar logical unit.
+
+Both channels and spans are identified by enumerating numbers (beginning
+with 1). The number of the channel is the lowest unused one when it is
+generated, and ditto for spans.
+
+
+PROCFS Interface: /proc/zap
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+A simple way to get the current list of spans and channels each span
+contains is the files under /proc/zaptel . /proc/zaptel is generated by
+zaptel as it loads. As each span registers to Zaptel, a file under
+/proc/zaptel is created for it. The name of that file is the number of
+that span.
+
+Each file has a 1-line title for the span followed by an empty line and
+then a line for each channel of the span. 
+
+The title line shows the number of the span, its name and title, and 
+(potentially) the alarms in which it is.
+
+The channel line for each channel shows its channel number, name and the
+actual signalling assigned to it through ztcfg.
 
 
 What is the license for the zaptel driver?
-===================================================
+------------------------------------------
 libpri is distributed under the terms of the GNU General Public License, 
 which permit its use and linking with other GPL'd software only.  
 The GNU GPL is included in the file LICENSE in this directory.
@@ -80,38 +288,20 @@
 at reasonable cost.
 
 
-Brief F.A.Q
-===========
-
-Q. Zaptel compiled with no errors but when I try to modprobe zaptel I
-receive "FATAL: Error insering zaptel (/lib/modules/2.6.x.x/misc/zaptel.ko):
-Unknown symol in module or unknown parameter (see dmesg)
-
-A. You need to recompile your kernel with CONFIG_CRC_CCITT=y or
-CONFIG_CRC_CCITT=m. To do this, run 'make menuconfig' and change it under 
-'Library Routines -> CRC-CCIT functions'. If you compiled it as a module,
-load it, otherwise reboot.
-
-Q. Do I need to set up the symbolic link /usr/src/linux ?
-A. That depends.
-
-* On Debian Sarge: apt-get install kernel-headers-`uname -r`
-* On Ubuntu and newer Debian: apt-get install linux-headers-`uname -r`
-* On Redhat, Fedora, Centos: install the package  'kernel-devel' or 
-  'kernel-smp-devel' (depending on your kernel versions).
-* If you have just installed a kernel.org kernel from source, chances
-  are also that things will Just Work[tm].
-
-This is because the build process checks for /lib/modules/`uname -r`/build
-before /usr/src/linux . This linux will also be valid if you installed a 
-non-ancient kernel from source, and haven't reconfigured the source tree.
-
 How do I report bugs or contribute?
-===================================
+-----------------------------------
 Please report bug and patches to the Asterisk.org bug tracker at
 http://bugs.digium.com in the "zaptel" category.
 
+
 Does anything use this library so far?
-======================================
+--------------------------------------
 Yes, the Asterisk Open Source PBX does. http://www.asterisk.org
 
+
+Links
+-----
+- http://asterisk.org/ - The Asterisk PBX
+- http://voip-info.org/
+- http://voip-info.org/wiki/view/Asterisk+Zaptel+Installation
+- http://www.zapatatelephony.org/ - A historical site.




More information about the svn-commits mailing list