1*a434aabaSMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0 2*a434aabaSMauro Carvalho Chehab 3*a434aabaSMauro Carvalho Chehab============== 4*a434aabaSMauro Carvalho Chehab6pack Protocol 5*a434aabaSMauro Carvalho Chehab============== 6*a434aabaSMauro Carvalho Chehab 7*a434aabaSMauro Carvalho ChehabThis is the 6pack-mini-HOWTO, written by 8*a434aabaSMauro Carvalho Chehab 9*a434aabaSMauro Carvalho ChehabAndreas Könsgen DG3KQ 10*a434aabaSMauro Carvalho Chehab 11*a434aabaSMauro Carvalho Chehab:Internet: ajk@comnets.uni-bremen.de 12*a434aabaSMauro Carvalho Chehab:AMPR-net: dg3kq@db0pra.ampr.org 13*a434aabaSMauro Carvalho Chehab:AX.25: dg3kq@db0ach.#nrw.deu.eu 14*a434aabaSMauro Carvalho Chehab 15*a434aabaSMauro Carvalho ChehabLast update: April 7, 1998 16*a434aabaSMauro Carvalho Chehab 17*a434aabaSMauro Carvalho Chehab1. What is 6pack, and what are the advantages to KISS? 18*a434aabaSMauro Carvalho Chehab====================================================== 19*a434aabaSMauro Carvalho Chehab 20*a434aabaSMauro Carvalho Chehab6pack is a transmission protocol for data exchange between the PC and 21*a434aabaSMauro Carvalho Chehabthe TNC over a serial line. It can be used as an alternative to KISS. 22*a434aabaSMauro Carvalho Chehab 23*a434aabaSMauro Carvalho Chehab6pack has two major advantages: 24*a434aabaSMauro Carvalho Chehab 25*a434aabaSMauro Carvalho Chehab- The PC is given full control over the radio 26*a434aabaSMauro Carvalho Chehab channel. Special control data is exchanged between the PC and the TNC so 27*a434aabaSMauro Carvalho Chehab that the PC knows at any time if the TNC is receiving data, if a TNC 28*a434aabaSMauro Carvalho Chehab buffer underrun or overrun has occurred, if the PTT is 29*a434aabaSMauro Carvalho Chehab set and so on. This control data is processed at a higher priority than 30*a434aabaSMauro Carvalho Chehab normal data, so a data stream can be interrupted at any time to issue an 31*a434aabaSMauro Carvalho Chehab important event. This helps to improve the channel access and timing 32*a434aabaSMauro Carvalho Chehab algorithms as everything is computed in the PC. It would even be possible 33*a434aabaSMauro Carvalho Chehab to experiment with something completely different from the known CSMA and 34*a434aabaSMauro Carvalho Chehab DAMA channel access methods. 35*a434aabaSMauro Carvalho Chehab This kind of real-time control is especially important to supply several 36*a434aabaSMauro Carvalho Chehab TNCs that are connected between each other and the PC by a daisy chain 37*a434aabaSMauro Carvalho Chehab (however, this feature is not supported yet by the Linux 6pack driver). 38*a434aabaSMauro Carvalho Chehab 39*a434aabaSMauro Carvalho Chehab- Each packet transferred over the serial line is supplied with a checksum, 40*a434aabaSMauro Carvalho Chehab so it is easy to detect errors due to problems on the serial line. 41*a434aabaSMauro Carvalho Chehab Received packets that are corrupt are not passed on to the AX.25 layer. 42*a434aabaSMauro Carvalho Chehab Damaged packets that the TNC has received from the PC are not transmitted. 43*a434aabaSMauro Carvalho Chehab 44*a434aabaSMauro Carvalho ChehabMore details about 6pack are described in the file 6pack.ps that is located 45*a434aabaSMauro Carvalho Chehabin the doc directory of the AX.25 utilities package. 46*a434aabaSMauro Carvalho Chehab 47*a434aabaSMauro Carvalho Chehab2. Who has developed the 6pack protocol? 48*a434aabaSMauro Carvalho Chehab======================================== 49*a434aabaSMauro Carvalho Chehab 50*a434aabaSMauro Carvalho ChehabThe 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech 51*a434aabaSMauro Carvalho ChehabDF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and 52*a434aabaSMauro Carvalho ChehabMatthias Welwarsky DG2FEF, comes along with the PC version of FlexNet. 53*a434aabaSMauro Carvalho ChehabThey have also written a firmware for TNCs to perform the 6pack 54*a434aabaSMauro Carvalho Chehabprotocol (see section 4 below). 55*a434aabaSMauro Carvalho Chehab 56*a434aabaSMauro Carvalho Chehab3. Where can I get the latest version of 6pack for LinuX? 57*a434aabaSMauro Carvalho Chehab========================================================= 58*a434aabaSMauro Carvalho Chehab 59*a434aabaSMauro Carvalho ChehabAt the moment, the 6pack stuff can obtained via anonymous ftp from 60*a434aabaSMauro Carvalho Chehabdb0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq, 61*a434aabaSMauro Carvalho Chehabthere is a file named 6pack.tgz. 62*a434aabaSMauro Carvalho Chehab 63*a434aabaSMauro Carvalho Chehab4. Preparing the TNC for 6pack operation 64*a434aabaSMauro Carvalho Chehab======================================== 65*a434aabaSMauro Carvalho Chehab 66*a434aabaSMauro Carvalho ChehabTo be able to use 6pack, a special firmware for the TNC is needed. The EPROM 67*a434aabaSMauro Carvalho Chehabof a newly bought TNC does not contain 6pack, so you will have to 68*a434aabaSMauro Carvalho Chehabprogram an EPROM yourself. The image file for 6pack EPROMs should be 69*a434aabaSMauro Carvalho Chehabavailable on any packet radio box where PC/FlexNet can be found. The name of 70*a434aabaSMauro Carvalho Chehabthe file is 6pack.bin. This file is copyrighted and maintained by the FlexNet 71*a434aabaSMauro Carvalho Chehabteam. It can be used under the terms of the license that comes along 72*a434aabaSMauro Carvalho Chehabwith PC/FlexNet. Please do not ask me about the internals of this file as I 73*a434aabaSMauro Carvalho Chehabdon't know anything about it. I used a textual description of the 6pack 74*a434aabaSMauro Carvalho Chehabprotocol to program the Linux driver. 75*a434aabaSMauro Carvalho Chehab 76*a434aabaSMauro Carvalho ChehabTNCs contain a 64kByte EPROM, the lower half of which is used for 77*a434aabaSMauro Carvalho Chehabthe firmware/KISS. The upper half is either empty or is sometimes 78*a434aabaSMauro Carvalho Chehabprogrammed with software called TAPR. In the latter case, the TNC 79*a434aabaSMauro Carvalho Chehabis supplied with a DIP switch so you can easily change between the 80*a434aabaSMauro Carvalho Chehabtwo systems. When programming a new EPROM, one of the systems is replaced 81*a434aabaSMauro Carvalho Chehabby 6pack. It is useful to replace TAPR, as this software is rarely used 82*a434aabaSMauro Carvalho Chehabnowadays. If your TNC is not equipped with the switch mentioned above, you 83*a434aabaSMauro Carvalho Chehabcan build in one yourself that switches over the highest address pin 84*a434aabaSMauro Carvalho Chehabof the EPROM between HIGH and LOW level. After having inserted the new EPROM 85*a434aabaSMauro Carvalho Chehaband switched to 6pack, apply power to the TNC for a first test. The connect 86*a434aabaSMauro Carvalho Chehaband the status LED are lit for about a second if the firmware initialises 87*a434aabaSMauro Carvalho Chehabthe TNC correctly. 88*a434aabaSMauro Carvalho Chehab 89*a434aabaSMauro Carvalho Chehab5. Building and installing the 6pack driver 90*a434aabaSMauro Carvalho Chehab=========================================== 91*a434aabaSMauro Carvalho Chehab 92*a434aabaSMauro Carvalho ChehabThe driver has been tested with kernel version 2.1.90. Use with older 93*a434aabaSMauro Carvalho Chehabkernels may lead to a compilation error because the interface to a kernel 94*a434aabaSMauro Carvalho Chehabfunction has been changed in the 2.1.8x kernels. 95*a434aabaSMauro Carvalho Chehab 96*a434aabaSMauro Carvalho ChehabHow to turn on 6pack support: 97*a434aabaSMauro Carvalho Chehab============================= 98*a434aabaSMauro Carvalho Chehab 99*a434aabaSMauro Carvalho Chehab- In the linux kernel configuration program, select the code maturity level 100*a434aabaSMauro Carvalho Chehab options menu and turn on the prompting for development drivers. 101*a434aabaSMauro Carvalho Chehab 102*a434aabaSMauro Carvalho Chehab- Select the amateur radio support menu and turn on the serial port 6pack 103*a434aabaSMauro Carvalho Chehab driver. 104*a434aabaSMauro Carvalho Chehab 105*a434aabaSMauro Carvalho Chehab- Compile and install the kernel and the modules. 106*a434aabaSMauro Carvalho Chehab 107*a434aabaSMauro Carvalho ChehabTo use the driver, the kissattach program delivered with the AX.25 utilities 108*a434aabaSMauro Carvalho Chehabhas to be modified. 109*a434aabaSMauro Carvalho Chehab 110*a434aabaSMauro Carvalho Chehab- Do a cd to the directory that holds the kissattach sources. Edit the 111*a434aabaSMauro Carvalho Chehab kissattach.c file. At the top, insert the following lines:: 112*a434aabaSMauro Carvalho Chehab 113*a434aabaSMauro Carvalho Chehab #ifndef N_6PACK 114*a434aabaSMauro Carvalho Chehab #define N_6PACK (N_AX25+1) 115*a434aabaSMauro Carvalho Chehab #endif 116*a434aabaSMauro Carvalho Chehab 117*a434aabaSMauro Carvalho Chehab Then find the line: 118*a434aabaSMauro Carvalho Chehab 119*a434aabaSMauro Carvalho Chehab int disc = N_AX25; 120*a434aabaSMauro Carvalho Chehab 121*a434aabaSMauro Carvalho Chehab and replace N_AX25 by N_6PACK. 122*a434aabaSMauro Carvalho Chehab 123*a434aabaSMauro Carvalho Chehab- Recompile kissattach. Rename it to spattach to avoid confusions. 124*a434aabaSMauro Carvalho Chehab 125*a434aabaSMauro Carvalho ChehabInstalling the driver: 126*a434aabaSMauro Carvalho Chehab---------------------- 127*a434aabaSMauro Carvalho Chehab 128*a434aabaSMauro Carvalho Chehab- Do an insmod 6pack. Look at your /var/log/messages file to check if the 129*a434aabaSMauro Carvalho Chehab module has printed its initialization message. 130*a434aabaSMauro Carvalho Chehab 131*a434aabaSMauro Carvalho Chehab- Do a spattach as you would launch kissattach when starting a KISS port. 132*a434aabaSMauro Carvalho Chehab Check if the kernel prints the message '6pack: TNC found'. 133*a434aabaSMauro Carvalho Chehab 134*a434aabaSMauro Carvalho Chehab- From here, everything should work as if you were setting up a KISS port. 135*a434aabaSMauro Carvalho Chehab The only difference is that the network device that represents 136*a434aabaSMauro Carvalho Chehab the 6pack port is called sp instead of sl or ax. So, sp0 would be the 137*a434aabaSMauro Carvalho Chehab first 6pack port. 138*a434aabaSMauro Carvalho Chehab 139*a434aabaSMauro Carvalho ChehabAlthough the driver has been tested on various platforms, I still declare it 140*a434aabaSMauro Carvalho ChehabALPHA. BE CAREFUL! Sync your disks before insmoding the 6pack module 141*a434aabaSMauro Carvalho Chehaband spattaching. Watch out if your computer behaves strangely. Read section 142*a434aabaSMauro Carvalho Chehab6 of this file about known problems. 143*a434aabaSMauro Carvalho Chehab 144*a434aabaSMauro Carvalho ChehabNote that the connect and status LEDs of the TNC are controlled in a 145*a434aabaSMauro Carvalho Chehabdifferent way than they are when the TNC is used with PC/FlexNet. When using 146*a434aabaSMauro Carvalho ChehabFlexNet, the connect LED is on if there is a connection; the status LED is 147*a434aabaSMauro Carvalho Chehabon if there is data in the buffer of the PC's AX.25 engine that has to be 148*a434aabaSMauro Carvalho Chehabtransmitted. Under Linux, the 6pack layer is beyond the AX.25 layer, 149*a434aabaSMauro Carvalho Chehabso the 6pack driver doesn't know anything about connects or data that 150*a434aabaSMauro Carvalho Chehabhas not yet been transmitted. Therefore the LEDs are controlled 151*a434aabaSMauro Carvalho Chehabas they are in KISS mode: The connect LED is turned on if data is transferred 152*a434aabaSMauro Carvalho Chehabfrom the PC to the TNC over the serial line, the status LED if data is 153*a434aabaSMauro Carvalho Chehabsent to the PC. 154*a434aabaSMauro Carvalho Chehab 155*a434aabaSMauro Carvalho Chehab6. Known problems 156*a434aabaSMauro Carvalho Chehab================= 157*a434aabaSMauro Carvalho Chehab 158*a434aabaSMauro Carvalho ChehabWhen testing the driver with 2.0.3x kernels and 159*a434aabaSMauro Carvalho Chehaboperating with data rates on the radio channel of 9600 Baud or higher, 160*a434aabaSMauro Carvalho Chehabthe driver may, on certain systems, sometimes print the message '6pack: 161*a434aabaSMauro Carvalho Chehabbad checksum', which is due to data loss if the other station sends two 162*a434aabaSMauro Carvalho Chehabor more subsequent packets. I have been told that this is due to a problem 163*a434aabaSMauro Carvalho Chehabwith the serial driver of 2.0.3x kernels. I don't know yet if the problem 164*a434aabaSMauro Carvalho Chehabstill exists with 2.1.x kernels, as I have heard that the serial driver 165*a434aabaSMauro Carvalho Chehabcode has been changed with 2.1.x. 166*a434aabaSMauro Carvalho Chehab 167*a434aabaSMauro Carvalho ChehabWhen shutting down the sp interface with ifconfig, the kernel crashes if 168*a434aabaSMauro Carvalho Chehabthere is still an AX.25 connection left over which an IP connection was 169*a434aabaSMauro Carvalho Chehabrunning, even if that IP connection is already closed. The problem does not 170*a434aabaSMauro Carvalho Chehaboccur when there is a bare AX.25 connection still running. I don't know if 171*a434aabaSMauro Carvalho Chehabthis is a problem of the 6pack driver or something else in the kernel. 172*a434aabaSMauro Carvalho Chehab 173*a434aabaSMauro Carvalho ChehabThe driver has been tested as a module, not yet as a kernel-builtin driver. 174*a434aabaSMauro Carvalho Chehab 175*a434aabaSMauro Carvalho ChehabThe 6pack protocol supports daisy-chaining of TNCs in a token ring, which is 176*a434aabaSMauro Carvalho Chehabconnected to one serial port of the PC. This feature is not implemented 177*a434aabaSMauro Carvalho Chehaband at least at the moment I won't be able to do it because I do not have 178*a434aabaSMauro Carvalho Chehabthe opportunity to build a TNC daisy-chain and test it. 179*a434aabaSMauro Carvalho Chehab 180*a434aabaSMauro Carvalho ChehabSome of the comments in the source code are inaccurate. They are left from 181*a434aabaSMauro Carvalho Chehabthe SLIP/KISS driver, from which the 6pack driver has been derived. 182*a434aabaSMauro Carvalho ChehabI haven't modified or removed them yet -- sorry! The code itself needs 183*a434aabaSMauro Carvalho Chehabsome cleaning and optimizing. This will be done in a later release. 184*a434aabaSMauro Carvalho Chehab 185*a434aabaSMauro Carvalho ChehabIf you encounter a bug or if you have a question or suggestion concerning the 186*a434aabaSMauro Carvalho Chehabdriver, feel free to mail me, using the addresses given at the beginning of 187*a434aabaSMauro Carvalho Chehabthis file. 188*a434aabaSMauro Carvalho Chehab 189*a434aabaSMauro Carvalho ChehabHave fun! 190*a434aabaSMauro Carvalho Chehab 191*a434aabaSMauro Carvalho ChehabAndreas 192