6pack.txt 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. This is the 6pack-mini-HOWTO, written by
  2. Andreas Könsgen DG3KQ
  3. Internet: ajk@comnets.uni-bremen.de
  4. AMPR-net: dg3kq@db0pra.ampr.org
  5. AX.25: dg3kq@db0ach.#nrw.deu.eu
  6. Last update: April 7, 1998
  7. 1. What is 6pack, and what are the advantages to KISS?
  8. 6pack is a transmission protocol for data exchange between the PC and
  9. the TNC over a serial line. It can be used as an alternative to KISS.
  10. 6pack has two major advantages:
  11. - The PC is given full control over the radio
  12. channel. Special control data is exchanged between the PC and the TNC so
  13. that the PC knows at any time if the TNC is receiving data, if a TNC
  14. buffer underrun or overrun has occurred, if the PTT is
  15. set and so on. This control data is processed at a higher priority than
  16. normal data, so a data stream can be interrupted at any time to issue an
  17. important event. This helps to improve the channel access and timing
  18. algorithms as everything is computed in the PC. It would even be possible
  19. to experiment with something completely different from the known CSMA and
  20. DAMA channel access methods.
  21. This kind of real-time control is especially important to supply several
  22. TNCs that are connected between each other and the PC by a daisy chain
  23. (however, this feature is not supported yet by the Linux 6pack driver).
  24. - Each packet transferred over the serial line is supplied with a checksum,
  25. so it is easy to detect errors due to problems on the serial line.
  26. Received packets that are corrupt are not passed on to the AX.25 layer.
  27. Damaged packets that the TNC has received from the PC are not transmitted.
  28. More details about 6pack are described in the file 6pack.ps that is located
  29. in the doc directory of the AX.25 utilities package.
  30. 2. Who has developed the 6pack protocol?
  31. The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech
  32. DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and
  33. Matthias Welwarsky DG2FEF, comes along with the PC version of FlexNet.
  34. They have also written a firmware for TNCs to perform the 6pack
  35. protocol (see section 4 below).
  36. 3. Where can I get the latest version of 6pack for LinuX?
  37. At the moment, the 6pack stuff can obtained via anonymous ftp from
  38. db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq,
  39. there is a file named 6pack.tgz.
  40. 4. Preparing the TNC for 6pack operation
  41. To be able to use 6pack, a special firmware for the TNC is needed. The EPROM
  42. of a newly bought TNC does not contain 6pack, so you will have to
  43. program an EPROM yourself. The image file for 6pack EPROMs should be
  44. available on any packet radio box where PC/FlexNet can be found. The name of
  45. the file is 6pack.bin. This file is copyrighted and maintained by the FlexNet
  46. team. It can be used under the terms of the license that comes along
  47. with PC/FlexNet. Please do not ask me about the internals of this file as I
  48. don't know anything about it. I used a textual description of the 6pack
  49. protocol to program the Linux driver.
  50. TNCs contain a 64kByte EPROM, the lower half of which is used for
  51. the firmware/KISS. The upper half is either empty or is sometimes
  52. programmed with software called TAPR. In the latter case, the TNC
  53. is supplied with a DIP switch so you can easily change between the
  54. two systems. When programming a new EPROM, one of the systems is replaced
  55. by 6pack. It is useful to replace TAPR, as this software is rarely used
  56. nowadays. If your TNC is not equipped with the switch mentioned above, you
  57. can build in one yourself that switches over the highest address pin
  58. of the EPROM between HIGH and LOW level. After having inserted the new EPROM
  59. and switched to 6pack, apply power to the TNC for a first test. The connect
  60. and the status LED are lit for about a second if the firmware initialises
  61. the TNC correctly.
  62. 5. Building and installing the 6pack driver
  63. The driver has been tested with kernel version 2.1.90. Use with older
  64. kernels may lead to a compilation error because the interface to a kernel
  65. function has been changed in the 2.1.8x kernels.
  66. How to turn on 6pack support:
  67. - In the linux kernel configuration program, select the code maturity level
  68. options menu and turn on the prompting for development drivers.
  69. - Select the amateur radio support menu and turn on the serial port 6pack
  70. driver.
  71. - Compile and install the kernel and the modules.
  72. To use the driver, the kissattach program delivered with the AX.25 utilities
  73. has to be modified.
  74. - Do a cd to the directory that holds the kissattach sources. Edit the
  75. kissattach.c file. At the top, insert the following lines:
  76. #ifndef N_6PACK
  77. #define N_6PACK (N_AX25+1)
  78. #endif
  79. Then find the line
  80. int disc = N_AX25;
  81. and replace N_AX25 by N_6PACK.
  82. - Recompile kissattach. Rename it to spattach to avoid confusions.
  83. Installing the driver:
  84. - Do an insmod 6pack. Look at your /var/log/messages file to check if the
  85. module has printed its initialization message.
  86. - Do a spattach as you would launch kissattach when starting a KISS port.
  87. Check if the kernel prints the message '6pack: TNC found'.
  88. - From here, everything should work as if you were setting up a KISS port.
  89. The only difference is that the network device that represents
  90. the 6pack port is called sp instead of sl or ax. So, sp0 would be the
  91. first 6pack port.
  92. Although the driver has been tested on various platforms, I still declare it
  93. ALPHA. BE CAREFUL! Sync your disks before insmoding the 6pack module
  94. and spattaching. Watch out if your computer behaves strangely. Read section
  95. 6 of this file about known problems.
  96. Note that the connect and status LEDs of the TNC are controlled in a
  97. different way than they are when the TNC is used with PC/FlexNet. When using
  98. FlexNet, the connect LED is on if there is a connection; the status LED is
  99. on if there is data in the buffer of the PC's AX.25 engine that has to be
  100. transmitted. Under Linux, the 6pack layer is beyond the AX.25 layer,
  101. so the 6pack driver doesn't know anything about connects or data that
  102. has not yet been transmitted. Therefore the LEDs are controlled
  103. as they are in KISS mode: The connect LED is turned on if data is transferred
  104. from the PC to the TNC over the serial line, the status LED if data is
  105. sent to the PC.
  106. 6. Known problems
  107. When testing the driver with 2.0.3x kernels and
  108. operating with data rates on the radio channel of 9600 Baud or higher,
  109. the driver may, on certain systems, sometimes print the message '6pack:
  110. bad checksum', which is due to data loss if the other station sends two
  111. or more subsequent packets. I have been told that this is due to a problem
  112. with the serial driver of 2.0.3x kernels. I don't know yet if the problem
  113. still exists with 2.1.x kernels, as I have heard that the serial driver
  114. code has been changed with 2.1.x.
  115. When shutting down the sp interface with ifconfig, the kernel crashes if
  116. there is still an AX.25 connection left over which an IP connection was
  117. running, even if that IP connection is already closed. The problem does not
  118. occur when there is a bare AX.25 connection still running. I don't know if
  119. this is a problem of the 6pack driver or something else in the kernel.
  120. The driver has been tested as a module, not yet as a kernel-builtin driver.
  121. The 6pack protocol supports daisy-chaining of TNCs in a token ring, which is
  122. connected to one serial port of the PC. This feature is not implemented
  123. and at least at the moment I won't be able to do it because I do not have
  124. the opportunity to build a TNC daisy-chain and test it.
  125. Some of the comments in the source code are inaccurate. They are left from
  126. the SLIP/KISS driver, from which the 6pack driver has been derived.
  127. I haven't modified or removed them yet -- sorry! The code itself needs
  128. some cleaning and optimizing. This will be done in a later release.
  129. If you encounter a bug or if you have a question or suggestion concerning the
  130. driver, feel free to mail me, using the addresses given at the beginning of
  131. this file.
  132. Have fun!
  133. Andreas