README.cyclom8 Software by Randolph Bentson bentson@grieg.seaslug.org; document by Kenneth R. Kress kkress@phent.UUCP $Date: 1994/09/19 02:23:17; $ $Revision: 2.7 $ This document contains installation information for the Cyclades Cyclom-8Y 8-port serial extender. 1. Introduction The Cyclades makes two serial boards compatible with Linux: the Cyclom-8Y and Cyclom-16Y. Each contains Cirrus Logic CD-1400 RISC- based chips that take the place of the UARTs in more conventional serial-port extenders. It is currently possible to add 32 ports to a Linux system using a combination of Cyclom boards. (Adding more than 32 ports requires `changing' other drivers to make room). The setserial program used to interrogate serial ports does not work with Cyclom boards because the boards do not use UARTs. Cyclades support must be built into the Linux kernel. In addition, modifications to modem settings may be necessary -- depending on the board and cables. 2. Obtaining kernel patches The cyclades patches are available by ftp from sunsite.unc.edu in /pub/Linux/kernel/patches/misc/cyclades.tgz. As of July 1994, this includes: cyclades.c and cyclades.h, and the rcsdiffs of five files: tty.h, timer.h, interrupt.h, Makefile and tty_io.c in a file called `changes'. 3. Applying patches to kernel source files Uncompress and untar cyclades.tgz somewhere (such as /usr/src): ______________________________________________________________________ > cp cyclades.tgz /usr/src > cd /usr/src > zcat cyclades.tgz | tar xvf - ______________________________________________________________________ Make all changes to copies of your kernel files: ______________________________________________________________________ > cp /usr/src/linux/include/linux/tty.h /usr/src/cyclades > cp /usr/src/linux/include/linux/timer.h /usr/src/cyclades > cp /usr/src/linux/include/interrupt.h /usr/src/cyclades > cp /usr/src/linux/drivers/char/Makefile /usr/src/cyclades > cp /usr/src/linux/drivers/char/tty_io.c /usr/src/cyclades > cd /usr/src/cyclades ______________________________________________________________________ If you have RCS, it is a good idea to check in these files: ______________________________________________________________________ > ci -l tty.h ... > ci -l tty_io.c ______________________________________________________________________ For clarity sake, I split the rcsdiff file (changes) into five files (really six, but one is empty) with: ______________________________________________________________________ > csplit changes /^===/ {*} ______________________________________________________________________ then I rename each piece appropriately: ______________________________________________________________________ > mv xx01 tty.h.diffs ... > mv xx05 tty_io.c.diffs ______________________________________________________________________ Apply the changes with patch: ______________________________________________________________________ > patch < tty.h.diffs ... > patch < tty_io.c.diffs ______________________________________________________________________ (Don't worry, patch makes copies of the original files.) Move all of the patched files and the two other cyclades files to the appropriate directories in /usr/src/linux: ______________________________________________________________________ > mv tty.h timer.h interrupt.h cyclades.h /usr/src/linux/include/linux > mv Makefile tty_io.c cyclades.c /usr/src/linux/drivers/char ______________________________________________________________________ 4. Making and installing a new kernel Move to the /usr/src/linux directory and make a new kernel: ______________________________________________________________________ > cd /usr/src/linux > make config > make dep > make zImage ______________________________________________________________________ Twenty or so minutes later ... copy the zImage to its final resting place. ______________________________________________________________________ > mv zImage / ______________________________________________________________________ Edit the /etc/lilo.conf file to support booting this new kernel. (I have LILO pause for 5 seconds, so I can name an alternate boot kernel. After 5 seconds, it defaults to /vmlinuz -- instead of zImage). Do not overwrite the /vmlinuz until you're totally satisfied with this kernel, and even then keep a backup kernel! For example (/etc/lilo.conf): ______________________________________________________________________ # LILO configuration file # generated by 'liloconfig' # # Start LILO global section boot = /dev/sda delay = 50 vga = normal # force sane state ramdisk = 0 # paranoia setting # End LILO global section # # Default Linux bootable partition config begins image = /vmlinuz root = /dev/sda1 label = linux # Linux bootable partition config ends # # new Cyclades Linux bootable partition config begins image = /zImage root = /dev/sda1 label = cyclades # Linux bootable partition config ends # # DOS bootable partition config begins # DOS bootable partition config ends ______________________________________________________________________ And install the new LILO configuration with: ______________________________________________________________________ > liloconfig ______________________________________________________________________ 5. Naming devices This driver uses minor numbers 32-63 for major device numbers 4 & 5. Build the character special files with the commands: ______________________________________________________________________ > mknod /dev/ttyC0 c 4 32 > mknod /dev/ttyC1 c 4 33 > mknod /dev/ttyC2 c 4 34 > mknod /dev/ttyC3 c 4 35 > mknod /dev/ttyC4 c 4 36 > mknod /dev/ttyC5 c 4 37 > mknod /dev/ttyC6 c 4 38 > mknod /dev/ttyC7 c 4 39 > mknod /dev/cub0 c 5 32 > mknod /dev/cub1 c 5 33 > mknod /dev/cub2 c 5 34 > mknod /dev/cub3 c 5 35 > mknod /dev/cub4 c 5 36 > mknod /dev/cub5 c 5 37 > mknod /dev/cub6 c 5 38 > mknod /dev/cub7 c 5 39 ______________________________________________________________________ The ttyCx files are for incoming calls; cubx are for dialing out. 6. Finding or building cables The Cyclom-8Y is a half-size ISA/EISA board with eight 6-wire RJ-12 sockets. (Cyclades calls the connectors RJ-12s, but Radio Shack carries them as 6-wire RJ11s.) A standard DB-25 has 25 pins and a DB-9 has 9 pins. Obviously, to make do with only 6 wires, some signals had to be sacrificed: RTS, DSR and RI (ring indicator). There are two ways to overcome these shortcomings: change the settings in your modem or make (or buy) a special RJ12 to DB-25 connector. First you have to make sure your board is working. Your board probably came with at least one cable and one RJ12 to DB-25 connector (RJ-DB). Attach a modem to the first socket of the board using the supplied RJ- DB connector and cable. The `first' socket is the rightmost socket (looking at the back of your machine). This is socket 0. Test it with: ______________________________________________________________________ > kermit -l /dev/cub0 > connect > at ______________________________________________________________________ If you don't get any error messages and you don't get a response. Type at&v. This should get you a printout of the modem's settings. If nothing happens and the modem lights do not flicker, exit back to the kermit command line and try another line: ______________________________________________________________________ (CTRL)-\ c > set line /dev/cub7 > connect > at ______________________________________________________________________ Assuming the board is installed properly and you've gotten some response out of your modem, it's time to make more connectors and wires. I recommend you wire your own RJ-DB connectors. Radio Shack sells plastic ones, which work fine. Telephone company 6-conductor flat wire comes with colored wires inside a gray sheath. Unfortunately, standard telephone use requires cross-over wires, but you need a straight-through wire. You can either purchase straight-through wires from a computer store or catalog or buy a crimper and 6-wire connectors and make your own. It's easy to do (my 4-year-old and my 6-year-old each made a wire for me -- I didn't want to bake cookies that day :-). The order of wires inside the RJ-12 connectors on a straight-through cable will be the same on both ends. As long as both ends are the same, it doesn't matter whether blue is on the left or white is on the left. Inside the RJ-DB connector, the order of the wires is important. Look into the recess of one socket on the Cyclom-8Y board. With the tab- niche on top, the rightmost wire is pin 1 (TxD: see below). Looking into the RJ-DB connector with the same orientation, the rightmost wire is also pin 1. In the RJ-DBs I bought, pin 1 was attached to the white wire. ______________________________________________________________________ Cyclom-8Ys Modem RJ-12 DB-25 white TxD 1 ---------------------- 2 TxD black RxD 2 ---------------------- 3 RxD yellow Gnd 5 ---------------------- 7 Gnd blue DCD 6 ---------------------- 8 DCD green CTS 4 ---------------------- 5 CTS red DTR 3 ------------------+--- 20 DTR | +--- 4 RTS ______________________________________________________________________ The RJ-DB connectors usually come with additional strap wires. To tie RTS to DTR, I soldered one wire to the DTR lead (inside the connector) and then inserted the other end through pin 4 on the DB-25 to achieve the configuration above. 7. Setting up modems Setting up a modem is more an art than a science. The following describes a working setup of two modems, Taylor UUCP (v1.3) and agetty. Both modems (Zoom and AT&T Dataport), although Hayes- compatible, use different command strings. Have your modem manual at the ready before proceeding. Setting AT&T Dataport 14.4 Autoanswer AT S0=1 DCD follows data carrier AT &C1 DTR follows RS-232 AT &D2 enable RTS/CTS flow AT \Q3 enable error correction AT \N7 CTS tracks RTS AT &R0 Force DSR on AT &S0 Hangup signal delay AT S49=20* *-- This seemed to cure WRITE I/O errors I was getting. If you can't tie RTS to DTR in the connector, then add this to your modem settings: AT&T Dataport 14.4 Ignore RTS AT &R1 save the settings to your default profile: AT &W verify with: AT &V Test to make sure you can still talk with the modem. That done, you are almost ready to put a getty on the line. Because the Cyclom-8Y doesn't support flow control, you will want to turn off CLOCAL and CRTSCTS terminal line settings. To see your current settings, do: ______________________________________________________________________ > stty -a < /dev/cub0 ______________________________________________________________________ for each dial-out line. Set the terminal line settings with: ______________________________________________________________________ > stty -CLOCAL -CRTSCTS < /dev/cub0 ______________________________________________________________________ 8. Troubleshooting 9. Performance measurements At this time, there is no means to boost the port speed above 38,400 because setserial does not work with the Cyclom ports. The Cyclades documentation suggests the boards will support speeds of up to 150 kbps. Bentson's driver will support boosting speeds to 57.6 or 115.2 kbps once a setserial type program is written for the Cyclom boards. Neither the Linux kernel nor the Cyclom boards will permit all of the ports to run in both directions at full speed simultaneously, according to Bentson. (So don't run out and buy 32 28.8K modems tomorrow :-) At the 38.4 kbps setting, I've noticed a slight, but significant, speed-up in the reception of news batches via UUCP. My average this month is still rising. It is currently 1,696 bps (all bytes transfered/total seconds as reported in Taylor Stats file). 10. Where to turn for help Questions? Try: Software: Randolph Bentson bentson@grieg.seaslug.org +1 206 282 8375 Document: Ken Kress dsinc!phent!kkress +1 215 345 3119 Hardware: Cyclades Corporation cyclades@netcom.com +1 510 770 9727 +1 800 347 6601 +1 510 770 0355 Fax #-------- end -----------# -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Kenneth R. Kress dsinc!phent!kkress 215/345-3119 day