Installation, Configuration, Hints and Tricks.

# 14. Installation, Configuration, Hints and Tricks.

Contents of this section

This section provides some detail on how to actually install and use some of the listed software. It will also detail some solutions to some tricky problems that you might encounter with the software.

## 14.1 AX.25 - Packet Radio protocol kernel software.

The AX.25 protocol offers both connected and connectionless modes of operation, and is used either by itself for point-point links, or to carry other protocols such as tcp/ip and netrom.

It is similar to X.25 level 2 in structure, with some extensions to make it more useful in the amateur radio environment.

Alan Cox has developed some kernel based AX.25 software support for Linux and these are available in ALPHA form for you to try. Alan's code supports KISS based TNC's (Terminal Node Controllers), the Ottawa PI card and the Z8530 SCC driver.

The User programs contain a P.M.S. (Personal Message System), a beacon facility, a line mode connect program, `listen' an example of how to capture all AX.25 frames at raw interface level and programs to configure the NetRom protocol.

Be sure to read `/usr/local/ax25/README` as it contains more complete information regarding this software.

### Where to obtain the AX.25 software.

The AX.25 software is comprised of two component, the kernel source and the utility programs. As of the version 1.3.* release of Linux kernel source the AX.25, Netrom, Z8530 SCC and PI card drivers are all included as a standard. I strongly recommend you obtain and use the version 1.3.* kernel source. Be warned though, this software is alpha and may have problem that you wouldn't otherwise encounter.

You can obtain the latest kernel source from:

ftp.funet.fi

> `

>     /pub/OS/Linux/PEOPLE/Linus/v1.3/

> `

You will also need the utility programs. The latest version of those can be found at:

ftp.ucsd.edu

> `

>     /hamradio/packet/tcpip/incoming/ax25-utils-030.tar.gz
>                                 .../ax25-utils-030-patch1.gz

> `

### Installing the AX.25 software.

The software comes in two parts, the kernel source, and the user programs.

### The kernel source.

If you are using the 1.3.* kernel source then all you have to do is build the kernel as you would normally.

The following should be safe:

> `

>     # cd /usr/src/linux
>     # make config
>     # make dep;make

> `

Be sure to answer `yes' when you are asked if you should include the AX.25 support in the make config step. You will also need to answer `y' to including SLIP if you want the AX.25 code to support a KISS TNC or if you intend running a version of NOS on your system so you can link the two. You will be asked if you wish to include the Z8530 driver. If you wish to support the Ottawa PI driver then you must answer `y' when asked: `Do you want to be offered ALPHA test drivers ?` and: `Other ISA cards ?` then `y' when prompted: `Ottawa PI and PI/2 support`.

### The user programs.

To install the user programs you should try:

> `

>     # cd /usr/local
>     # gzip -dc ax25-utils-030.tar.gz | tar xvvof -
>     # gzip -dc ax25-utils-030-patch1.gz | patch -p0
>     # cd ax25

> `

You should then read the `README` file and follow its instructions. When you are happy you are ready to compile, then do:

> `

>     # cd /usr/local/ax25/src
>     # make clean
>     # make install

> `

### Configuring and using the AX.25 software.

Configuring an AX.25 port is very similar to configuring a slip device. The AX.25 software has been designed to work with a TNC in kiss mode or an Ottawa PI2 card. You will need to have the TNC preconfigured and connected to your serial port. You can use a comms program like minicom or seyon to configure the TNC into kiss mode if you wish.

You use the axattach program in much the same way as you would use the slattach program. For example:

> `

>     # /usr/local/ax25/bin/axattach -s 4800 /dev/cua1 VK2KTJ &

> `

would configure your `/dev/cua1` serial device to be a kiss interface at 4800 bps, with the hardware address `VK2KTJ`.

You would then use the ifconfig program to configure the ip address and netmask as for an ethernet device:

> `

>     # /sbin/ifconfig sl0 44.136.8.5
>     # /sbin/ifconfig sl0 netmask 255.255.255.0
>     # /sbin/ifconfig sl0 broadcast 44.136.8.255
>     # /sbin/ifconfig sl0 arp mtu 257 up

> `

To test it out, try the following:

> `

>     /usr/local/ax25/bin/call VK2DAY via VK2RVT

> `

The call program is a linemode terminal program for making ax.25 calls. It recognises lines that start with `~' as command lines. The `~.' command will close the connection.

You also need to configure some items such as the window to use. This necessitates editing only one file. Edit the `/usr/local/ax25/etc/ports` file. This is an ascii file containing one line for each AX.25 port. You must have the entries in this file in the same order as you configure your AX.25 interfaces.

The format is as follows:

> `

>     callsign baudrate window frequency

> `

At this stage not much of this information is used, it will be picked up and used in later developments.

Please refer to the man pages in `/usr/local/ax25/man` and the `README` file in `/usr/local/ax25` for more information.

## 14.2 Ottawa PI/PI2 card driver.

The Ottawa PI card is a Z8530 SCC based card for IBM PC type machines that is in common usage by Amateur Radio operators worldwide. While it is most commonly used by Amateur Radio Operators, it could be pressed into service in other fields where it is desirable to have the features of a Z8530. It supports a high speed half duplex (single DMA channel) port, and a low speed (<9k6bps interrupt driven) half duplex port. The PI2 is a new version of the card that supports an on board radio modem, and improved hardware design.

A driver for this card has been written by `David Perry, <dp@hydra.carleton.edu>`, and is available from in the standard linux kernel. Please refer to the AX.25 section for configuration details.

## 14.3 HOWTO link NOS and the Linux kernel networking software

Many people like to run some version of NOS under Linux because it has all of the features and facilities they are used to. Most of those people would also like to have the NOS running on their machine capable of talking to the Linux kernel so that they can offer some of the linux capabilities to radio users. Brandon S. Allbery, KF8NH, contributed information to explain how to achieve this.

Since both Linux and NOS support the slip protocol it is possible to link the two together by creating a slip link. You could do this by using two serial ports with a loopback cable between them, but this would be slow and costly. Linux provides a feature that many other unix-like operating systems provide called `pipes'. These are special pseudo devices that look like a standard tty device to software but in fact loopback to another pipe device. To use these pipes the first program must open the master end of the pipe, and the open then the second program can open the slave end of the pipe. When both ends are open the programs can communicate with each other simply by writing characters to the pipes in the way they would if they were terminal devices.

To use this feature to connect the Linux Kernel and a copy of NOS, or some other program you first must chosoe a pipe device to use. You can find one by looking in your `/dev` directory. The master end of the pipes are named: `ptyp[1-f]` and the slave end of the pipes are known as: `ttyp[1-f]`. Remember they come in pairs, so if you select `/dev/ptypf` as your master end then you must use `/dev/ttypf` as the slave end.

Once you have chosen a pipe device pair to use you should allocate the master end to you linux kernel and the slave end to the NOS program, as the Linux kernel starts first and the master end of the pipe must be opened first. You must also remember that your Linux kernel must have a different IP address to your NOS, so you will need to allocate a unique address for it if you haven't already.

You configure the pipe just as if it were a serial device, so to create the slip link from your linux kernel you can use commands similar to the following:

> `

>     # /sbin/slattach -s 38400 -p slip /dev/ptypf &
>     # /sbin/ifconfig sl0 broadcast 44.255.255.255 pointopoint 44.70.248.67 /
>             mtu 1536 44.70.4.88
>     # /sbin/route add 44.70.248.67 sl0
>     # /sbin/route add -net 44.0.0.0 gw 44.70.248.67

> `

In this example the Linux kernel has been given IP address `44.70.4.88` and the NOS program is using IP address `44.70.248.67`. The route command in the last line simply tells your linux kernel to route all datagrams for the amprnet via the slip link created by the slattach command. Normally you would put these commands into your `/etc/rc.d/rc.inet2` file after all your other network configuration is complete so that the slip link is created automatically when you reboot. Note: there is no advantage in using cslip instead of slip as it actually reduces performance because the link is only a virtual one and occurs fast enough that having to compress the headers first takes longer than transmitting the uncompressed datagram.

To configure the NOS end of the link you could try the following:

> `

>     # you can call the interface anything you want; I use "linux" for convenience.
>     attach asy ttypf - slip linux 1024 1024 38400
>     route addprivate 44.70.4.88 linux

> `

These commands will create a slip port named `linux' via the slave end of the pipe device pair to your linux kernel, and a route to it to make it work. When you have started NOS you should be able to ping and telnet to your NOS from your Linux machine and vice versa. If not, double check that you have made no mistakes especially that you have the addresses configured properly and have the pipe devices around the right way.

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter