Joachim Breitner
Joachim Breitner

Reputation: 25763

Decode audio from a credit card reader

I got a credit card reader that plugs into the microphone jack from my bank, and they provide apps for android and MacOS to receive payments this way. I don’t have any of these systems nor the need to accept payments, but I am curious about the device. I can record the sound on my laptop. So: Is there a Linux program that can decode this signal?

Upvotes: 6

Views: 4626

Answers (2)

Joachim Breitner
Joachim Breitner

Reputation: 25763

Thanks to the other answers I found the right words to search for and found mslib via the authors blog and, after some adjustments, got it to read data from my reader.

The library comes with a small test program that can read files created by:

arecord  -c 1 -N -r48000 -f S16_LE -i -v

Upvotes: 4

Brian Campbell
Brian Campbell

Reputation: 332816

This is probably doing the same thing as the Square audio-input based card readers; using the equivalent of a tape head to read the information as audio. Someone has written some code that's available on GitHub for decoding this data.

Upvotes: 2

Related Questions