Magnetic stripe encoding...Headache

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
My stupid magnetic stripe encoder software and hardware is very limited. It will only take 104 characters for track 2 of a magnetic stripe. The data on the card needs to be in ANSI/ISO BCD format, but my writer only takes 104 numeric characters (which is the limit for track 2).

ANSI/ISO BCD has many more characters per digit ie. 1=00001 etc etc..

How can I take numeric characters and have it end up in ansi on the card?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I'm having a hard time understanding what the issue here is. You simply just create a BCD string for your data and slap it on the card. Is your problem the actual creation of the BCD string?
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
When I convert to BCD I have like 120 characters.. More than the 104 max.... Am I dumb and missing something?
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
I will say I know how to translate to BCD ie 1= 0001 etc, but I dont know how to string the numbers together....
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
I guess I don't know what language I should be using.

What about the character limit? Any ideas?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
That sounds like a hardware limitation, you could get around it by using a different encoding schema, but then you will break compatibility with other systems that those cards would be used in.

I could be totally wrong though, I've never worked with that kind of hardware/software so I'm just kinda guessing here with the information you posted.
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
The ISO standard for track 2 on magnetic stripes is 104 characters.
I have like 25 ASCII characters. But it needs to be in ANSI BCD..
Bah.. this sux
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
I'm having a bad time with the stupid web design / scripts on here so I have some difficulty in responding to the PM you sent about this, so I'll reply here.

I sort of see what you're trying to understand about BCD and packing it (string encoding); I hadn't recalled the specifics of that ANSI/ISO form of BCD used in the context you're talking about, thanks for the link/information. It has been a long time since I've had much use for BCD.

Uh I think one of the main things you're possibly missing is that BCD = a string of *bits*.
So if I write "1011" that's 4 digits of ASCII, yes, composed of 4 numeric decimal digits strung together, yes, but I'm just showing that as a text representation of something that is REALLY just 4 bits in size in the physical encoding.

So when you say:
but my writer only takes 104 numeric characters (which is the limit for track 2).

ANSI/ISO BCD has many more characters per digit ie. 1=00001 etc etc..

How can I take numeric characters and have it end up in ansi on the card?

what seems to be the case is that it's taking 104 digit characters as input, but what you must realize is that each of those digit characters that you'd feed in (in ASCII I guess) is actually expanding to *5* bits (one 4-bit-BCD + 1-bit parity) on the medium.

So according to the table you sent input characters 0-9 should be directly converted to the appropriate 5 bit BCD sequence.
Apparently ';' = 0xB and '?' = 0xF in 4-bit BCD code ignoring the parity bit that's calculated from the rest of the bits in the code.

So it seems impossible to me that you could have your software/system's input be characters of 104 decimal digits since there would be no way to represent these BCD characters which are also in the table you linked: ": ; < = > ?".

However if your software/hardware takes hex characters then for each 4 bit hex character there would be written a 5-bit sequence on the media (if it adds the parity automatically), and you could encode all 16 character set characters: "01234567890:;<=>?".

Though that does conflict with the link you mentioned:
Track 2
75BPI
5 bits per character
40 Numeric characters

So since you say your setup can take in 104 characters, that's much more than the 40 (excluding the LRC) that your link says actually can possibly be used if each input specified character is generating one BCD 5-bit tuple worth of data.

Let's see.. 37 characters * 4 bits / character (ignoring parity bits and ignoring SS FS and ES and the LRC) = 148 bits of actual user specifiable data.

So if you can specify 104 characters, that can't possibly be 1 bit per character (e.g. "0" or "1" only) since you wouldn't have enough bit-characters to generate the 37 or more BCD characters that your link says are available on T2.

Maybe I'm mixing up two unrelated problems. Maybe you sent the link only as an example of ANSI/ISO BCD encoding and it has nothing to do with the track formatting stuff elsewhere on the page.

You said:
I need to encode ;xxxxxxx=xxxx? the x's represent ascii digits. the semi colon and ? both have corresponding BCD values but I don't know how to string it all together properly.

Let's see
";0123456=0123?"
"123456789ABCD" = 0xD total characters = 13 (decimal); 13x4=52 4-BCD bit sequences;
13 x 5 = 65 (4-BCD + 1-parity) bit sequences.

So being able to specify 104 'characters' whether those characters were 'bits {0|1}' or hex-digits is certainly enough for your stated application, ignoring all the track formatting stuff in the link.

So what is the 'character' format of your input software/hardware? Is an single input 'character' defined as being among one of the following possibilities of alphabets:
01
0123456789
0123456789ABCDEF
0123456789:;<=>?

The answer to that will more or less imply what the encoding process is likely to be, though if you wanted to be fully explicit you could check the documents as to what the formatting of the output is and what if anything is done automatically by your devide (parity, framing characters, et. al.).

Also unknown is whether the thing is encoding from left to right or right to left or whatever, and what the order of 'bits' within each input specified character is.

I assume the bit ordering is likely pretty much sensible for an equivalence of ASCII to BCD (i.e. not backwards other than relative to the whole right-to-left / left-to-right stringing of the data stream physically).

So if each character is ASCII alphanumeric:
";0123456=0123?" = ";0123456=0123?"

If each character is ASCII HEX-BCD and the machine does the parity for you implicitly:
";0123456=0123?" = B0123456D0123F

If each character is ASCII binary then (ignoring the spaces added for clarity):
";0123456=0123?" = 11010 00001 10000 01000 11001 00100 10101 01101 10110 00001 10000 01000 10011

If each character is decimal-BCD then: well that'd be silly of them, so I assume it isn't this way unless the system can't generate things other than 0-9 or whatever.

...or they could be the right-to-left mirrored version of those depending on the ordering.

 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
The standard for track 2 for bank cards is 40 characters, in ASCII and I am under that, but the software's limitations and track 2's physical limitations are 104 characters.
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
Whats a good email for you quix.. I want to send you a PDF on my hardware, that has info on what kind of commands and limitations I am dealing with.
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0
Originally posted by: QuixoticOne


So when you say:
but my writer only takes 104 numeric characters (which is the limit for track 2).

ANSI/ISO BCD has many more characters per digit ie. 1=00001 etc etc..

How can I take numeric characters and have it end up in ansi on the card?

what seems to be the case is that it's taking 104 digit characters as input, but what you must realize is that each of those digit characters that you'd feed in (in ASCII I guess) is actually expanding to *5* bits (one 4-bit-BCD + 1-bit parity) on the medium.



No, thats the maximun amount
 

BadNewsBears

Diamond Member
Dec 14, 2000
3,426
0
0

If each character is ASCII binary then (ignoring the spaces added for clarity):
";0123456=0123?" = 11010 00001 10000 01000 11001 00100 10101 01101 10110 00001 10000 01000 10011


That is how it should be I beleive. Is that hows the BCD should be strung together?

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |