User Tools

Site Tools


External Data Interface

the external data interface is an UDP socket which accepts any kind of data which will be sent via HSmodem with the selected operation mode/speed.

Example: You want to send data of your weather station via HSmodem. In this case you collect and format the data with some other software, then you send this pre-formatted data into the external data interface of HSmodem. This picture shows the data flow of external messages:


A message is sent from an external application (i.e. weather station) to HSmodem. The receiver should have a user interface (running in a web browser) to see a nice presentation of your weather data. This project requires the following steps:


  1. write a program which gets the data from the weather station and formats it according to the following data format
  2. send this pre-formatted data into HSmodem via UDP port 40135
  3. make a HTML file based on websample.html which presents your weather data at the receiving stations


  • using the HSmodem HTML-Filetransfer feature send your HTML file to the receiving stations
  • stream the weather data into HSmodem and all receiving stations will see it in their browsers


The external message is sent via HSmodem to the transceiver. This is done in parallel to any other running transmission: you can send a picture and additionally send external data. Since both data streams share the same channel the transmission will slow down if too many external messages are sent. But in case of above example (weather station) you i.e. send only every minute, then this will work without any slowdown of the current transmissions.

Data Format: the external data interface accepts messages in this format:

Total Length: 224 Byte

Byte 0 … ID MSB
Byte 1 … ID
Byte 2 … ID
Byte 3 … ID LSB
Byte 4 … message type
Byte 5-223 … message

message ID : a 32 bit random number and works as a first filter for your personal installation to remove any “random” unwanted data. This ID should be a secret number, do not use the default if you plan to open this UDP interface to the internet. Your local HSmodem installation must also have this ID, you can modify it in extData.c.

message type : a number between 16 and 255 specifying the type of the following data. To keep HSmodem compatible between all installations it is highly recommended to request a message type number from Amsat-DL. If you just need a type number for experimentation then use 255.

message : a byte stream with length 219 bytes. May contain any possible data. It is recommended to insert a personal ID to your data. This allows your receiving HTML script to filter out unwanted random data, if somebody else uses the same message type.


On the receiving side HSmodem will detect external messages and separate it from other data streams. The message is then forwarded to a websocket-server (included in HSmodem) which sends it via TCP port 40134 to all connected webbrowsers. No webserver is required, a local HTML page stored as a file can be used. The websocket connection is done by a small piece of javascript.

Now the data are in the bowser and you can present it to the user the way you want.

Implementation in the web browser:

for an example how to do the javascript implementation see the file websample.html which is included in the github project in folder …hsmodem/html

en/extdata.txt · Last modified: 2021/02/01 12:47 by kurt

Page Tools