Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 626
Joachim Breitner Avatar asked Nov 20 '12 23:11

Joachim Breitner


2 Answers

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
like image 154
Joachim Breitner Avatar answered Nov 08 '22 10:11

Joachim Breitner


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.

like image 20
Brian Campbell Avatar answered Nov 08 '22 10:11

Brian Campbell