views:

19

answers:

1

I need to get Track 1 and Track 2 data off magnetic cards and send them over the network to a waiting server. What is an easy way to get the track data from a USB HID magnetic card reader?

In case it helps, I have a MAGTEK Mini Swipe Magnetic Strip Reader (part no. 21040140)

I'm OS agnostic -- a solution for Windows, Mac or Linux would be great. Preferably no .NET, but if that's the easiest way I'll go for it.

What do you all think?

Thanks!

+1  A: 

Every card reader I've seen has had a keyboard emulator, so you swipe the card and it sends characters through the keyboard buffer. Looks like this one also does that (documentation : http://www.magtek.com/documentation/public/99875206-16.01.pdf)

Page 14 describes the data sent after a swipe, which is again, fairly standard across card readers:
[Tk1 SS] [Tk1 Data] [ES] [Tk2 SS] [Tk2 Data] [ES] [Tk3 SS] [Tk3 Data] [ES] [CR]

So your track one data starts with % and ends with ?
Track two data starts with ; and ends with ?

I noticed the question was tagged credit-card though, so it would be worth making sure you know the consequences of sending raw card-data across a network (even an internal network). Take a look at the Payment Card Industry Data Security Standards (PCI-DSS) : https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml


There is a demo program for that specific reader that comes with VB source.
http://www.magtek.com/support/software/demo_programs/usb_swipe_insert.asp

PaulG
Thanks for your response. Unfortunately, the specific device I have -- part # 21040140 -- is not covered by the document you linked (check "Hardware Configurations" table on p. 3). The document that covers this device is http://www.magtek.com/documentation/public/99875191-12.01.pdf
BuyTheBid
Actually I've realized that I can reset this device to KB mode -- just takes a little playing around with their USBMSR Demo app available on the support pages.Nonetheless a simple HID solution would be nice so that a keyboard could be used too. Thanks!
BuyTheBid
@BuyTheBid. There is a demo app (with source) available too. I updated the answer.
PaulG