Self-made "Sound shell" / "DTMF modem" introduction
Using DTMF tones, it is entirely possible to devise a sort of "software modem" on Linux and macOS. Beeps are generated via sox, recognition via multimon-mg. Solely the numbers 0-9 are transmitted. One or multiple 0s serve to separate character packages. Each character is transmitted via a three-digit-package consisting in general of the digits 1 to 8. However, any subsequent digit that is equal to the immediately peceding digit is replaced by a 9. So 111 would be transmitted as 191, 552 as 592, 422 as 429 and so forth (each such three digit package being surrounded by 0s during transmission). This makes it possible to transmit 512 different combinations. This fact, in turn, can be used to separate input and output streams, e.g. saying that values 0-255 shall be treated as incoming bytes, and values 256-511 shall be treated as outgoing bytes. If input and output byte streams can be cleanly separated, this allows half-duplex communication even over an audio link in which the device‘s microphone is picking up the same device‘s sound output. For DTMF tone generation, the source is: https://github.com/KedalionDaimon/modem-audio-dtmf/blob/main/dtmfoutmac2.sh Encode character to "lower" 512-half: https://github.com/KedalionDaimon/modem-audio-dtmf/blob/main/endtmflowmac.c Encode character to "higher" 512-half: https://github.com/KedalionDaimon/modem-audio-dtmf/blob/main/endtmfhighmac.c Decode "lower" 512-value characters: https://github.com/KedalionDaimon/modem-audio-dtmf/blob/main/dedtmflow.c Decode "higher" 512-value characters: https://github.com/KedalionDaimon/modem-audio-dtmf/blob/main/dedtmfhigh.c #modem #dtmf #shell #soundshell #audiolink
Download
0 formatsNo download links available.