How does Square Reader (square) work through headphones in Android?

https://squareup.com/reader describes a hardware card reader that plugs into the headphone jack on Android (and iPhone).

I wonder how the Square app reads data from the headphone jack. Is it possible to send user data through the headphone jack, or is it just some kind of sound decoding (for example, how does the remote access modem work)?

+8
android
source share
3 answers

The square uses the usual audio signals in the same way as the modem does.

+8
source share

According to the gap , a Square Reader is a magnetometer similar to that found in a common cassette recorder that connects the tip and microphone ring of the headphone jack to the ground. The magnetometer converts the magnetic fields into a credit card into an analog electrical signal to send the data read from the card through the microphone input into the application to decode and interpret the analog signal into usable data.

+9
source share

The headphones used in iDevice (ipod, iphone, etc.) are a ring, ring, ring, tip. โ€œordinaryโ€ headphones are a ring, a ring, a tip (for stereo), the tip is grounded, and the two rings are audio (left and right). If you add a microphone, you get a third ring.

Two rings are the exits, and one is the entrance. think that the sound coming out of your headphones (i.e. the output), the microphone sends sound to the iPhone so that it is an input.

The square will send information about the device through the microphone input and receive information through one (or both speaker outputs).

check out this article .... http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/

+4
source share

All Articles