0

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).

4
  • The same Java code behaves differently? This sounds like a problem with the Java code more than anything.
    – Ramhound
    Dec 4, 2014 at 19:52
  • @Ramhound No, Java is just an anomaly. All other programs running on Windows are fine, just not Java ones. On Linux nothing works. Dec 4, 2014 at 19:55
  • Your problem isn't clear. It not clear how the output of a device would adjust the brightness of a display device.
    – Ramhound
    Dec 4, 2014 at 19:59
  • @Ramhound It identifies as a keyboard, and sometimes sends the keyboard shortcut(?) to change screen brightness. Dec 4, 2014 at 20:07

0

You must log in to answer this question.

Browse other questions tagged .