home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / packet / bpq405 / drivers.doc < prev    next >
Text File  |  1992-02-09  |  13KB  |  382 lines

  1. From Version 4.00, the application interface to the switch has been changed.
  2. The new interface is called BPQ Host Mode (see BPQHOST.DOC for full details).
  3. Some software is available for the new interface (eg F6FBB BBS, TERM4), but,
  4. in order to support older software, and to provide new facilities, a number
  5. of drivers have been written. These are TSR's, which are loaded after BPQCODE.
  6.  
  7. The drivers supplied with 4.05 are detailed below:
  8.  
  9. BPQHTNC2
  10.  
  11. This provides the COMBIOS/TNC2 emulation, as used by W0RLI and G1NNA
  12. BBS's (amongst others), and various Terminal Programs (YAPPB, PAC2 etc).
  13.  
  14.  
  15. BPQHKISS
  16.  
  17. This provides the COMBIOS/KISS emulation. This was used for the NET
  18. TCP/IP interface, and for programs like STATS and TLMDC (the Satellite
  19. telemetry decode program). 
  20.  
  21.  
  22. DEDHOST
  23.  
  24. This provides an emulation of the WA8DED Host Mode driver used with DRSI
  25. cards (TNCTSR). It is used for PacketCluster and AA4RE.
  26.  
  27.  
  28. NODEDRV4
  29.  
  30. This is used to interface the NOS TCP/IP package to the switch. It conforms
  31. to the PacketDriver interface spec.
  32.  
  33.  
  34.  
  35. Full details of the above drivers are given below
  36.  
  37.  
  38.  
  39.         TNC2 Emulation routine - BPQHTNC2
  40.  
  41.  
  42. This program provides the application interface for TNC2 applications
  43. on switch version 4.05 and above. BPQHTNC2 should be loaded after the switch.
  44. If only a single program uses the TNC2 interface, (eg NNA), it may be loaded
  45. in the programs's Desqview window, but if it is used by more than
  46. one program (eg RLI, or utilites such as PAC2, BPQTERM, MH), it should be
  47. laoded before Desqview. If in doubt, load it before DV.
  48.  
  49. The program may be called in two ways. If called without any paramters, it
  50. will use the TNCPORT information from BPQCFG.BIN, and use BPQHOST ports 33
  51. upwards. This should be adequate for the great majority of applications.
  52. Alternatively it is possible to supply 3 parameters, the number of TNC2 ports
  53. required, the first COMBIOS port required, and the first BPQHost port to use.
  54. This will only be necessary if you want to use more than 16 TNCPORTS, or if
  55. you are already using BPQHOST ports above 33.
  56.  
  57. For example,
  58.  
  59. To use the ports defined in BPQCFG.TXT (ie to be the same as earlier versions)
  60.  
  61.     BPQHTNC2
  62.  
  63. To create COM1-COM18, enter:
  64.  
  65.     BPQHTNC2 18 1 1
  66.  
  67. For COM2-COM5
  68.  
  69.     BPQHTNC2 4 2 1
  70.  
  71. A single copy of BPQHTNC2 can only support a contiguous set of COM ports. If
  72. you want set up say COM1-COM4, then COM8-COM9, you can run more than one 
  73. copy:
  74.  
  75.     BPQHTNC2 4 1 1
  76.     BPQHTNC2 2 8 5        (Four BPQHOST ports have been used by first)
  77.  
  78. There is some overhead in running two copies, so in general it would be
  79. better to rearrange the applications to use a contiguous set of COM ports.
  80.  
  81.  
  82. The last parameter will normally be 1. Only if you are using BPQ Host ports
  83. for other software (eg FBB, TERM4, DEDHOST), or are running more than one copy
  84. of BPQHTNC2, will it need changing.
  85.  
  86.  
  87. Please note that BPQHTNC2 reads BPQCFG.BIN to find what interrupt to use 
  88. to talk to the switch, and to get the default value for PACLEN. BPQCFG.BIN
  89. must therefore be in the current directory when BPQHTNC2 is loaded.
  90.  
  91.  
  92.  
  93.  
  94.  
  95. Background information on INT14 Drivers.
  96.  
  97.  
  98. Both BPQHTNC2 and BPQHKISS emulate the COMBIOS/MBBIOS interface used by
  99. WA7MBL, AA4RE and others.
  100.  
  101. The following contains information extracted from AA4RE's MBBIOS
  102. Documentation. It has been modified to conform to my COMBIOS
  103. emulation.
  104.  
  105. MBBIOS supports the standard INT 14 calls plus the extended ones as
  106. defined by Jeff Jacobsen, WA7MBL for his BBS program.  These are
  107. explained below.  AH=0 to AH=3 are identical to the IBM BIOS definition.
  108.  
  109. DX must contain the port number, which start at zero, so for COM1 set 
  110. DX=0, COM2 set DX=1, etc.
  111.  
  112.  
  113. AH = 0     Initialize
  114. ---------------------
  115.  
  116. This is provided for compatibility only. It has no effect except to
  117. return the current (virtual) LSR in AH, bit zero of which is set if
  118. any characters remain in the rx buffer, and virtual MSR in AL. 
  119.  
  120.  
  121.     The MSR bits supported are DCD=Connected
  122.                    CTS=Not busy
  123.  
  124.     An attempt is also made to maintain delta bits
  125.  
  126.          BIT 7 - Receive Line Signal Detect (DCD)
  127.          6 - Ring Indicator (Not supported) 
  128.              5 - Data Set Ready (Always on)
  129.              4 - Clear To Send
  130.  
  131.              3 - Delta  RLSD ( ie state has changed since last
  132.                                   access)
  133.              2 - Not Supported (Trailing Edge Ring Detect)
  134.              1 - Not Supported (Delta DSR)
  135.              0 - Delta CTS
  136.  
  137.  
  138. AH = 1     Send Character
  139. -------------------------
  140.  
  141. AL contains the character to send.  Return values are the same as above.
  142.  
  143.  
  144. AH = 2     Receive Character
  145. ----------------------------
  146.  
  147. On return, AL contains the character received.  AH contains the
  148. virtual LSR. Again, AH bit 0 indicates if there is additional characters 
  149. in the buffer.  This routine does NOT timeout while waiting for a character 
  150. but will hang indefinitely waiting for a character to appear.
  151.  
  152. AH = 3     Return Status
  153. ------------------------
  154.  
  155. Return values are the same as returned by the Initialize routine.
  156.  
  157. AH = 4     Inquiry
  158. ------------------
  159.  
  160. Returns AX and BX set to 0AA55H.  This call is used to see if the
  161. particular port is defined in TNCPORTLIST. Note that COMBIOS/MBBIOS
  162. set AX, but not BX
  163.  
  164.  
  165. AH = 5     Drop RTS
  166. -------------------
  167.  
  168. This drops (virtual) DTR and RTS.  Will stop higher level code sending
  169. any more data into the receive buffer. No return value.
  170.  
  171. AH = 6     Raise RTS
  172. --------------------
  173.  
  174. Raise DTR and RTS.  No return value.
  175.  
  176. AH = 7     Send Break
  177. ---------------------
  178.  
  179. Generates a "Break".  Returns the virtual TNC to Command mode from Converse
  180. or Transparent mode. No return value.
  181.  
  182. AH = 8     Non-destructive Read
  183. -------------------------------
  184.  
  185. Returns the next character in the buffer in AL without removing it from
  186. the buffer.  AH value defined as in AH=2 so you can use the Data Ready
  187. bit to check to see if you really did get a character.
  188.  
  189. AH = 9     Set/Get options
  190. --------------------------
  191.  
  192. Not implemented.
  193.  
  194.  
  195.  
  196. AH = A     Write buffer
  197. -----------------------
  198.  
  199. Sends CX characters starting at DI:ES.  Upon return, DI will be updated
  200. and CX will contain the unsent character count.  Unsent characters could
  201. result from either BUFFER FULL or hardware handshake is OFF.  AX will
  202. be set as in AH=3 (Status) above.
  203.  
  204. AH = B     Read buffer
  205. ------------------
  206.  
  207. Receives up to CX characters starting at DI:ES.  Upon return, CX set to
  208. actual count read and DI is updated.  If the buffer is empty, return is
  209. immediate with CX = 0. The function will return a 'logical' line, up
  210. to a CR in normal mode, or 17H in Host Mode. On return, AL contains the MSR
  211. and AH has the virtual LSR. Again, AH bit 0 indicates if there are additional 
  212. characters in the buffer.
  213.  
  214.  
  215.  
  216. AH = 1F - G8BPQ NODE-SPECIFIC COMBIOS EXTENTIONS 
  217. ------------------------------------------------
  218.  
  219. AL = 0 - Return Version and Node DS
  220.  
  221. Returns: AX=Node data segment
  222.      DH=Major Version
  223.      DL=Minor Version    - ie for version 3.50, DH=3, DL=50
  224.  
  225.  
  226. AL = 1 - Return ES:SI pointing to connected call (in AX25 firm), or
  227.        SI=0 if not connected. If connected, returns session type 
  228.        in AH, and port number (if L2 session) in AL. Session
  229.        type is a bit significant field defined as follows:
  230.  
  231.        ;
  232.        ;    CIRCUITTYPE EQUATES
  233.         ;
  234.        L2LINK    EQU    1
  235.        SESSION    EQU    10B
  236.        UPLINK    EQU    100B
  237.        DOWNLINK    EQU    1000B
  238.        HOST        EQU    10000B
  239.     
  240.  
  241. AL = 2 = Return (in AH) number of unacked packets on connection
  242.  
  243.  
  244. AL = 10H Disconnect user form virtual TNC, and return user to Node
  245.  
  246.  
  247. The segment registers are saved, (unless retuning a value), but other 
  248. registers may be destroyed.
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.         WA8DED Host Mode Interface for G8BPQ Switch.
  256.  
  257.  
  258.  
  259. A facility has been developed to allow applications which normaly operate
  260. in DED Host Mode, using a DRSI card and the DRSI support routine TNCTSR,
  261. to be used with my switch code. An external interface routine DEDHOST.COM
  262. is used to emulate the DRSI support routine TNCTSR. DEDHOST must be run after
  263. BPQCODE. If running with Desqview, DEDHOST should be run in the same window
  264. as the application. Version 4.01 (or higher) of BPQCODE is required. Note that
  265. my code emulates a single DSRI port - multiple comms links may be connected to
  266. the switch, but as far as the application software is concerned, there is a
  267. single (virtual) link to the switch, capable of supporting up to 32 sessions.
  268.  
  269. DEDHOST.COM requires 5 parameters, all are decimal numbers. A 6th is optional
  270. - if present, it is a single character. Parameters are:
  271.  
  272. Number of Streams.
  273.  
  274. This defines the maximum number of simultaneous users. The maximum is 32. 
  275.  
  276. Start Stream.
  277.  
  278. The first stream number to use. The switch supports 64 streams. You must
  279. ensure that each application running with the switch uses a different range
  280. of streams. 
  281.  
  282.  
  283. Application.
  284.  
  285. The number allocated to this application in the APPLICATIONS param of
  286. BPQCFG.TXT. Will normally be 1 if running a BBS or similar system.
  287.  
  288. Buffer Space.
  289.  
  290. The space to be allocated for buffering messages. You can specify up to 60
  291. (Kilobytes). The program will allocate a minimum of 8k even if you specify
  292. less. The space needed will depend on your traffic, and the software you are
  293. using. I suggest you allocate as much as you can spare. If the application
  294. then runs short of memory, you will have to experiment to find the optimum
  295. value for your installation.
  296.  
  297. Interrupt Number.
  298.  
  299. The Interrupt used by the application to communicate with DEDHOST. Will be
  300. 255, unless you need to use that for some other software.
  301.  
  302.  
  303. Autotimer Flag.
  304.  
  305. Normally the driver is configured to request the switch to send a message
  306. after 11 minutes without activity on each stream. This is so that
  307. PacketCluster users may remain connected during perions of low activity. If
  308. you dont want this facility, or are not using Packetcluster, set parameter to
  309. 'N'. If you omit the parameter, or enter any other value, it will be enabled.
  310.  
  311.  
  312.         A typical command line would be DEDHOST 32 1 1 60 255 Y
  313.  
  314. Please note that DEDHOST reads BPQCFG.BIN to find what interrupt to use 
  315. to talk to the switch. BPQCFG.BIN must therefore be in the current directory
  316. when DEDHOST is loaded.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                    NOS/BPQ Link - NODEDRV4.COM
  325.  
  326.  
  327. The 'Packet Driver' I wrote to allow NOS to communicate with the switch
  328. has been modified to use the BPQ Host mode interface. One copy of the
  329. packet driver is needed for each radio port to be used by NOS, plus one
  330. for the loopback port if you want NOS to be able to talk to the switch.
  331. I dont have a lot of experience of using NOS, but I suggest that if you
  332. are using TCP/IP over NETROM that you use the lookback port, and let the
  333. switch handle all the radio links. Only if you are using IP in datagram
  334. or ax.25 virtual circuit mode will you need to give NOS direct access to
  335. the radio ports.
  336.  
  337. Please note that you need at least version 4.03 of BPQCODE.EXE
  338.  
  339. The following is an extract from my system. You will need to tailor
  340. it to your own requirements.
  341.  
  342.  
  343. If using Desqview, NODEDRV4 must be loaded in the same window as NOS -
  344. if you put it under desqview the system will probably crash. It takes
  345. three parameters, the software interrupt number used by NOS to communicate
  346. with it (in the range 60-7f hex), the BPQ Host port to use to talk to the
  347. switch (1 - 63), and the number of the radio port to be accessed.
  348.  
  349.  
  350. Please note that NODEDRV4 reads BPQCFG.BIN to find what interrupt to use 
  351. to talk to the switch. BPQCFG.BIN must therefore be in the current directory
  352. when NODEDRV4 is loaded.
  353.  
  354.  
  355. STARTNOS.BAT
  356.  
  357.  
  358. nodedrv4 0x61 33 1         I am using BPQHost ports 33-35, as I use   
  359. nodedrv4 0x62 34 2        the first 32 for a PacketCluster Node. 
  360. nodedrv4 0x63 35 3        I have given NOS access to 2 radio ports,
  361. nos                and a loopback port to the switch.
  362.  
  363.  
  364.  
  365. This is the 'attach' bit of AUTOEXEC.NET. I can't see where the parameter
  366. following the interface name is used, but the code suggests it is the
  367. maximum length of the transmit queue. The next param is the MTU.
  368.  
  369.  
  370. #
  371. attach packet 61 ax1 5 256        Radio Port 1
  372. attach packet 62 ax2 5 256        Radio Port 2
  373. attach packet 63 node 5 236        Loopback link to the switch
  374. #
  375.  
  376.  
  377. This is a new facility, and there is very little local IP activity for
  378. me to try it with. Any feedback would be most welcome, both on problems
  379. and suggestions on how best to set up the system.
  380.  
  381.  
  382.