Credit card reader gives random output

0

1

I bought a cheap $10 magnetic card reader online. It identifies as a generic keyboard, and as such should work on anything that accepts USB keyboards. It works just fine on Windows, but on Linux and in Java programs it gives random output consisting of various ASCII symbols and even control sequences that mess with screen brightness. It's completely random, different every time I swipe the card. Again, on native Windows applications there is no problem and the reader works every time. What is going on? I want to use it with a Linux computer for a customer terminal.

For example, I have an ID card that should give this every time I swipe (and it does on Windows): ;00548757802?

In a Java app it gives this:

;00Q48σ57802?
_≥0548!5I8◘R?
_005µ875780(?
≥05487♥*802?
;≥05487578ⁿ5
○00▼48757802♥
;┤0548757µ0⌂?
0054875♣d82?
;≥05487I↑å8?
;00548757802?
♣00548*→-♣02?

In Linux it appears to output nothing (i.e., Leafpad), but if swiped in a Terminal, the card reader spits out special keys (Ctrl, Alt, arrows, and combinations thereof, with a few regular keys in the mix).

Skylar Ittner

Posted 2014-12-04T19:45:53.023

Reputation: 285

The same Java code behaves differently? This sounds like a problem with the Java code more than anything. – Ramhound – 2014-12-04T19:52:41.280

@Ramhound No, Java is just an anomaly. All other programs running on Windows are fine, just not Java ones. On Linux nothing works. – Skylar Ittner – 2014-12-04T19:55:48.923

Your problem isn't clear. It not clear how the output of a device would adjust the brightness of a display device. – Ramhound – 2014-12-04T19:59:39.430

@Ramhound It identifies as a keyboard, and sometimes sends the keyboard shortcut(?) to change screen brightness. – Skylar Ittner – 2014-12-04T20:07:59.680

No answers