Minimodem: Sending Digital Information Via Analog sound!
In this flow, RTTY is selected because I thought it would provide the highest reliability of any of the available modes, but note that if you're sending a lot of data, or low-latency data, you might want to switch to a faster mode such as Bell 300 or even Bell 1200. Minimodem will do arbitrary Bell speeds, also (e.g Bell 12). I used confidence level of "5" for this flow (like a digital squelch), but this can be changed to make it more or less susceptible to errors. However, if you choose another modulation or confidence value, note that you'll need to make the change to the call to Minimodem in the "restart" node, the "change" node, and the "manual start" node. Yeah, this could have come from a single config variable of some sort, but that seemed unnecessary because mode=RTTY and confidence=5 have been working great for me.
Minimodem: Sending digital information via analog sound!
You have to encode or modulate the digital data somehow, so that you can pass it trough an AC coupled line. There are many suitable encoding schemes, most notably manchester coding, 8b/10b encoding or 4b/5b encoding. Such signals can then be decoded at the arduino end by feeding the signal to the analog comparator input, feeding the comparator output to the Timer 1 input capture unit (so that every reveived rising and falling edge gets a timestamp), and then decoding the stream in software. As the audio output is designed with the human hearing range in mind, I wouldn't expect a bitrate greater than about 10 kbps (probably much less, depending on the encoding scheme used).
If you want to go grazy you can also synthesize a digitally modulated analog waveform at the raspberry pi end, sample it with the arduino ADC and demodulate in the digital domain. With something like quadrature amplitude modulation you could get a fairly respectable data rate even with the limited bandwidth and processing power available, at the cost of more software complexity.
The modem, which is an acronym for modulator/demodulator, was invented in the 1950's for military use. Manufactured by the now popular computer company, IBM, modems were used as part of an air-defense system; their purpose was to connect various airbases and control centers. Modems are devices that mix (modulate) and separate (demodulate) signals, allowing one computer to connect to another. They transfer the data over telephone lines by using analog waves and the modem then converts the waves back and forth. The first modems were designed to hold a telephone's receiver in a cradle and had wire connections that went from the cradles to the computer. Today, most modems are either internal or external hardware devices.Before the computer modem, there was the com-port. When an internal modem card is placed inside of a computer, it behaves as a COM2 or COM3 port. It is also possible connect serial mice into one of these ports (Gilbert, 1996). Asynchronous communication is used in the PC COM port. Each byte of data is a separate unit and the computer that is sending the data can pause between any two bytes of the message. However, the receiver of the message may have to catch the data as quickly as it arrives. This is done by the "a synch" data requiring one extra bit worth of time to announce the new byte's beginning and once extra bit worth of time at the end. This is what is known as the "start" and "stop" bits. This means that a 2400 baud modem could transfer only 240 bytes of data per second. Each byte would require a minimum of 10-bit times. This was once called "start-stop" communication, but asynchronous (a sync, for short) is the name (Gilbert, 1995).The modem does not start and stop the bits. They are actually put out as part of the general data compression. The start and stop bits continue to be generated on the wire that connects a COM port to an external modem. The modem COM port is generally configured to use a higher speed between the modem and the COM port than what the actual transmission will support. A modem may operate at 14,400-kbps with the COM port configured for 38,400-kbps. This is an example of older technology being adapted to meet new requirements (Gilbert, 1995). 350c69d7ab