Skip to content
Michael Farrell edited this page Jan 29, 2017 · 1 revision

Greencard is the ticketing system used in Tasmania, Australia. It is an INIT E-Ticketing system using Mifare Classic 4K cards.

All values are stored in big-endian, and timestamps are stored in seconds since 1970-01-01 00:00 UTC. This needs to be converted to the timezone of the agency (Australia/Hobart).

TODO: translate this into Mifare block locations.

Work in progress reader: https://gist.github.com/micolous/c9f7ed9e4c593a7eed18371ec4266a4f

Transaction log

Transaction log starts at 0x800 and finishes at 0xcf0. Entries are 0x40 bytes long, and are in groups of 0x100 bytes aligned at 0x00, 0x50 and 0xa0. All offsets here will be specified relative to the start of the record. (eg: 0x10 in the record at offset 0xaa0 is 0xab0)

  • 0x00 = 0x33011024 (trips) / 0x31011000 (credits)

  • 0x04 = unit number??

  • 0x08 = ?

  • 0x0c = Timestamp

  • 0x10 = transaction number

  • 0x14 = ??

  • 0x18 = 00 00

  • 0x1a = route number, as ASCII (3 bytes)

  • 0x1d = 00 00 00

(for trips)

  • 0x20 = ??

  • 0x22 = fare charged

  • 0x24 = same as 0x34 (unknown)

  • 0x28 = new balance in cents

  • 0x2c = same as 0x3c (unknown)

  • 0x30 = ?? (seems to be similar to 0x20-0x23)

  • 0x34 = same as 0x24 (unknown)

  • 0x38 = new balance in cents

  • 0x3c = same as 0x2c (unknown)

(for credits)

  • 0x20 = ??

  • 0x24 = 0x00 0x00

  • 0x26 = new balance in cents

  • 0x2a = same as 0x3A (unknown)

  • 0x30 = ?? (seems to be similar to 0x20-0x23)

  • 0x24 = 0x00 0x00

  • 0x36 = new balance in cents

  • 0x3a = same as 0x2A (unknown)

Clone this wiki locally