Table of Contents

Modem <-> App Interface

the Amsat High Speed Modem is a combination of two programs:

  1. the modem functions are handled by hsmodem.exe (Linux: hsmodem). This is a pure console program without GUI. It has two interfaces: an UDP interface to the application and an audio driver to the sound card.
  2. the Application (GUI) interacts with the user and exchanges data with the modem over an UDP link. The default Amsat applications is oscardata.exe

This makes it easy to run hsmodem on one computer and the application (oscardata.exe) on another, communication via network.

This document is addressed to programmers who want to use hsmodem.exe but make their own application to transfer any possible data.

The picture shows these functional blocks. hsmodem.exe covers the modulator/demodulator, the frame packing and data security. On the top an UDP interface handles the complete communication with the User application. This enables programmers to build their own application and use the modem as it is. The Amsat default application oscardata.exe is written in C# and therefore runs on Windows as well as on Linux (using mono).

UDP ports:

App to modem, broadcast messages only: 40131
App to modem, data and configuration: 40132
Modem to app, all data: 40133

IP address:

before the app can send data to the modem it has to know the modem's IP address. This address can be discovered automatically with the following procedure:

App: send a broadcast UDP message (addressed to 255.255.255.255) with a specific contents (see below)
Modem: response to this UDP message
App: read the modem-IP from the response and address all further messages directly to the modem

Broadcast Message App->Modem:

this message contains some configuration data and should be sent every couple of seconds to the modem.
Format of the broadcast message:

  0: 1200 BPSK BW: 1300 Hz
  1: 2400 BPSK BW: 2500 Hz
  2: 3000 QPSK BW: 1700 Hz 
  3: 4000 QPSK BW: 2400 Hz  
  4: 4410 QPSK BW: 2500 Hz (QO-100 Standard)
  5: 4800 QPSK BW: 2700 Hz
  6: 5500 8APSK BW: 2300 Hz
  7: 6000 8APSK BW: 2500 Hz (QO-100 Transceiver)
  8: 6600 8APSK BW: 2600 Hz
  9: 7200 8APSK BW: 2700 Hz (QO-100 SDR)
 10: 45.45 Baud RTTY

Modem's response to the App's broadcast message:

the modem sends an UDP message to the IP of the application. If the modem receives broadcast messages from multiple applications then it prefers the local one (the app running on the same computer). This is the message format of the response to the App's broadcast message:

Name of a playback device - 1 followed by delimiter '~'
Name of a playback device - 2 followed by delimiter '~'
Name of a playback device - n followed by delimiter '~'
delimiter '^'
Name of a capture device - 1 followed by delimiter '~'
Name of a capture device - 2 followed by delimiter '~'
Name of a capture device - n followed by delimiter '~'

Fixed IP address

in some cases it may be required to set fixed IP adresses (i.e. if multiple hsmodems operate in the same network).

hsmodem.exe accepts a command line parameter to specify a fixed IP address of the application. If specified the modem will send messages ONLY to this IP.

usage: hsmodem -m 192.168.0.5 (or any other IP address)