Recreating the Dialup Modem

Getting Online

Who am I?

What is sound?

What does data look like?


How do we get data into audio?



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.


Coded Signals Line of Sight

Optical Telegraph 


Both sides need to know the code


Claude Chappe



Morse Code

Pioneered by Samuel Morse




Electrical Signals over a wire.


Both sides needed to be trained in morse code.




Baudot Code

Invented by Émile Baudot




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?


By Frequency Shifting a Key we can encode state.


Audio Frequency Shift






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.





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.


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




processor.onaudioprocess = function(e) {
    let processData = e.inputBuffer.getChannelData(0);
    remainder = remainder.concat(, 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.
  • ✨✨✨✨✨✨✨✨✨?




JSConf UY 2015

By Sam Saccone

JSConf UY 2015

  • 3,885
Loading comments...

More from Sam Saccone