MetroCard

Decoding Dual-Track MetroCards - Track 1-2

This is a single track that is twice the width of a normal track, as per ISO 7811. It holds variable data that is read and written to by turnstiles and other fare collection devices.

Field #

Track 1-2 Content

Offset

Length

Extracting information

1

Start Sentinel

0

10

0011010111

2

Time Last Used (1)

10

2

See Time Decoding below

3

Card Sub-Type

12

6

See CardTypes

4

Time Last Used (2)

18

6

See Time Decoding below

5

Date Last Used

24

10

See Date Decoding below

6

Times Used

34

6

Simple binary -> decimal, this is incremented with each use, except xfers

7

Expiration Date

40

10

See Date Decoding below, this is the date when unlimited cards expire

8

Transfer Bit

50

1

1 if last use is valid for a transfer, 0 otherwise

9

Last Used ID

51

15

See LastUsed

10

Card Value

66

16

Simple binary -> decimal gives you the card value in cents

11

Purchase ID

82

16

See VendingMachines

12

Unknown

98

20

Anyone know?

Decoding Dual-Track MetroCards - Track 3

This track contains static data that is written only when the card is manufactured.

Field #

Track 3 Content

Offset

Length

Extracting information

1

Start Sentinel

0

15

000000011000111

2

Card Type

15

4

See CardTypes

3

Unknown

19

4

??

4

Expiration Date

23

12

See Time Decoding below, this is the hard expiration date found on the back of the card

5

Unknown

35

4

??

6

Constant

39

8

00001101

7

Unknown

47

8

??

8

Serial Number

55

80

Simple binary -> decimal

9

Unused

135

16

--

10

Unknown

151

16

??

11

End Sentinel

167

93

00100101001100100110100101100101010011001010010 1001100110101010011010010101001101001010110101

Decoding

Time Decoding

Concatenate track 1-2 fields #2 and #4, convert binary -> decimal, multiply by 6, result is number of minutes since 01:00 (1 AM) that the card was last used.

Date Decoding

Dates can be determined by converting the field from binary to decimal (call this x), and performing the following calculations:

Other links

last edited 2005-05-23 17:36:02 by TheAutomator