Linux Amateur Radio AX.25 HOWTOPrevNext

Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 
6. Configuring an AX.25 port

Each of the AX.25 applications read a particular configuration file to obtainthe parameters for the various AX.25 ports configured on your Linux machine.For AX.25 ports the file that is read is the /etc/ax25/axports file.You must have an entry in this file for each AX.25 port you want on yoursystem.

6.1. Creating the AX.25 network device

The network device is what is listed when you use the `ifconfig'command. This is the object that the Linux kernel sends and receives networkdata from. Nearly always the network device has a physical port associatedwith it, but there are occasions where this isn't necessary. The networkdevice does relate directly to a device driver.

In the Linux AX.25 code there are a number of device drivers. The most commonis probably the KISS driver, but others are the SCC driver(s), the Baycomdriver and the Soundmodem driver.

Each of these device drivers will create a network device when it is started.

6.1.1. Creating a KISS device

Kernel Compile Options:Amateur Radio support ---> [*] Amateur Radio support --- Packet Radio protocols <*> Amateur Radio AX.25 Level 2 protocol ... AX.25 network device drivers ---> --- AX.25 network device drivers <*> Serial port KISS driver ...

Probably the most common configuration will be for a KISS TNC on aserial port. You will need to have the TNC preconfigured andconnected to your serial port. You can use a communications programlike minicom or seyon toconfigure the TNC into kiss mode.

To create a KISS device you use the kissattachprogram. In it simplest form you can use thekissattach program as follows:

# /usr/sbin/kissattach /dev/ttyS0 radio 44.135.96.242# kissparms -p radio -t 100 -s 100 -r 25

The kissattach command will create a KISS networkdevice. These devices are called `ax[0-9]'. Thefirst time you use the kissattach command itcreates `ax0', the second time it creates`ax1' etc. Each KISS device has an associatedserial port.

The kissparms command allows you to set variousKISS parameters on a KISS device.

Specifically the example presented would create a KISS network deviceusing the serial device `/dev/ttyS0' and the entryfrom the /etc/ax25/axports with a port name of`radio'. It then configures it with atxdelay and slottime of 100milliseconds and a ppersist value of 25.

Please refer to the man pages for more information.

6.1.1.1. Configuring for Dual Port TNC's

The mkiss utility included in the ax25-utilsdistribution allows you to make use of both modems on a dual portTNC. Configuration is fairly simple. It works by taking a singleserial device connected to a single multiport TNC and making it looklike a number of devices each connected to a single port TNC. You dothis before you do any of the AX.25configuration. The devices that you then do the AX.25 configuration onare pseudo-TTY interfaces, (/dev/ttyq*), and notthe actual serial device. Pseudo-TTY devices create a kind of pipethrough which programs designed to talk to tty devices can talk toother programs designed to talk to tty devices. Each pipe has a masterand a slave end. The master end is generally called`/dev/ptyq*' and the slave ends are called`/dev/ttyq*'. There is a one to one relationshipbetween masters and slaves, so /dev/ptyq0 is themaster end of a pipe with /dev/ttyq0 as itsslave. You must open the master end of a pipe before opening the slaveend. mkiss exploits this mechanism to split asingle serial device into separate devices.

Example: if you have a dual port TNC and it is connected to your/dev/ttyS0 serial device at 9600 bps, the command:

# /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1# /usr/sbin/kissattach /dev/ttyq0 port1 44.135.96.242# /usr/sbin/kissattach /dev/ttyq1 port2 44.135.96.242

would create two pseudo-tty devices that each look like a normalsingle port TNC. You would then treat /dev/ttyq0and /dev/ttyq1 just as you would a conventionalserial device with TNC connected. This means you'd then use thekissattach command as described above, on each ofthose, in the example for AX.25 ports called port1and port2. You shouldn't usekissattach on the actual serial device as themkiss program uses it.

The mkiss command has a number of optionalarguments that you may wish to use. They are summarized as follows:

-c

enables the addition of a one byte checksum to each KISS frame.This is not supported by most KISS implementations, it is supported by theG8BPG KISS ROM.

-s <speed>

sets the speed of the serial port.

-h

enables hardware handshaking on the serial port, it is off bydefault. Most KISS implementation do not support this, but some do.

-l

enables logging of information to the syslog log file.

6.1.2. Creating a 6PACK device

Kernel Compile Options:Amateur Radio support ---> [*] Amateur Radio support --- Packet Radio protocols <*> Amateur Radio AX.25 Level 2 protocol ... AX.25 network device drivers ---> --- AX.25 network device drivers ... <*> Serial port 6PACK driver ...

6PACK is a protocol that is supported by some TNCs as an alternativeto KISS. It is used in a similar fashion to the KISS driver, using theslattach command instead of kissattach.

A mini HOWTO on the 6PACK driver is included in the kernel source codeas the file/usr/src/linux/Documentation/networking/6pack.txt.

6.1.3. Creating a Baycom device

Kernel Compile Options:Amateur Radio support ---> [*] Amateur Radio support --- Packet Radio protocols <*> Amateur Radio AX.25 Level 2 protocol ... AX.25 network device drivers ---> --- AX.25 network device drivers ... <?> BAYCOM ser12 fullduplex driver for AX.25 <?> BAYCOM ser12 halfduplex driver for AX.25 <?> BAYCOM picpar and par96 driver for AX.25 <?> BAYCOM epp driver for AX.25 ...

Thomas Sailer,despite the popularly held belief that it would not work very well,has developed Linux support for Baycom modems. His driver supports theSer12 serial port, Par96 and theenhanced PicPar parallel port modems. Furtherinformation about the modems themselves may be obtained from theBaycom Web site.

Your first step should be to determine the i/o and addresses of theserial or parallel port(s) you have Baycom modem(s) connected to.When you have these you must configure the Baycom driver with them.

The Baycom driver creates network devices called:bc0, bc1, bc2etc. when it is configured.

The sethdlc utility allows you to configure thedriver with these parameters, or, if you have only one Baycom modeminstalled you may specify the parameters on theinsmod command line when you load the Baycommodule.

For example, a simple configuration.Disable the serial driver for COM1: then configure the Baycom driver for aSer12 serial port modem on COM1: with the software DCD option enabled:

# setserial /dev/ttyS0 uart none# insmod hdlcdrv# insmod baycom mode="ser12*" iobase=0x3f8 irq=4

Par96 parallel port type modem on LPT1: using hardware DCD detection:

# insmod hdlcdrv# insmod baycom mode="par96" iobase=0x378 irq=7 options=0

This is not really the preferred way to do it. The sethdlc utilityworks just as easily with one device as with many.

The sethdlc man page has thefull details, but a couple of examples will illustrate the mostimportant aspects of this configuration. The following examples assumeyou have already loaded the Baycom module using:

# insmod hdlcdrv# insmod baycom

or that you compiled the kernel with the driver inbuilt.

Configure the bc0 device driver as a Parallel port Baycom modem on LPT1:with software DCD:

# sethdlc -p -i bc0 mode par96 io 0x378 irq 7

Configure the bc1 device driver as a Serial port Baycom modem on COM1:

# sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4

6.1.4. Configuring the AX.25 channel access parameters

The AX.25 channel access parameters are the equivalent of the KISS ppersist,txdelay and slottime type parameters. Again you use the sethdlc utilityfor this.

Again the sethdlc man page is the source of the most complete informationbut another example of two won't hurt:

Configure the bc0 device with TxDelay of 200 mS, SlotTime of 100 mS,PPersist of 40 and half duplex:

# sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half

Note that the timing values are in milliseconds.

6.1.4.1. Configuring the Kernel AX.25 to use the Baycom device

The Baycom driver creates standard network devices that the AX.25Kernel code can use. Configuration is much the same as that for a PIor PacketTwin card.

The first step is to configure the device with an AX.25 callsign. Theifconfig utility may be used to perform this.

# /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up

will assign the Baycom device bc0 the AX.25callsign VK2KTJ-15. Alternatively you can use theaxparms command, you'll still need to use theifconfig command to bring the device up though:

# ifconfig bc0 up# axparms -setcall bc0 vk2ktj-15

The next step is to create an entry in the /etc/ax25/axports fileas you would for any other device. The entry in the axports file isassociated with the network device you've configured by the callsign youconfigure. The entry in the axports file that has the callsign thatyou configured the Baycom device with is the one that will be used torefer to it.

You may then treat the new AX.25 device as you would any other. You canconfigure it for TCP/IP, add it to ax25d and run NET/ROM or ROSE over itas you please.

6.1.5. Creating a kernel Soundmodem device

Kernel Compile Options:Amateur Radio support ---> [*] Amateur Radio support --- Packet Radio protocols <*> Amateur Radio AX.25 Level 2 protocol ... AX.25 network device drivers ---> --- AX.25 network device drivers ... <*> Soundcard modem driver [?] soundmodem support for Soundblaster and compatible cards [?] soundmodem support for WSS and Crystal cards [?] soundmodem support for 1200 baud AFSK modulation [?] soundmodem support for 2400 baud AFSK modulation (7.3728MHz crystal) [?] soundmodem support for 2400 baud AFSK modulation (8MHz crystal) [?] soundmodem support for 2666 baud AFSK modulation [?] soundmodem support for 4800 baud HAPN-1 modulation [?] soundmodem support for 4800 baud PSK modulation [?] soundmodem support for 9600 baud FSK G3RUH modulation ...

Thomas Sailer has built a driver for the kernel that allows you touse your soundcard as a modem. Connect your radio directly to yoursoundcard to play packet! Thomas recommends at least a 486DX2/66 if youwant to use this software as all of the digital signal processing is doneby the main CPU.

The driver currently emulates 1200 bps AFSK, 4800 HAPN and 9600 FSK (G3RUHcompatible) modem types. The only sound cards currently supported areSoundBlaster and Windows Sound System Compatible models. If you have a soundcard of another type, you can try the user-mode soundmodem described laterin this document.

The sound cards require some circuitry to help them drive thePush-To-Talk circuitry, and information on this is available fromThomas'sSoundmodem PTT circuit web page. There are quite a fewpossible options, they are: detect the sound output from thesoundcard, or use output from a parallel port, serial port or MIDIport. Circuit examples for each of these are on Thomas's site.

The Soundmodem driver creates network devices called:sm0, sm1, sm2 etc when it is configured.

The Soundmodem driver competes for the same resources as the Linuxsound driver, so if you wish to use the Soundmodem driver you mustensure that the Linux sound driver is not installed. You can, ofcourse, compile them both as modules and insert and remove them as youwish.

6.1.5.1. Configuring the sound card

The Soundmodem driver does not initialize the sound card. The ax25-utilspackage includes a utility to do this called `setcrystal' that maybe used for sound cards based on the Crystal chip set. If you have some othercard then you will have to use some other software to initialize it.Its syntax is fairly straightforward:

setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c dma2]

So, for example, if you wished to configure a SoundBlaster card at i/obase address 0x388, irq 10 and DMA 1 you would use:

# setcrystal -s 0x388 -i 10 -d 1

To configure a Window Sound System card at i/o base address 0x534, irq 5, DMA 3you would use:

# setcrystal -w 0x534 -i 5 -d 3

The [-f synthio] parameter is the set the synthesizer address, and the[-c dma2] parameter is to set the second DMA channel to allow full duplexoperation.

6.1.5.2. Configuring the Soundmodem driver

When you have configured the soundcard you need to configure the drivertelling it where the sound card is located and what sort of modem you wishit to emulate.

The sethdlc utility allows you to configure the driver with theseparameters, or, if you have only one soundcard installed you may specifythe parameters on the insmod command line when you load theSoundmodem module.

For example, a simple configuration, with one SoundBlaster soundcardconfigured as described above emulating a 1200 bps modem:

# insmod hdlcdrv# insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1

This is not really the preferred way to do it. The sethdlc utilityworks just as easily with one device as with many.

The sethdlc man page has the full details, but a couple of exampleswill illustrate the most important aspects of this configuration. Thefollowing examples assume you have already loaded the Soundmodem modulesusing:

# insmod hdlcdrv# insmod soundmodem

or that you compiled the kernel with the driver inbuilt.

Configure the driver to support the Windows Sound System card we configuredabove to emulate a G3RUH 9600 compatible modem as device sm0 using aparallel port at 0x378 to key the Push-To-Talk:

# sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378

Configure the driver to support the SoundBlaster card we configured aboveto emulate a 4800 bps HAPN modem as device sm1 using the serial portlocated at 0x2f8 to key the Push-To-Talk:

# sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio 0x2f8

Configure the driver to support the SoundBlaster card we configured aboveto emulate a 1200 bps AFSK modem as device sm1 using the serial portlocated at 0x2f8 to key the Push-To-Talk:

# sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8

6.1.5.3. Configuring the AX.25 channel access parameters

The AX.25 channel access parameters are the equivalent of the KISS ppersist,txdelay and slottime type parameters. You use the sethdlc utility forthis as well.

Again the sethdlc man page is the source of the most complete informationbut another example of two won't hurt:

Configure the sm0 device with TxDelay of 100 mS, SlotTime of 50mS,PPersist of 128 and full duplex:

# sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full

Note that the timing values are in milliseconds.

6.1.5.4. Setting the audio levels and tuning the driver

It is very important that the audio levels be set correctly for any radiobased modem to work. This is equally true of the Soundmodem.Thomas has developed some utility programs that make this task easier.They are called smdiag and smmixer.

smdiag

provides two types of display, either an oscilloscopetype display or an eye pattern type display.

smmixer

allows you to actually adjust the transmit andreceive audio levels.

To start the smdiag utility in 'eye' mode for the Soundmodem devicesm0 you would use:

# smdiag -i sm0 -e

To start the smmixer utility for the Soundmodemdevice sm0 you would use:

# smmixer -i sm0

6.1.5.5. Configuring the Kernel AX.25 to use the Soundmodem

The Soundmodem driver creates standard network devices that the AX.25Kernel code can use. Configuration is much the same as that for a PIor PacketTwin card.

The first step is to configure the device with an AX.25 callsign.The ifconfig utility may be used to perform this.

# /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up

will assign the Soundmodem device sm0 the AX.25callsign VK2KTJ-15. Alternatively you can use theaxparms command, but you still need theifconfig utility to bring the device up:

# ifconfig sm0 up# axparms -setcall sm0 vk2ktj-15

The next step is to create an entry in the /etc/ax25/axports fileas you would for any other device. The entry in the axports file isassociated with the network device you've configured by the callsign youconfigure. The entry in the axports file that has the callsign thatyou configured the Soundmodem device with is the one that will be used torefer to it.

You may then treat the new AX.25 device as you would any other. You canconfigure it for TCP/IP, add it to ax25d and run NET/ROM or ROSE over itas you please.

6.1.6. Creating a user-mode Soundmodem device

Kernel Compile Options: not applicable

Thomas Sailer has written a sound modem driver that runs in user-modeusing the kernel sound drivers, so it should work with any sound cardsupported under Linux.

The driver is implemented as the user-mode programsoundmodem. The graphicalsoundmodemconfig program allows configuring andtesting the soundmodem driver. As well as kernel sound support youneed the kernel AX.25 mkiss driver.

The software and documentation can be downloaded fromhttp://www.baycom.org/~tom/ham/soundmodem.

6.1.7. Creating a YAM device

Kernel Compile Options:Amateur Radio support ---> [*] Amateur Radio support --- Packet Radio protocols <*> Amateur Radio AX.25 Level 2 protocol ... AX.25 network device drivers ---> --- AX.25 network device drivers ... <?> YAM driver for AX.25 ...

YAM is Yet Another Modem, a 9600 baud modem designed by Nico Palermo.Information on the Linux driver can be found athttp://www.teaser.fr/~frible/yam.htmlwhile general information on the modem can be found athttp://www.microlet.com/yam/

6.1.8. Creating a PI card device

Kernel Compile Options:General setup ---> [*] Networking supportNetwork device support ---> [*] Network device support ... [*] Radio network interfaces [*] Ottawa PI and PI/2 support for AX.25

The PI card device driver creates devices named`pi[0-9][ab]'. The first PI card detected will beallocated `pi0', the second`pi1' etc. The `a' and`b' refer to the first and second physicalinterface on the PI card. If you have built your kernel to include thePI card driver, and the card has been properly detected then you canuse the following command to configure the network device:

# /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up

This command would configure the first port on the first PI carddetected with the callsign VK2KTJ-15 and make itactive. To use the device all you now need to do is to configure anentry into your /etc/ax25/axports file with amatching callsign/ssid and you will be ready to continue on.

The PI card driver was written byDavid Perry.

6.1.9. Creating a PacketTwin device

Kernel Compile Options:General setup ---> [*] Networking supportNetwork device support ---> [*] Network device support ... [*] Radio network interfaces [*] Gracilis PackeTwin support for AX.25

The PacketTwin card device driver creates devices named`pt[0-9][ab]'. The first PacketTwin card detectedwill be allocated `pt0', the second`pt1' etc. The `a' and`b' refer to the first and second physicalinterface on the PacketTwin card. If you have built your kernel toinclude the PacketTwin card driver, and the card has been properlydetected then you can use the following command to configure thenetwork device:

# /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up

This command would configure the first port on the first PacketTwincard detected with the callsign VK2KTJ-15 and makeit active. To use the device all you now need to do is to configure anentry into your /etc/ax25/axports file with amatching callsign/ssid and you will be ready to continue on.

The PacketTwin card driver was written byCraig Small, VK2XLZ.

6.1.10. Creating a generic SCC device

Kernel Compile Options:General setup ---> [*] Networking supportNetwork device support ---> [*] Network device support ... [*] Radio network interfaces [*] Z8530 SCC KISS emulation driver for AX.25

Joerg Reuter, DL1BKE,has developed generic support for Z8530 SCC based cards. His driver isconfigurable to support a range of different types of cards andpresent an interface that looks like a KISS TNC so you can treat it asthough it were a KISS TNC.

6.1.10.1. Obtaining and building the configuration tool package

While the kernel driver is included in the standard kernel distribution,Joerg distributes more recent versions of his driver with the suite ofconfiguration tools that you will need to obtain as well.

You can obtain the configuration tools package from:Joerg's web page,ftp://db0bm.automation.fh-aachen.de/incoming/dl1bke,ftp://insl1.etec.uni-karlsruhe.de/pub/hamradio/linux/z8530,ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux, orftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming.

You will find multiple versions, choose the one that best suits thekernel you intend to use:z8530drv-2.4a.dl1bke.tar.gz for 2.0.* kernels andz8530drv-utils-3.0.tar.gz for 2.1.6 or later kernels.

The following commands were what I used to compile and install the packagefor kernel version 2.0.30:

# cd /usr/src# gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -# cd z8530drv# make clean# make dep# make module # If you want to build the driver as a module# make for_kernel # If you want the driver to built into your kernel# make install

After the above is complete you should have three new programsinstalled in your /sbin directory:gencfg, sccinit andsccstat. It is these programs that you will useto configure the driver for your card.

You will also have a group of new special device files created in your/dev calledscc0-scc7. These will be usedlater and will be the `KISS' devices you will end up using.

If you chose to 'make for_kernel' then you will need to recompile yourkernel. To ensure that you include support for the z8530 driver you must besure to answer `Y' to:`Z8530 SCC kiss emulation driver for AX.25' when asked during akernel `make config'.

If you chose to 'make module' then the new scc.o will have beeninstalled in the appropriate /lib/modules directory and you donot need to recompile your kernel. Remember to use the insmod commandto load the module before your try and configure it.

6.1.10.2. Configuring the driver for your card

The z8530 SCC driver has been designed to be as flexible as possible so asto support as many different types of cards as possible. With this flexibilityhas come some cost in configuration.

There is more comprehensive documentation in the package and you shouldread this if you have any problems. You should particularly look atdoc/scc_eng.doc or doc/scc_ger.doc for more detailedinformation. I've paraphrased the important details, but as a result thereis a lot of lower level detail that I have not included.

The main configuration file is read by the sccinit program and iscalled /etc/z8530drv.conf. This file is broken into two main stages:Configuration of the hardware parameters and channel configuration. Afteryou have configured this file you need only add:

# sccinit

into the rc file that configures your network and the driver willbe initialized according to the contents of the configuration file. You mustdo this before you attempt to use the driver.

6.1.10.2.1. Configuration of the hardware parameters

The first section is broken into stanzas, each stanza representing an 8530chip. Each stanza is a list of keywords with arguments. You may specify upto four SCC chips in this file by default. The #define MAXSCC 4 inscc.c can be increased if you require support for more.

The allowable keywords and arguments are:

chip

the chip keyword is used to separate stanzas. It willtake anything as an argument. The arguments are not used.

data_a

this keyword is used to specify the address of the dataport for the z8530 channel `A'. The argument is a hexadecimal numbere.g. 0x300

ctrl_a

this keyword is used to specify the address of the controlport for the z8530 channel `A'. The arguments is a hexadecimal numbere.g. 0x304

data_b

this keyword is used to specify the address of the dataport for the z8530 channel `B'. The argument is a hexadecimal numbere.g. 0x301

ctrl_b

this keyword is used to specify the address of the controlport for the z8530 channel `B'. The arguments is a hexadecimal numbere.g. 0x305

irq

this keyword is used to specify the IRQ used by the 8530 SCCdescribed in this stanza. The argument is an integer e.g. 5

pclock

this keyword is used to specify the frequency of the clockat the PCLK pin of the 8530. The argument is an integer frequency in Hz whichdefaults to 4915200 if the keyword is not supplied.

board

the type of board supporting this 8530 SCC. The argument isa character string. The allowed values are:

PA0HZP

the PA0HZP SCC Card

EAGLE

the Eagle card

PC100

the DRSI PC100 SCC card

PRIMUS

the PRIMUS-PC (DG9BL) card

BAYCOM

BayCom (U)SCC card

escc

this keyword is optional and is used to enable support for theExtended SCC chips (ESCC) such as the 8580, 85180, or the 85280. The argumentis a character string with allowed values of `yes' or `no'. The default is`no'.

vector

this keyword is optional and specifies the address of thevector latch (also known as "intack port") for PA0HZP cards. There can be onlyone vector latch for all chips. The default is 0.

special

this keyword is optional and specifies the address of thespecial function register on several cards. The default is 0.

option

this keyword is optional and defaults to 0.

Some example configurations for the more popular cards are as follows:

BayCom USCC

chip 1data_a 0x300ctrl_a 0x304data_b 0x301ctrl_b 0x305irq 5board BAYCOM## SCC chip 2#chip 2data_a 0x302ctrl_a 0x306data_b 0x303ctrl_b 0x307board BAYCOM

PA0HZP SCC card

chip 1data_a 0x153data_b 0x151ctrl_a 0x152ctrl_b 0x150irq 9pclock 4915200board PA0HZPvector 0x168escc no###chip 2data_a 0x157data_b 0x155ctrl_a 0x156ctrl_b 0x154irq 9pclock 4915200board PA0HZPvector 0x168escc no

DRSI SCC card

chip 1data_a 0x303data_b 0x301ctrl_a 0x302ctrl_b 0x300irq 7pclock 4915200board DRSIescc no

If you already have a working configuration for your card under NOS, thenyou can use the gencfg command to convert the PE1CHL NOS drivercommands into a form suitable for use in the z8530 driver configurationfile.

To use gencfg you simply invoke it with the same parameters as youused for the PE1CHL driver in NET/NOS. For example:

# gencfg 2 0x150 4 2 0 1 0x168 9 4915200

will generate a skeleton configuration for the OptoSCC card.

6.1.10.3. Channel Configuration

The Channel Configuration section is where you specify all of the otherparameters associated with the port you are configuring. Again thissection is broken into stanzas. One stanza represents one logical port, andtherefore there would be two of these for each one of the hardware parametersstanzas as each 8530 SCC supports two ports.

These keywords and arguments are also written to the /etc/z8530drv.conffile and must appear after the hardware parameters section.

Sequence is very important in this section, but if you stick with the suggestedsequence it should work okay. The keywords and arguments are:

device

this keyword must be the first line of a port definition andspecifies the name of the special device file that the rest of theconfiguration applies to. e.g. /dev/scc0

speed

this keyword specifies the speed in bits per second of theinterface. The argument is an integer: e.g. 1200

clock

this keyword specifies where the clock for the data willbe sourced. Allowable values are:

dpll

normal halfduplex operation

external

MODEM supplies its own Rx/Tx clock

divider

use fullduplex divider if installed.

mode

this keyword specifies the data coding to be used. Allowablearguments are: nrzi or nrz

rxbuffers

this keyword specifies the number of receive buffers toallocate memory for. The argument is an integer, e.g. 8.

txbuffers

this keyword specifies the number of transmit buffers toallocate memory for. The argument is an integer, e.g. 8.

bufsize

this keyword specifies the size of the receive and transmitbuffers. The arguments is in bytes and represents the total length of theframe, so it must also take into account the AX.25 headers and not just thelength of the data field. This keyword is optional and default to 384

txdelay

the KISS transmit delay value, the argument is an integer in mS.

persist

the KISS persist value, the argument is an integer.

slot

the KISS slot time value, the argument is an integer in mS.

tail

the KISS transmit tail value, the argument is an integer in mS.

fulldup

the KISS full duplex flag, the argument is an integer.1==Full Duplex, 0==Half Duplex.

wait

the KISS wait value, the argument is an integer in mS.

min

the KISS min value, the argument is an integer in S.

maxkey

the KISS maximum keyup time, the argument is an integer in S.

idle

the KISS idle timer value, the argument is an integer in S.

maxdef

the KISS maxdef value, the argument is an integer.

group

the KISS group value, the argument is an integer.

txoff

the KISS txoff value, the argument is an integer in mS.

softdcd

the KISS softdcd value, the argument is an integer.

slip

the KISS slip flag, the argument is an integer.

6.1.10.4. Using the driver

To use the driver you simply treat the /dev/scc* devices just asyou would a serial tty device with a KISS TNC connected to it. For example,to configure Linux Kernel networking to use your SCC card you could usesomething like:

# kissattach -s 4800 /dev/scc0 VK2KTJ

You can also use NOS to attach to it in precisely the same way. From JNOSfor example you would use something like:

attach asy scc0 0 ax25 scc0 256 256 4800

6.1.10.5. The sccstat and sccparam tools

To assist in the diagnosis of problems you can use the sccstatprogram to display the current configuration of an SCC device. To use ittry:

# sccstat /dev/scc0

you will displayed a very large amount of information relating to theconfiguration and health of the /dev/scc0 SCC port.

The sccparam command allows you to change or modify a configurationafter you have booted. Its syntax is very similar to the NOS paramcommand, so to set the txtail setting of a device to 100mS youwould use:

# sccparam /dev/scc0 txtail 0x8

6.1.11. Creating a BPQ ethernet device

Kernel Compile Options:General setup ---> [*] Networking supportNetwork device support ---> [*] Network device support ... [*] Radio network interfaces [*] BPQ Ethernet driver for AX.25

Linux supports BPQ Ethernet compatibility. This enables you to run the AX.25protocol over your Ethernet LAN and to interwork your linux machine withother BPQ machines on the LAN.

The BPQ network devices are named `bpq[0-9]'. The`bpq0' device is associated with the`eth0' device, the `bpq1' devicewith the `eth1' device etc.

Configuration is quite straightforward. You firstly must have configureda standard Ethernet device. This means you will have compiled your kernelto support your Ethernet card and tested that this works. Refer to the Ethernet-HOWTOfor more information on how to do this.

To configure the BPQ support you need to configure the Ethernet device withan AX.25 callsign. The following command will do this for you:

# /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up

Again, remember that the callsign you specify should match the entry in the/etc/ax25/axports file that you wish to use for this port.

6.1.12. Configuring the BPQ Node to talk to the Linux AX.25 support

BPQ Ethernet normally uses a multicast address. The Linux implementation doesnot, and instead it uses the normal Ethernet broadcast address. The NET.CFGfile for the BPQ ODI driver should therefore be modified to look similar tothis:

LINK SUPPORT MAX STACKS 1 MAX BOARDS 1LINK DRIVER E2000 ; or other MLID to suit your card INT 10 ; PORT 300 ; to suit your card FRAME ETHERNET_II PROTOCOL BPQ 8FF ETHERNET_II ; required for BPQ - can change PIDBPQPARAMS ; optional - only needed if you want ; to override the default target addr ETH_ADDR FF:FF:FF:FF:FF:FF ; Target address

6.2. Creating the /etc/ax25/axports file

The /etc/ax25/axports is a simple text file that you create witha text editor. The format of the /etc/ax25/axports file is as follows:

portname callsign baudrate paclen window description

where:

portname

is a text name that you will refer to the port by.

callsign

is the AX.25 callsign you want to assign to the port.

baudrate

is the speed at which you wish the port to communicate withyour TNC.

paclen

is the maximum packet length you want to configure the portto use for AX.25 connected mode connections.

window

is the AX.25 window (K) parameter. This is the same as theMAXFRAME setting of many TNC's.

description

is a textual description of the port.

In my case, mine looks like:

radio VK2KTJ-15 4800 256 2 4800bps 144.800 MHzether VK2KTJ-14 10000000 256 2 BPQ/ethernet device

Remember, you must assign unique callsign/ssid to each AX.25 port you create.Create one entry for each AX.25 device you want to use, this includes KISS,Baycom, SCC, PI, PT and Soundmodem ports. Each entry here will describe exactlyone AX.25 network device. The entries in this file are associated with thenetwork devices by the callsign/ssid. This is at least one good reason forrequiring unique callsign/ssid.

6.3. Configuring AX.25 routing

You may wish to configure default digipeaters paths for specifichosts. This is useful for both normal AX.25 connections and also IPbased connections. The axparms command enablesyou to do this. Again, the man page offers acomplete description, but a simple example might be:

# /usr/sbin/axparms -route add radio VK2XLZ VK2SUT

This command would set a digipeater entry forVK2XLZ via VK2SUT on the AX.25port named radio.

PrevHomeNextA note on callsigns, addresses and things before we start Configuring an AX.25 interface for TCP/IP
 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Linux Amateur Radio AX.25 HOWTO". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.