Tormenta Linux Driver --------------------- Brought to you by: Jim Dixon (jim@lambdatel.com) Mark Spencer (markster@linux-support.net) Steve Underwood (steveu@coppice.org) and the letter Q. Introduction ============ Zapata -- Unix-Based High Density Computer Telephony Project Current computer telephony technologies have 2 main problems: ludicrously high cost, and ludicrously low support. When you buy standard commercially-available computer telephony hardware these days, after having your wallet absolutely raped, you find that the product is broken, or at least has funny quirks that even the manufacturer doesn't seem to know about (or care) about, and isn't interested in (or for that matter capable of) giving you any reasonable level of support. This is completely consistent (without exception) among all of the major manufacturers. There is now finally hope after 15 years of this type of severe dysfunction. The Zapata project, named after the famous Mexican Revolutionary, is an attempt to address these issues in a practical and livable manner. After much experimentation, it was found that it was quite feasible to achieve somewhat high channel-count density utilizing minimal hardware on a modern PC-style system, thus minimizing the hardware costs. In addition, a free open-source architecture running on a solid, stable, free open-source platform, completely eliminates support issues. This way, if you don't like what it does or the way it does it, you can 'fix' it yourself. Unlike many of the commercial manufacturers, we have nothing to hide or lose by making our technology and source code openly available to everyone. The Zapata Technology The Zapata technology combines an interface card, called "Tormenta" (which means "storm") which we developed, a driver for this card for the FreeBSD operating system, and an API library for user-interface. The Zapata interface card ("Tormenta") is a 16-bit ISA bus (PCI version coming) card (that occupies 4096 bytes of system memory space), containing interface hardware for two T-1 digital 1.544 MBPS telephone interfaces. It contains merely the minimal amount of hardware necessary, thus keeping the costs to a bare minimum. It contains no DSP or proprietary technology, whatsoever. It really pushes the ISA bus (from a throughput standpoint) to its limits. "We don't need no stinkin' DSP!!" The driver and library fully implement all standard telecom functions, including signaling, DTMF and MF detection and generation, arbitrary single and dual tone generation, Caller*ID reception (on FXS channels), voice play and record, switching, and conferencing (yes, it REALLY IS possible to use your Unix box as a DSP!!), yet consumes quite minimal system resources. It currently only supports chanelized mu-law T-1 services (robbed-bit (also known as channel-associated) signaling). A-law can also easily be supported, if there is need. Perhaps someday it will support Primary Rate ISDN (especially if someone is interested in implementing the protocol for it :-) ). E & M and FXS (both loopstart and groundstart) signaling are currently supported. It also supports clear-channel/networking/ data modes. In addition, Zapata fully implements Digital TTY/TDD modems within its library, making it the first ever multiple-line telecommunications solution for communicating with Deaf and hearing-impared people on a large-scale basis. Nothing else has ever even come close (the highest density devices to date have been single analog line based) at any price. And it's all freely available as open-source. Viva la revolucion de las computadoras telefonicas! Viva Zapata! The Zapata Technology is based upon the concept that computer hardware is now fast enough to handle all processing for computer telephony applications, including that which was traditionally limited to DSP's and embedded controllers. DSP's are optimized for signal processing applications and functions, and do so far more efficiently then traditional general-purpose processors, such as those found in PC's and standard computer systems. Despite their serious advantage in these types of applications, they have many logistical deficiencies that often make their use far out of reach of the common mortal. These deficiencies include entirely proprietary architectures, both hardware and software, requiring specialized knowledge and experience, not to mention extremely specialized (and way way expensive) development hardware and software. As a result, the use of DSP's has become limited to environments where the extreme expense of the requirements of their use (both development environment and personnel/expertise, and in some cases the DSP parts themselves) can be recovered. Unfortunately, what this also does, is completely discourage the open-source concept in any of these technologies, since it would be impossible to recover high costs, and even if source code for DSP's was made available,very few could afford the equipment necessary to develop it. The Zapata Technology is an attempt to address these issues. Even the simplest personal computers are quite fast these days. Even if DSP-style processing is only possible in an inefficient manner (on this type of architecture), and bus-I/O is HORRIBLY SLOW (for example, on a 48 port system with the Tormenta ISA card, a 550Mhz Pentuim-III system spends OVER 1/3 of its time halted, waiting for bus-I/O to complete), there still is plenty of time for applications to run and operate in a reasonable manner. Certainly it is a horrible waste of processor time, but it would certainly appear the the serious advantages of this approach outweigh the wastes. Besides, processors are getting faster all the time. As a result, the waste and inherent architectural inefficiencies will become less of an issue over time. In addition, a PCI version of the card will also help this a great deal. The truly beautiful part of this technology is that since all processing takes place within the main CPU(s), there is absolutely minimal hardware necessary (just enough to make the T-1 data accessible via the bus), keeping costs to an absolutely unprecedented minimum (various commercial solutions list at about $10,000.00 US, give or take a couple thousand. The Tormenta card costs $275.00 US). In addition, it allows all development issues to be put in the hands of literally anyone inclined to do so. It requires no specialized development environment or knowledge, being merely yet another driver and library, just like all the ones for other types of hardware. The Tormenta ISA card contains entirely off-the-shelf available parts, none of which require programming, thus allowing for construction by anyone. This is the driver for the "Tormenta" interface card. Installation ============ To install the tormenta driver under Linux you should perform the following operations: 1. Install a compatible kernel. The 2.2.16 kernel as included in RedHat 6.2 will work. RedHat 7.0 is not recommended due to a very broken kernel development environment. If you want to use the Tormenta in data mode, we recommend that you use the 2.4.2 kernel (or greater) with the Alan Cox patches. Those patches are available at ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4. 2. Edit the Makefile and change BASEADDR to reflect the base address that your tormenta card is configured to use. The default is 0xd0000. 3. Type "make" to build the driver. There should be no errors and no warnings during the build. 4. If you wish to use the tormenta with networking AND ARE RUNNING THE 2.4 KERNEL, type "make sethdlc" to build the sethdlc utility. 5. Type "make install" to install the driver and automatically update your /etc/modules.conf. 6. Copy the tormenta.conf.sample to /etc/tormenta.conf and edit for your configuration. The configuration file contains extensive comments as to its format. 6. When complete, just type "modprobe tor" to load the tormenta driver. If you change /etc/tormenta.conf, it is recommended that you unload and then reload the driver, although it *may* be sufficient to run /sbin/torcfg 7. If you want to use networking you will need to use sethdlc to setup the interfaces. See http://hq.pm.waw.pl/hdlc/ for more information on the sethdlc utility.