baycom.txt 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. LINUX DRIVERS FOR BAYCOM MODEMS
  2. Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
  3. !!NEW!! (04/98) The drivers for the baycom modems have been split into
  4. separate drivers as they did not share any code, and the driver
  5. and device names have changed.
  6. This document describes the Linux Kernel Drivers for simple Baycom style
  7. amateur radio modems.
  8. The following drivers are available:
  9. baycom_ser_fdx:
  10. This driver supports the SER12 modems either full or half duplex.
  11. Its baud rate may be changed via the `baud' module parameter,
  12. therefore it supports just about every bit bang modem on a
  13. serial port. Its devices are called bcsf0 through bcsf3.
  14. This is the recommended driver for SER12 type modems,
  15. however if you have a broken UART clone that does not have working
  16. delta status bits, you may try baycom_ser_hdx.
  17. baycom_ser_hdx:
  18. This is an alternative driver for SER12 type modems.
  19. It only supports half duplex, and only 1200 baud. Its devices
  20. are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
  21. does not work with your UART.
  22. baycom_par:
  23. This driver supports the par96 and picpar modems.
  24. Its devices are called bcp0 through bcp3.
  25. baycom_epp:
  26. This driver supports the EPP modem.
  27. Its devices are called bce0 through bce3.
  28. This driver is work-in-progress.
  29. The following modems are supported:
  30. ser12: This is a very simple 1200 baud AFSK modem. The modem consists only
  31. of a modulator/demodulator chip, usually a TI TCM3105. The computer
  32. is responsible for regenerating the receiver bit clock, as well as
  33. for handling the HDLC protocol. The modem connects to a serial port,
  34. hence the name. Since the serial port is not used as an async serial
  35. port, the kernel driver for serial ports cannot be used, and this
  36. driver only supports standard serial hardware (8250, 16450, 16550)
  37. par96: This is a modem for 9600 baud FSK compatible to the G3RUH standard.
  38. The modem does all the filtering and regenerates the receiver clock.
  39. Data is transferred from and to the PC via a shift register.
  40. The shift register is filled with 16 bits and an interrupt is signalled.
  41. The PC then empties the shift register in a burst. This modem connects
  42. to the parallel port, hence the name. The modem leaves the
  43. implementation of the HDLC protocol and the scrambler polynomial to
  44. the PC.
  45. picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
  46. is protocol compatible to par96, but uses only three low power ICs
  47. and can therefore be fed from the parallel port and does not require
  48. an additional power supply. Furthermore, it incorporates a carrier
  49. detect circuitry.
  50. EPP: This is a high-speed modem adaptor that connects to an enhanced parallel port.
  51. Its target audience is users working over a high speed hub (76.8kbit/s).
  52. eppfpga: This is a redesign of the EPP adaptor.
  53. All of the above modems only support half duplex communications. However,
  54. the driver supports the KISS (see below) fullduplex command. It then simply
  55. starts to send as soon as there's a packet to transmit and does not care
  56. about DCD, i.e. it starts to send even if there's someone else on the channel.
  57. This command is required by some implementations of the DAMA channel
  58. access protocol.
  59. The Interface of the drivers
  60. Unlike previous drivers, these drivers are no longer character devices,
  61. but they are now true kernel network interfaces. Installation is therefore
  62. simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
  63. sethdlc from the ax25 utilities may be used to set driver states etc.
  64. Users of userland AX.25 stacks may use the net2kiss utility (also available
  65. in the ax25 utilities package) to convert packets of a network interface
  66. to a KISS stream on a pseudo tty. There's also a patch available from
  67. me for WAMPES which allows attaching a kernel network interface directly.
  68. Configuring the driver
  69. Every time a driver is inserted into the kernel, it has to know which
  70. modems it should access at which ports. This can be done with the setbaycom
  71. utility. If you are only using one modem, you can also configure the
  72. driver from the insmod command line (or by means of an option line in
  73. /etc/modprobe.d/*.conf).
  74. Examples:
  75. modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
  76. sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
  77. Both lines configure the first port to drive a ser12 modem at the first
  78. serial port (COM1 under DOS). The * in the mode parameter instructs the driver to use
  79. the software DCD algorithm (see below).
  80. insmod baycom_par mode="picpar" iobase=0x378
  81. sethdlc -i bcp0 -p mode "picpar" io 0x378
  82. Both lines configure the first port to drive a picpar modem at the
  83. first parallel port (LPT1 under DOS). (Note: picpar implies
  84. hardware DCD, par96 implies software DCD).
  85. The channel access parameters can be set with sethdlc -a or kissparms.
  86. Note that both utilities interpret the values slightly differently.
  87. Hardware DCD versus Software DCD
  88. To avoid collisions on the air, the driver must know when the channel is
  89. busy. This is the task of the DCD circuitry/software. The driver may either
  90. utilise a software DCD algorithm (options=1) or use a DCD signal from
  91. the hardware (options=0).
  92. ser12: if software DCD is utilised, the radio's squelch should always be
  93. open. It is highly recommended to use the software DCD algorithm,
  94. as it is much faster than most hardware squelch circuitry. The
  95. disadvantage is a slightly higher load on the system.
  96. par96: the software DCD algorithm for this type of modem is rather poor.
  97. The modem simply does not provide enough information to implement
  98. a reasonable DCD algorithm in software. Therefore, if your radio
  99. feeds the DCD input of the PAR96 modem, the use of the hardware
  100. DCD circuitry is recommended.
  101. picpar: the picpar modem features a builtin DCD hardware, which is highly
  102. recommended.
  103. Compatibility with the rest of the Linux kernel
  104. The serial driver and the baycom serial drivers compete
  105. for the same hardware resources. Of course only one driver can access a given
  106. interface at a time. The serial driver grabs all interfaces it can find at
  107. startup time. Therefore the baycom drivers subsequently won't be able to
  108. access a serial port. You might therefore find it necessary to release
  109. a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
  110. # is the number of the interface. The baycom drivers do not reserve any
  111. ports at startup, unless one is specified on the 'insmod' command line. Another
  112. method to solve the problem is to compile all drivers as modules and
  113. leave it to kmod to load the correct driver depending on the application.
  114. The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
  115. to arbitrate the ports between different client drivers.
  116. vy 73s de
  117. Tom Sailer, sailer@ife.ee.ethz.ch
  118. hb9jnx @ hb9w.ampr.org