Recreating the Dialup Modem

Getting Online

Who am I?

What is sound?

What does data look like?

0110100001100101011011000110110001101111001000000110101001110011011000110110111101101110011001100111010101111001

How do we get data into audio?

01011

+

An Encoding Problem!

Humans are good at encoding data.

It breaks down when you don't speak the language

Language is data encoding for speech

How then do computers speak?

Computers can not just understand language.

Computers need a language and a way to speak.

How does it work?

History Time.

Communication Needed

  • Fast transmission.
  • Something Easy to use.
  • Something Cheap to implement.

Telegraphy

Coded Signals Line of Sight

Optical Telegraph 

 

Both sides need to know the code

 

Claude Chappe

 

17921837~

Morse Code

Pioneered by Samuel Morse

 

1836

 

Electrical Signals over a wire.

 

Both sides needed to be trained in morse code.

 

 

 

Baudot Code

Invented by Émile Baudot

 

1874

 

5 bit code to send letters

Multiplexed transmissions

Chorded Keyboard

 

"Baud" Comes from Baudot

Multiplex like it is 1855

🔥240 baud

🎷🔥

How is data encoded into audio?

FSK

By Frequency Shifting a Key we can encode state.

AFSK

Audio Frequency Shift

Keying

(R)TTY

 

~1908

 

Non-Skilled operators on both ends, uses Baudot Murray encoding. 

Existing Medium

  • Intended to carry speech
  • "hacked" to carry data
  • AFSK work(s)(ed) on existing infrastructure.

Modem

 

~1942

 

Connect teleprinters over regular phone lines.

 

Demodulates and Modulates data to be sent over standard lines.

So JSCONF right :) ?

 

Recreating a Modem in the Browser with Javascript!

The  Oscillator Node

Allows us to change the frequency over time.

ScriptProcessorNode

Process chunks of audio JIT with a given bin size and sampling rate

JavaScriptNode

WaveTableNode

AudioWorkerNode

processor.onaudioprocess = function(e) {
    let processData = e.inputBuffer.getChannelData(0);
    remainder = remainder.concat(Array.prototype.slice.call(processData, 0));
    remainder = goertzel(k, binsPerBit, remainder, out);
};

Converting Data

String => Binary

Bits to Audio

Data Extraction

The hard part

Extracting Bits From the Waveform

How do we get from a wave to frequency Intensity?

Goertzel Algorithm

Allows us to extract a target frequency intensity over time

Goertzel Results in:

Goertzel filter is not quite perfect.

We want it to be as close to "binary" as we can get it.

Hamming Window

Frequency Intensity 

 

All Together now.

What if there was noise on the line?

Noisy Signals

What is next?

  • Air gapped communications.
  • Multiplexed Signals.
  • Dynamic JS Injection.
  • ✨✨✨✨✨✨✨✨✨?

Thanks!

 

@samccone

Made with Slides.com