I'm working on a JavaScript project that involves reading credit cards and driver's licenses from a USB magnetic stripe reader in keyboard emulation mode. It turns out getting credit cards working was extremely easy, as they're all in the same format. However it quickly became clear that driver's licenses are much harder, as even within a single state (CA) the format varies from one card to the next.
In any case, the goal is to take the raw data from swiping a driver's license (using a magnetic stripe reader) and extract the number from it, in a way that produces the correct number for as many U.S. states as possible (all 50 would be amazing). Worth mentioning is that I am not particularly concerned with validation, at least not at this point.
Has anyone else already done this, and packaged it all up in a library (either free or commercial) I could use? That would be awesome.
I should also note that while I'd love to see a JavaScript solution, in reality I'm open to investigating any solution, written in any language.
I'm working on a JavaScript project that involves reading credit cards and driver's licenses from a USB magnetic stripe reader in keyboard emulation mode. It turns out getting credit cards working was extremely easy, as they're all in the same format. However it quickly became clear that driver's licenses are much harder, as even within a single state (CA) the format varies from one card to the next.
In any case, the goal is to take the raw data from swiping a driver's license (using a magnetic stripe reader) and extract the number from it, in a way that produces the correct number for as many U.S. states as possible (all 50 would be amazing). Worth mentioning is that I am not particularly concerned with validation, at least not at this point.
Has anyone else already done this, and packaged it all up in a library (either free or commercial) I could use? That would be awesome.
I should also note that while I'd love to see a JavaScript solution, in reality I'm open to investigating any solution, written in any language.
Share Improve this question edited Jun 20, 2012 at 19:28 Dan Tao asked May 1, 2012 at 15:37 Dan TaoDan Tao 128k57 gold badges308 silver badges450 bronze badges 13- Not exactly what you were looking for, but hope this helps: tek-tips.com/viewthread.cfm?qid=701938 – Ayman Safadi Commented May 1, 2012 at 16:02
- I really do wonder what your planning on doing with all that information! :P – Waltzy Commented Jun 23, 2012 at 0:44
- @Waltzy: With names and driver's license numbers? Nothing much, really. It's just for identity verification for a system I'm working on. – Dan Tao Commented Jun 23, 2012 at 6:41
- 1 @Truth: That's just the thing: I could give you the raw data for my license (California), but I don't have data for all 50 states. Are you asking because you intend to solve the problem yourself? If I had data for all 50 states I would do it myself. – Dan Tao Commented Jun 24, 2012 at 19:13
- 1 @DanTao: You should try to find common grounds between the different licence data types. If there is none, you'll have to code each one manually. – Madara's Ghost Commented Jun 24, 2012 at 19:15
3 Answers
Reset to default 8 +25First of all most states don't use magnetic stripe on drivers' licences, or at least that was the case in 2009: http://www.digitaldoorkeep.com/blog/tag/drivers-license-magnetic-stripe/
Finding data format for the remaining states is a matter of spending some time with google (I found this in 3 minutes: http://www.dgahouston.com/msrdata2.htm ) or actually requesting the information: it's public information.
Also read this: http://www.dgahouston.com/dlsplit1.htm - scanning licences is illegal in some states.
Hm, I'm not sure if this will be of help, but I ran across Jumio which has an online ID verification. I don't know if it would work with your current implementation of your strip scanner, but give it a look it could be exactly what you want: https://pay.jumio.com/
It works by either scanning the license with a built in webcam or uploading an image of the license to their server to verify. http://jumio.com/products/netverify/online-id-verification/
Good luck!
There's their library, but it's not free.
https://www.dynamsoft.com/store/dynamsoft-barcode-reader/
If anyone finds anything free I would love for them to update me as well.