home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 20 NDrivers / 20-NDrivers.zip / pi2drv10.zip / PI2DRVR.TXT < prev    next >
Text File  |  1996-02-16  |  10KB  |  272 lines

  1.     
  2.  
  3.  
  4. Version 0.93  Dec. 1995
  5.  
  6.  
  7.     
  8.                      --OS/2 PI Card Driver Docs-- 
  9.  
  10.                     by Dale A. Heatherington, WA4DSY   
  11.                 wa4dsy@wa4dsy.radio.org
  12.                       http://www.wa4dsy.radio.org
  13.     
  14.     
  15.     PI2DRVR.SYS is an OS/2 physical device driver (PDD) for the Ottawa PI high 
  16.     speed packet interface card.  It provides automatic detection and support 
  17.     of both the original PI card and the newer PI2 card.  This driver supports 
  18.     both the A and B channels.  The A channel transfers data by DMA and will 
  19.     run at speeds of 56 KB and higher.  The B channel is interrupt driven 
  20.     which limits the maximum speed to about 19200 bps on a 486-33.  Some 
  21.     transmitter underruns will occur at 19200.  This driver is all you need to 
  22.     run PMNOS 1.2 or higher.    
  23.     
  24.     VPI2.SYS is an OS/2 virtual device driver (VDD).  It allows DOS programs 
  25.     access to the physical device driver, PI2DRVR.SYS.  Only one PI card is 
  26.     supported in this mode.    
  27.     
  28.     PI.C is a modified PI card driver for JNOS which allows it to access the 
  29.     virtual device driver VPI2.SYS.  It must be compiled into JNOS as a 
  30.     replacement for the original JNOS PI.C.    
  31.     
  32.     
  33.     Quick start examples:    
  34.     
  35.     1.Copy PI2DRVR.SYS and VPI2.SYS to your hard drive.    
  36.     I suggest putting them in the directory with your    
  37.     other tcp/ip software.    
  38.     
  39.     
  40.     2.Add the following lines to your config.sys, assuming    
  41.     the PI card is jumpered for IRQ 5, port 0x300,    
  42.     DMA channel 1, you want 512 byte buffers and the    
  43.     drivers are in your c:\nos directory.    
  44.     
  45.     DEVICE=C:\NOS\PI2DRVR.SYS PI0 5 0x300 1 512    
  46.     DEVICE=C:\NOS\VPI2.SYS    
  47.     
  48.     The syntax of the parameter list is:    
  49.     
  50.     PI2DRVR.SYS <name | name1$name2> <IRQ> <I/O port> <DMA>    
  51.                       <Buffer size> [<Number of buffers>]    
  52.                    [<A ch. Speed>] [<A ch. clk mode>]    
  53.                    [<B ch. Speed>] [<B ch. clk mode>]    
  54.     
  55.     note: Items in <> must be supplied. Items in [] are optional.    
  56.               If a single name is supplied the driver will append    
  57.               "A" and "B" to the name.  If two independent names    
  58.               are desired enter them with a "$" as a separator.    
  59.               The names must match the names supplied in the attach    
  60.               pi statement in AUTOEXEC.NOS.  The other parameters    
  61.               are described in more detail later in this document.    
  62.     
  63.     
  64.     3.Add the following line to you AUTOEXEC.NOS file.    
  65.     
  66.     attach pi 0x300 5 1 ax25 pi0 512 512 0 9600    
  67.     
  68.     assumes: A channel set for external clock.    
  69.                  B channel set for 9600 bps internal clock    
  70.  
  71.     
  72.  
  73.  
  74.  
  75.  
  76.  
  77.                  Interface names are pi0a and pi0b.    
  78.                  There are several other PI related parameters    
  79.                  in autoexec.nos.  See NOS and PI card    
  80.                  documentation for details.    
  81.     
  82.     4.Reboot.    
  83.     
  84.     5.You may now run PMNOS 1.2 or higher or JNOS110i which has    
  85.     been compiled with a PI driver modified for use with VPI2.SYS.    
  86.     
  87.     
  88.                           --Technical Notes--    
  89.     
  90.     When loaded, the driver looks like a file named "pi0a" or "pi0b" to the 
  91.     operating system.  Any C language functions which read or write files can 
  92.     send and receive data to and from the driver.  The receive routines must 
  93.     be a separate thread because the driver blocks until a packet is received.  
  94.     A non-blocking mode is provided for use with DOS applications which may 
  95.     access the driver through the virtual device driver VPI2.SYS.  See source 
  96.     code for details.    
  97.     
  98.     Data written to the driver will be transmitted as soon as the channel is 
  99.     idle and the txdelay has expired. Writes don't block unless all the buff-
  100.     ers are in use. When this happens the write operation will block until a    
  101.     buffer becomes available.    
  102.     
  103.     The driver can be crudely tested by doing a copy from console to pi0a.    
  104.     
  105.     C:>copy con: pi0a <cr>    
  106.     This is a test ^Z <cr>    
  107.     
  108.     That should send out a frame containing "This is a test"    
  109.     
  110.     
  111.     C programmers take note:    
  112.     In C the buffer must be flushed after each write else    
  113.     several writes will be placed in one packet.    
  114.     
  115.     fwrite(&data,1,datasize,f);    
  116.     fflush(f);    
  117.     
  118.     OS/2 system call DosWrite() doesn't need a flush.    
  119.     
  120.     
  121.     
  122.     
  123.     
  124.                   --Command Line Parameter Details--    
  125.     
  126.     
  127.     
  128.     
  129.     Example from config.sys:    
  130.     
  131.     device=C:\nos\pi2drvr.sys pi0 5 0x300 1 512 12 9600 1 1200 0    
  132.     
  133.     There are 10 parameters.  You must supply the 1st 4. The last 6 are 
  134.     optional if defaults are acceptable. The last 4, speed and clock mode, are 
  135.     usually supplied by the application program. The number of buffers an 
  136.     buffer size can't be changed after OS/2 boots.    
  137.     
  138.     1. pi0    
  139.        Device driver name.  The length must be 7 characters or less.    
  140.        This is the base name the system will use to access the driver.  If    
  141.        two drivers are installed they must have different names as well    
  142.        as interrupts, ports and DMA channels.  An A or B will be appended.    
  143.  
  144.     
  145.  
  146.  
  147.  
  148.  
  149.  
  150.     
  151.        example: device=pi2drvr.sys pi0 5 0x300 1 9600 1 1200 0    
  152.                 device=pi2drvr.sys pi1 7 0x320 3 0 0 1200 0    
  153.     
  154.        If one name is supplied as in the above examples, then "A" and "B"    
  155.        will be appended.  The A channel driver will be "PI0A" and B will    
  156.        be "PI0B".  If you enter "pi0a" the name will be "pi0aa".    
  157.     
  158.        If you want to have independent names enter them with a "$"    
  159.        between them.    
  160.     
  161.     device=C:\pi2drvr.sys hispeed$lospeed 5 0x300 1 0 512 12 9600 1 1200 0    
  162.     
  163.     Creates two names - "hispeed" for A channel and "lospeed" for B channel.    
  164.     The A or B suffix will not be appended.    
  165.     
  166.     2. 5    
  167.        The hardware IRQ for the PI card.    
  168.        valid range: 2 to 7    
  169.        default: 5    
  170.     
  171.     3. 0x300    
  172.        The I/O port base address for the PI card.    
  173.        valid range: 0x300 to 0x380 in steps of 0x20    
  174.        default: 0x380    
  175.     
  176.     4. 1    
  177.        DMA channel for PI card    
  178.        valid range: 1 to 3    
  179.        default: 1    
  180.     
  181.     5.   512    
  182.          Buffer size    
  183.          valid range: 128 to 3072    
  184.          default:     2088    
  185.     
  186.     6.  12    
  187.     Number of buffers.  They are divided between the A and B channels.    
  188.           The receiver and transmitter use the same buffers. If number is    
  189.     odd the A channel will have one more buffer than the B channel.    
  190.     
  191.               valid range: 8 to 15    
  192.        default:     15    
  193.     
  194.     Items below are optional if set by application program.    
  195.     
  196.     7.  9600    
  197.          Baud rate for channel A.  Set to ZERO for external clocking for    
  198.          the WA4DSY 56KB modem.    
  199.          Valid range 0 to 57600    
  200.     
  201.     8.  1    
  202.          Clocking mode for channel A.    
  203.          "0" is normal.  "1" is G3RUH 32x clock mode.    
  204.     
  205.     9.  1200    
  206.          Baud rate for channel B.    
  207.     
  208.     10  0    
  209.               Clocking mode for channel B.    
  210.     "0" is normal.  "1" is G3RUH 32x clock mode.    
  211.     
  212.     If no value is given the default is used.    
  213.     
  214.     ***Note:  If the "B" channel is not used, you should
  215.               set the speed to either 1200 or 9600 but not zero.
  216.               Setting the speed to zero enables external clock
  217.               which is not connected and noise on the clock
  218.               line can cause strange symptoms such as lockups.
  219.     
  220.  
  221.     
  222.  
  223.  
  224.  
  225.  
  226.  
  227.     
  228.     
  229.     
  230.                     --Virtual Device Driver Docs--    
  231.     
  232.     
  233.     
  234.     VPI2.SYS is a virtual device driver which enables DOS programs to access 
  235.     the physical device driver using software interrupt calls.  All calls use 
  236.     INT 7D hex.  See VPI2.C and PI.C source code for more details.  Only one 
  237.     DOS session at a time can use the driver. It DOES NOT virtualize PI card 
  238.     hardware.  If you plan to use JNOS you must replace the DOS PI card driver 
  239.     with a version designed for use with this driver.   I've included a  
  240.     replacement driver with this package.  See PI.C and PI.H .    
  241.     
  242.     By not virtualizing PI card hardware I both saved a lot of development 
  243.     time and produced a driver which is much more efficient, generating only 
  244.     one DOS interrupt for each received packet.  The IRQ number is the same as 
  245.     the IRQ parameter passed to the PDD in the device= statement in config.sys 
  246.     but has no other logical connection.    
  247.     
  248.     This driver only supports a single PI card.  It may be possible to support 
  249.     two cards using two sets of drivers, one set for each card.  The second 
  250.     Physical Device Driver needs to have a different internal name to prevent 
  251.     any conflicts with the first driver.  See the PddName variable in 
  252.     PI2DRVR.ASM and szPDDName in VPI2.C . This is the name used by the VDD to 
  253.     find the mating PDD.  The Virtual Device Driver will also need to be 
  254.     assigned a different software interrupt number.  If this is done, PI.C 
  255.     needs to be changed to support two cards/drivers.    
  256.     
  257.     
  258.     The replacement PI driver for JNOS does everything the original does plus 
  259.     it can change the speed of the interface using the param 10 command.    
  260.     
  261.     Example:  param pi0b 10 9600    set pi0b to 9600 bps.    
  262.     
  263.     
  264.     
  265.     
  266.     3-9-95    
  267.     
  268.     Dale Heatherington, WA4DSY    
  269.     wa4dsy@wa4dsy.radio.org    
  270.     daheath@ibm.net    
  271.     
  272.