View previous topic :: View next topic |
Author |
Message |
ElectricalNoob
Joined: 17 May 2007 Posts: 15
|
Magnetic Card Reader |
Posted: Wed May 23, 2007 10:39 pm |
|
|
Has anyone used a magnetic card reader before. I currently got a Hitachi-Omron V3B-4 card reader. I looked for a datasheet, but could not find one. Has anyone used a card reader before. Any help or sample code would be greatly appreciated.
Thank You.
Simeon |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 23, 2007 11:18 pm |
|
|
Do a web search with http://www.google.com for this search string:
There's tons of information out there.
Go to Digikey, a major distributor, built around supplying parts to
developers. http://www.digikey.com
Type in this search string:
Then you can download the data sheet for the Omron V3B:
http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=39&M=V3B-4K
On page 1 of the data sheet, it shows a table of all the different models
and their features. Your model is the V3B-4. According to the table,
it only supports Track 2.
Then use a text search tool on the CCS compiler directories.
(I use a tool called Examine32. I can rapidly find anything in the
CCS directories with this tool). You will find an Example file and a
driver file for a card reader:
Inside the mcr.c file, it says:
Quote: | //// Pin connections for the OMRON V3A-6 //// |
Looking at the table in the data sheet again, it says the "-6" version
supports Track 1 and Track 2. That's the only difference between it
and the "-4" version. (Your version only supports Track 2).
But what's the difference between the "A" and "B" versions ?
With Google, you can find a FAQ that answers this question:
http://stripesnoop.sourceforge.net/faq.html#a18
Quote: |
Both the V3A and V3B family of readers are exactly the same physically.
The V3A family is white or [spam] colored, while the V3B family is black.
Sometimes the V3B family comes with a molex wires connected to all the
pins of the reader.
|
The CCS driver supports reading from both Track 1 and Track 2.
The mcr_read() function must be given pointers to buffers for the
output data when it reads Tracks 1 and 2. It looks like you can
force the mcr_read() function to ignore Track 1 if you pass it a null
pointer for the Track 1 buffer. Then it will just read Track 2.
I hope from this explanation that you learn how to do detective work
and find information on any electronic device. |
|
|
ElectricalNoob
Joined: 17 May 2007 Posts: 15
|
|
Posted: Thu May 24, 2007 6:55 am |
|
|
I guess my greatest problem with 'detective work' is that I assume too much. I assumed CCS did not have a built in function for card readers. So I did not even look there. After more searching I had found the datasheet for the V3B, but it was vaguely helpful to me at least. I had also emailed the company, but I still have no response (even used my university email and information). But what you did, all I can say is WOW. Thank you so much PCM Programmer. You are amazing. I can't believe you went through so much work to find this information for me.
Simeon |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Thu May 24, 2007 8:11 am |
|
|
Yes PCM programmer is a great resource.
We never want to loose him. |
|
|
ElectricalNoob
Joined: 17 May 2007 Posts: 15
|
|
Posted: Fri May 25, 2007 10:54 am |
|
|
I was able to read the card values. However I don't understand the values I have received. I've read that there is some sort of encryption on the cards, and you can't just straight out read the card numbers. I think I need to find a simple track 2 card that I can use to verify my results.
If anyone has played with card readers, any suggestions would be appreciated.
Simeon |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri May 25, 2007 1:54 pm |
|
|
I don't know. This sounds like you're trying to do something that
possibly may be improper. People are going to shy away from that. |
|
|
ElectricalNoob
Joined: 17 May 2007 Posts: 15
|
|
Posted: Sat May 26, 2007 8:43 am |
|
|
Ok, I solved the problem. It was very silly, but hopefully someone else working with card readers can avoid this. The MCR.c file was designed for 2 tracks, and I used pins B0 - clock output, B1 and B2 for the data outputs. But pins B1 and B2 should be used for track 1 card readers, so today I moved it to pins B4 and B5 and it worked fine. I was able to read my credit card number from the card, along with some other information.
Thank you PCM Programmer for all your help. You did most of the work, definately couldn't have done it without you. |
|
|
|