Remote CW Keyer - Implementation Details
by DL4YHF, 2023-12-20
This document only contains the technical details about the
implementation; mainly about the network protocol between client and server.
It it not required to "just use" the application (either as client or server).
All you need to know about using the program, and what kind of
simple hardware is used to connect a real Morse key to the PC on the client side,
is explained in the Remote CW Keyer manual.
,----------------------------------------,
| Server |<----- USB ---> Radio
| |
| TCP/IP TCP/IP TCP/IP |
'----------------------------------------' __ "Network" (TCP/IP):
/|\ | /|\ | /|\ | | Audio signals,
| | | | | | | CW keying,
| \|/ | \|/ | \|/ __| and other data
,-----------, ,-----------, ,-----------,
| Client #1 | | Client #2 | | Client #3 |
'-----------' '-----------' '-----------'
/|\ /|\ | /|\ /|\ | /|\ /|\ |
| | | | | | | | |
| | \|/ | | \|/ | | \|/
Key Mic Spkr Key Mic Spkr Key Mic Spkr
Remote_CW_Keyer
|--- manual
| |-- Remote_CW_Keyer.htm : The manual in HTML format
| '-- *.png, *.jpg : Images loaded by your browser
| when opening the manual
|--- sources : The 'most interesing sourcecodes' (written in C).
| |-- KeyerThread.c :
| | This is where the program polls the operator's
| | 'local' Morse key, connected to a serial port.
| |-- Elbug.c : Emulates an electronic keyer
| | ('dot' and 'dash' contact states in,
| | Morse code pattern out, in real-time).
| |-- CwGen.c : Converts Text (ASCII) into Morse code.
| |-- CwDSP.c : Creates audio waveforms from the
| | on/off keyer Morse code pattern, etc.
| |-- CwNet.c : Socket-based network server and client.
| | Multiplexes and demultiplexes different
| | kind of 'bytestreams' into the same
| | network socket (TCP/IP connection
| | between client and server).
| |-- CwStreamEnc.c : 'CW Stream Encoder / Decoder' .
| | Converts the raw 'CW keying signal'
| | into a low-bandwidth bytestream,
| | with an efficiently encoded 7-bit
| | 'timestamp' (actually the number of
| | milliseconds to wait before emitting
| | the next 'key up / key down'-flag),
| | and the 'key up / key down'-flag
| | in the most significant bit of each
| | byte in the CW keying bytestream.
| |-- dsound_wrapper.c : Interface between the application
| | and one of the many Windows 'Audio APIs'.
| |-- Timers.c, Utilities.c : Ugly stuff for Windows.
| '-- Keyer_Main.cpp :
| This is just the GUI (User Interface), written
| in C++ Builder, thus not sooo interesting.
| You can safely delete the entire 'sources' folder.
| It is not required to run the executable.
|
'--- Remote_CW_Keyer.exe : This is the executable file .
Lauch it via double-click, command shell, or create
a link on the desktop to it.
Links in the above sourcecode overview only work after unpacking
the zipped archive. They don't work when viewed 'online' on the
website, and there is no public repository (GitXYZ) for it.
The sources contained in the archive are considered 'open source',
but take care - some of them may be 'available as source'
but not really 'open', like the now-discarded ASIO support.