PC/FlexNet
- An Overview -

Intended audience

This document describes the basic concepts behind PC/FlexNet, a DOS based AX.25 stack. PC/FlexNet is currently DOS software; although the Kernel will run in a DOS box under Windows, many L1 drivers won't, especially those driving a "real" radio channel. There will however be a Windows version in early 1997.

What is PC/FlexNet?

PC/FlexNet is a powerful, flexible and easy to use AX.25 stack for DOS based PC's. PC/FlexNet's sister software, RMNC/FlexNet, is a digipeater software for a microcontroller hardware (the RMNC). It is widely used in central europe and famous for its reliability.

PC/FlexNet's features can be summarized as follows:

Speed

Actual speeds depend on the hardware configuration, but PC/FlexNet is much faster than other AX.25 stacks, eg. TheNet

Flexibility

PC/FlexNet is highly modular, every module (except the Kernel) is optional, so you can load just the modules you need.

Ease of use

PC/FlexNet has very few parameters to adjust, just two per radio channel. The other parameters, especially the channel access parameters, are set automatically according to the channel usage characteristics.

Compatibility

PC/FlexNet works with virtually any hardware that can be used as a modem and almost all DOS based amateur radio applications.

Digipeater

The FlexNet kernel contains a simple SSID based digipeater. The optional FLEXDIGI module provides a full fledged digipeater featuring a proprietary routing protocol that is much more reliable and faster converging than eg. NET/ROM. FlexNet's hop-to-hop acknowledges reduce packet loss significantly and make connections over dozens of digipeaters possible!

Background operation

PC/FlexNet and its L1 drivers are TSR (terminate and stay resident) programs, i.e. they return immediately to the DOS prompt. PC/FlexNet applications come in two flavours: TSR and non-TSR. PC/FlexNet supports any number TSR applications (as long as memory suffices...), but only one non-TSR application (the last one).

Writing FlexNet modules

PC/FlexNet's modular concept makes development easy. Unlike other big monolithical solutions, each author only needs to know his small module. This improved the quality and stability of the modules a lot. Besides, there are developer kits available from the author, (D)K7WJ. The kits provide C sample files and C linkable libraries.

The module hierarchy

The most important module (and the only one not optional :-)) is the FlexNet kernel, FLEXNET.EXE. It provides an interface to the L1 drivers at the lower edge, and an application interface at the upper edge. The kernel uses the L1 drivers to actually transmit and receive packets over the air (or the wire). PC/FlexNet applications use the kernel to set up outgoing connects and listen to incoming connects.

The L1 drivers actually access the hardware to transmit and receive packets. The FlexNet kernel supports up to 16 channels. L1 drivers may support more than one channel. Each driver should be accompanied by a .DOC file describing its capabilities and command line parameters. Most .DOC files are bi or trilingual (german, english and some french too).

There are a few applications that support the PC/FlexNet application programming interface directly, most notably the Baycom Mailbox (BCM) and the Baycom Terminal (BCT). Emulators such as TFEMU (WA8DED emulator) provide standard amateur interfaces. As they are emulations, they are not perfect; but they are good enough so that almost all programs work with them.

Installing PC/FlexNet

First you'll need to download the appropriate modules from the following web sites

Please read the documentation files and the licensing conditions

PC/FlexNet runs completely in the background as a TSR, that means that other applications can run simultaneously if there is enough memory left. However, the FlexNet infobox and the beacon generator may not be serviced under some circumstances, so that a dialogue with the node is impossible. This only happens when using badly programmed applications. QSO’s via the digi and the internode communication are not affected and should always work, whatever the PC has to do. Probably things get slowed down a little bit.

Hard- and Software Requirements

• PC/XT, better AT with at least 512kB RAM - PC/FlexNet needs 200kB RAM, plus space for the L1 drivers and applications

• Operating system MS-DOS 3.1, better 5.0 or 6.2. Tests with MS-DOS 6.0 caused problems, we have no experiences with DR-DOS or other DOS versions. We recommend the use of MS-DOS 5.0 or 6.2, here most modules can be loaded into the UMB’s, provided there is enough memory available.

• IO-ports as necessary, according to the L1 drivers available

Principally, a PC/XT will work. The gained performance mostly depends on the speed and the throughput of the L1 hardware drivers. PC/FlexNet supports several loadable L1 drivers. They are installed in the memory by simply calling them. This makes it easy to support any hardware. A "driver development kit" for interested developers is available from the author. The port numbers derive from the order of the driver installation. A single driver can support more than one port depending on the hardware. FlexNet, however, is limited to a maximum of 16 ports, the last port (15) is reserved for internal purposes. The port drivers are included on the distribution disk, depending on which drivers are available. For every L1 driver there is a appropriate *.DOC-file which explains the installation. By starting the drivers with the option /?, you will get a short help as well. Many people on different places are working on PC/FlexNet at the same time. Thus, there always new versions of kernels, drivers and applications. It is always a good idea to ask for new versions if there occur any problems. Changes, even in the installation procedure, may happen. Please read the *.DOC-files carefully!

At the beginning, all files must be copied into a directory which should be in the DOS search-path. The start of PC/FlexNet should be done via a batch file because most of the L1 drivers need additional command line arguments. Occurring errors should abort the batch file. A sample batch file is on the distribution disk and can be easily changed to fit your needs.

FLEXNET.EXE must be loaded first, then - if a node is to be installed -FLEXDIGI.EXE. Pure endpoints (Terminal, Cluster, BBS and so on) should not use it. Then the L1 drivers follow in the order you require. At last, the activation of the modules is made by the utility "FLEX". After doing this, no more port drivers can be installed.

FLEXNET.EXE has an optional parameter, which specifies how many RAM may be used by FlexNet. Default is 15kb, but this lasts only for few QSO’s. The minimum for nodes with several ports is about 80kb. Depending on how many ports you use, you should experiment with this value. FlexNet loves memory more than everything else and runs best when it has about 30kb per port and additional 20kb for administration.

To load the modules, generally (from DOS 5.0 onwards) you should use the "LOADHIGH" or "LH" command. It does not do any harm if there is not enough memory in the UMB; the file is loaded into conventional memory then. You still gain a little memory, since the environment blocks do not fragment the memory. You may check this by using the "MEM /D" command.

Calling FLEX.EXE with the argument "/U" uninstalls all L1 drivers and removes FLEXNET.EXE from memory. As usually on DOS, no other TSRs should be loaded after FlexNet, otherwise your machine might crash.

The first start of FLEXNET.EXE creates an empty parameter file. Port 15 is generally the interface for applications. The parameter AUTOSYSOP ("y") is set on this port, you should not change it. Now you should set the sysop secret code using "SYSNUM.EXE". The secret code becomes valid at the next start of PC/FlexNet. With "TNC.EXE" you can connect the node now and continue in setting the parameters. If you made a mistake, you could simply delete the file "FLEXNET.FPR" and begin again. "TNC.EXE" is a simple TNC emulation. With "<ESC> H <CR>" you get a short help. The node can be connected with "<ESC> C <CR>".

The parameter setting of the software can be done now either by the TNC emulation or via remote control. Please check the documentation of the L1 port drivers. Like always on FlexNet, the rest of the parameter settings is very easy and can be finished in a short time.

Before you decide to build a digipeater using PC/FlexNet now, you should think about the following: The RMNC is still the preferred platform for FlexNet, and something that does not work there will not work on the PC either, except from some bagatelles. The user shall find a uniform and well known (from the RMNCs) user interface. Who prefers the optimum of reliability and performance for minimal costs and maintenance should use the RMNC.

Starting the software requires the following steps. Enter them at the DOS prompt (or write them into a batch file)

FLEXNET
This loads the FlexNet kernel. Now you'll need to load the L1 drivers according to your hardware. As an example, the following line will load the Baycom SER12 driver at COM1. The command line options are described in the .DOC file of the driver.
SER12 1
When you have loaded all the L1 driver you wanted (PC/FlexNet supports up to 16 channels), you may start the Kernel with:
FLEX
After this command, it is no longer possible to load L1 driver, but now Applications may be started. You should now set the operating parameters of the drivers just loaded. The kernel is now functional and will receive and transmit packets.
FSET MODE 0 1200
sets the baud rate of channel 0 (the first channel) to 1200 baud
FSET TXDELAY 0 20
sets the TxDelay (the time spent after keying the transmitter and before sending any data to allow the PA to arrive at its rated power level) to 200ms, which is suitable for many HT transceivers. Crystal controlled transceivers usually need much less.
BCT /n yourcall
You may now start PC/FlexNet applications. This example starts the baycom terminal. Replace yourcall by your callsign.
TFEMU
This starts the WA8DED emulator in TFPC* compatible mode. If your application expects the DRSI mode, use the parameter /dr.

PC/FlexNet modules may be unloaded. The following commands achieve this:

KILLAPPL
This command removes the last loaded TSR application (such as TFEMU).
FLEX /u
Removes every PC/FlexNet module including the Kernel, L1 drivers, and TSR applications

Reporting bugs

PC/FlexNet exists now for over one year. Its roots (RMNC FlexNet) are even much older, more than 6 years. It is thus a very mature software. So if you find an unexpected behaviour, please read the documentation first! If the problems persist, send an E-mail (via the Internet or via Packet Radio) to the appropriate author (the address listed in the .DOC file of the module that causes your problems). Please always include a detailed description of:

Since this is our hobby, do not expect us to reply within 24 hours. Please include as much information as possible, "it does not work" does not help us to help you.

Why does the FlexNet group always have to reinvent the wheel?

Sorry. We are trying to use established amateur standards, but sometimes they do not provide the features we need. Rather than presenting an inferior solution, we invent a new specification.

Application interface

The established standard for AX.25 stacks communicating to applications is the WA8DED hostmode. It has several drawbacks.

Therefore we decided to invent an easy to use, fast and proprietary application programming interface and provide WA8DED compatibility via an optional module.

Using TNCs with PC/FlexNet

The established protocols at the TNC to PC connection and their disadvantages are:

That's why we invented 6PACK. There is an EPROM image available that implements 6PACK on TNC2 compatible designs. The specification of 6PACk is also available from our homepage.

The KISS driver supplied with PC/FlexNet is intended to communicate with other computers. Don't use it to drive your TNC, it will not work.

The routing protocol

The routing protocol that existed when (D)K7WJ started with RMNC/FlexNet was NET/ROM. It had (and mostly still has) many disadvantages so that (D)K7WJ decided to build a new one. Success justified him! In central europe, it is now possible to reliably connect over dozens of digipeaters without knowing the path!


Thomas Sailer - [email protected]