Using PC soundcards as PR modems


This document describes software and hardware installation of Thomas Sailers Soundmodem modules for PC/FlexNet under Windows95

Contents

Introduction

PC/FlexNet allows standard PC soundcards to be used as Packet Radio modems. Different modulation formats are realised in software.

Advantages of the software solution

Flexibility
The software solution is very flexible. Changing protocols and/or modulation formats just requires installing a new software revisions. No hardware changes are required.
Price
Using a soundcard means to profit directly from the mass production and price decay of PC components. Compared to other low cost solutions the soundcard solution requires only moderate computing resources.
Mobility
Since contemporary laptops are equipped with sound hardware, portable packet radio operation requires nothing more than a laptop and a handheld transceiver!
Diagnostics
Diagnostic tools such as an eye diagram display may be realised with no additional hardware completely in software. This allows trouble free monitoring of the link quality.

But there's no such thing as a free lunch. A few disadvantages should not be left unmentioned.

  • Soundcards usually tie up quite many PC resources: one IRQ and one or two DMA channels. This limits severely the number of soundcards that can be installed in a PC concurrently. PCI soundcards however solve this problem, and they seem to be available soon.
  • A `special' cable and a small circuitry to key the transceiver is required.

Features/Requirements

  • Operating modes
    • 1200 baud AFSK
    • 9600 baud FSK (G3RUH compatible)
  • Hardware requirements
    • Soundblaster or WSS (Windows Sound System) compatible PC soundcard
    • CPU 486DX2/66 or better
    • PTT circuitry
  • Software requirements
    • Windows95 or DOS 3.3 (or better)
    • PC/FlexNet, including the Soundcard Modem Driver

Preparing Windows95

It would have been too easy if the standard Windows sound drivers could have been used for the purpose. But unfortunately, this is not possible. Using a soundcard as a packet radio modem requires very low latencies. The data must not pass through a buffer which delays it for several seconds. This would render any channel access algorithm useless.

DirectSound has been developed to provide low latency output for games. Gamers want to hear the burst and the flash of the missile detonnating at the same time. But unfortunately, sound or voice input is uncommon for games, so DirectSound does not, as far as I could find documentation, support sound input.

The design philosophy of PC/FlexNet was to have as few differences between the DOS and the Windows version apparent for the user. In addition, almost all soundcards are either Soundblaster or WSS compatible, but many only after they have been initialized with a very proprietary tool from the soundcard manufacturer. Practical and legal consideration prevent the FlexNet driver from including these routines. These reasons exclude the use of a PnP (Plug and Play or better Plug and Pray) driver.

Both the Windows system sound drivers and the PC/FlexNet soundcard packet radio driver access the same hardware. To prevent conflicts, the windows drivers should be turned off whenever you want to do packet radio. A convenient way is to use multiple hardware profiles. The following list shows the steps how to do this:

  1. Start Windows95 as usual. Open the control panel (Start->Settings->Control Panel)
  2. Double click on "System".
  3. Create a new hardware profile by choosing the "Hardware Profiles" register, selecting one of the available hardware profiles from the list and clicking on "Copy...". I named the new profile "Ohne Soundkartentreiber".
  4. Deactivate any driver that collides with the FlexNet driver, namely the soundcard drivers and the serial or parallel port you want to use for outputting PTT. The MIDI port of the soundcard needs only be deactivated if it is used to output PTT.

[Hardware profiles]

[Deactivation of the drivers]

The next time you reboot Windows, it presents the following menu:

Windows 95 is starting...

Windows cannot determine what configuration your computer is in.
Select one of the following:

1. Original Configuration
2. Ohne Soundkartentreiber
3. None of the above

Enter your choice:2

[Deactivated drivers]

Loading PC/FlexNet

One design goal of PC/FlexNet was to hide most of the differences of the Windows and DOS versions from the user. Loading the PC/FlexNet drivers therefore takes place the same way under both DOS and Windows95.

If you are using Windows95, you need to boot the command line first. To do this:

  1. press the F8 key while the text Starting Windows 95... is displayed. Windows then displays the Microsoft Windows 95 Startup Menu
  2. Choose 6. Command prompt only

Some soundcards require a vendor specific tool to initialize the card. This must happen before PC/FlexNet is loaded. PnP soundcards must have resources allocated. This is best done with an utility provided by the soundcard vendor. For example, Soundblaster 16 PnP and Vibra16 chips can be configured using the DIAGNOSE.EXE /s utility or cards containing a Crystal CS423x chip are setup using the CS4232C.EXE program.

Some modern BIOS may also configure ISA PnP cards. My AWARD BIOS does this, but unfortunately I know of no method to display the resource allocation done by the BIOS. This renders the method useless.

A third possibility is to use a general purpose ISA configuration utility such as Intel's ICU. However these programs are complicated to use and to set up, so their use is justified only if everything else fails.

FlexNet's soundcard modem drivers consist of several modules. The modules SMSBC, SMSBCFDX, SMWSS and SMWSSFDX drive the soundcards, while the modules SMAFSK12 and SMFSK96 implement the modem code. The soundcard drivers need to be loaded before FLEX, the modem modules after FLEX.

An example loading sequence looks like this:

LH FLEXNET
LH SMSBC -tc:1
FLEX
LH SMAFSK12
FSET MODE 0 1200
FSET TXDELAY 0 20
SMMIXER -i:0 -o:0 -s:line

This sequence starts PC/FlexNet with driver support for a soundblaster compatible card and 1200 baud AFSK. The -tc:1 switch tells the driver to output the PTT signal on the COM1 port. Please refer to the apropriate .DOC file (mainly FLEXNET.DOC and SM.DOC included in the archives) for a list of supported command line switches. SMMIXER configures the audio input and output levels and sources.

Now PC/FlexNet is set up and running, and you should verify with a terminal program such as bct if everything works ok. There is no point in starting Windows if it does not work now! If it does not work, recheck the resource settings, especially IRQ and DMA numbers. Also try to swap the DMA numbers if you are using a fullduplex driver.

Windows95 may now be started using WIN. The files FLEXNET.VXD and VSMD.VXD need to be in the same directory as the other FlexNet files. FlexNet automatically notices the startup of Windows and adapts itself to the changing environment. After the graphical FlexNet administration tool has started up, the soundcard driver is ready again. The diagnostic tools SMMIXER and SMDIAG can be used the same way in a Windows DOS box as under plain old DOS.

The "Device Manager" marks the deactivated Windows drivers by a red cross (see above). If you have forgotten to deactivate a driver, the error message looks like the one in the pictures below. You should deactivate these drivers.

[Resource conflict]

[Driver error message]

Automating the startup

The procedure described above looks quite longish. Of course you may write the necessary commands in a batch file. An elegant method is to use a startup menu in CONFIG.SYS. The example below shows how this works. The [menu] section contains the menu items. The first parameter of the menuitem command specifies which section contains the commands belonging to this menu, and the second parameter sets the name which appears in the menu. If this "long" name matches the name of a hardware profile and if this profile is selected, the menu item is automatically selected without displaying a menu. The [common] section contains the programs that are to be loaded regardless of the menu item selected. The previous contents of CONFIG.SYS belong there.

[menu]
menuitem=std,Ausgangskonfiguration
menuitem=pcfsm,Ohne Soundkartentreiber

[common]
rem start of previous contents of CONFIG.SYS
rem for example:
device=c:\windows\himem.sys
dos=high,umb
country=041,850,c:\windows\command\country.sys
device=c:\windows\command\emm386.exe noems
rem end of previous contents of CONFIG.SYS (just an example!!)

[std]

[pcfsm]
installhigh=C:\PCF\FLEXNET.EXE
installhigh=C:\PCF\SMSBC.EXE -b:0x220 -i:5 -d:1 -tc:1
installhigh=C:\PCF\FLEX.EXE
installhigh=C:\PCF\SMAFSK12.EXE
installhigh=C:\PCF\FSET.EXE MODE 0 1200
installhigh=C:\PCF\FSET.EXE TXDELAY 0 20
installhigh=C:\PCF\SMMIXER.EXE -i:0 -o:0 -s:line

The chosen menu item may also be queried in AUTOEXEC.BAT. The environment variable CONFIG contains the (short) name of the chosen configuration. The example below, appended to AUTOEXEC.BAT, starts Windows automatically if the hardware profile "Ohne Soundkartentreiber" was chosen.

rem ... previous contents of AUTOEXEC.BAT
if %config%==pcfsm goto :startwin
goto :end
:startwin
win
:end

Connecting the transceiver

PC soundcards normally do not contain DC coupled outputs which could serve as a PTT signal. Therefore, connecting PTT to the transceiver is not quite straight forward. Several people expressed their uncertainty how to do this, so I collected a few example schematic diagrams on how to do this.

The soundcard modem drivers offer four different possibilities on how to output PTT:

  1. using a COM port
  2. using a LPT port
  3. using the game port
  4. using a VOX circuitry

PTT keying using a COM port

[PTT keying circuitry for COM ports]

PTT keying using a LPT port

PTT keying circuitry for LPT ports

PTT keying using the game port

This solution only works with MPU-401 compatible MIDI ports. The MIDI port of old soundblasters cannot be used.

PTT keying circuitry for game ports

PTT keying using a VOX circuitry

This solution is not recommended for 9600 baud operation. The circuit requires high audio drive levels not every soundcard is able to produce.

PTT keying VOX circuitry


pages created by Thomas Sailer <sailer@ife.ee.ethz.ch>
last updated: 05.04.97