[SUCS Devel] Door software
frosty at sucs.org
Mon Jul 30 09:55:56 BST 2007
On 7/30/07, Justin Mitchell <arthur at sucs.org> wrote:
> the old card reader hardware read only track 2 (numeric only)
> which contains a start char, the card number, a seperator, and then
> other junk and a stop char.
> the other junk tends to be stuff like expiry dates and isnt in
> any predicatable format that i could see.
> so if you take only the stuff between the start char and the seperator
> then you can cope with any card type.
The current swipe card code (which Dave did, a while ago), looks for
the card reader returning a value between these two markers:
STARTPAT = "%N?;"
ENDPAT = "?+N?"
It then checks to see whether any of a set of numbers match any of the
number it's read in. For instance, if it has 2222 in it anywhere, it's
a student union card. If it has 633191 in it, it's apparently a
WHSmiths card. And so on.
I presume this is reading the same stuff? Are those the start and stop
chars you mentioned?
More information about the Devel