Home About SETS SETS Fleet Library Links Contact SETS Site Map
Tours and Events SETS Shop Help Needed Gallery Train Charters Under the Wires

SETS Magnetic-Stripe Ticketing

   
 
Welcome to the SETS Ticketing Page. Sydney's magnetic-stripe ticketing system and TravelPass will continue in operation on SETS and HCVA excursions. SETS will be introducing magnetic-stripe ticketing for its tours and events! For this we have arranged a new production run of magnetic-stripe Excursion Day-Rover tickets. We are now able to issue and validate magnetic-stripe tickets, to both the public and enthusiasts, on our special event bus and train excursions.

 SETS Magnetic-Stripe Ticketing Implementation
SETS Excursion Day Rover ticket being inserted in green machine

One of SETS's new Excursion Day Rover magnetic-stripe tickets being inserted into TR1 on our portable console with dual ticket reader unit.

SETS's magnetic-stripe ticket implementation is based on us re-commissioning withdrawn State Transit Automated Ticketing System (STATS) equipment. This equipment was made by AES Prodata and was previously installed in Sydney's State Transit bus fleet from mid-1992. In service each State Transit bus was originally fitted with a Datafare 2000 drivers' console wired to (usually) two magnetic-stripe ticket reader/writers, known as green machines. Re-implementation has required extensive reverse-engineering, as neither ERG/Vix nor Transport for NSW would provide any technical assistance.

Gaining access to this surplus equipment has enabled us to firstly re-equip selected preserved STA buses with fully functional magnetic-stripe ticketing installations, exactly as originally fitted. Secondly, the compact bus equipment has enabled us to build stand-alone portable console with dual ticket machine units that can be mains or battery powered (e.g. for use on our railway excursions). Both the Sydney ferry and railway implementations were based around large ticket vending machines (TVMs), booking office ticket vending machines (BOMs) and barrier gates, which were not considered feasible to re-implement due to size and weight. The compact STATS implementation is also more technically advanced and has greater security.

We have also reverse engineered the Sydney public transport magnetic-stripe data format, so we could now theoretically magnetically encode any Sydney bus, ferry or train magnetic-stripe ticket, although due to its origins only ticket types previously valid on STA buses are automatically processed by our AES Prodata installations. Interestingly all Sydney magnetic-stripe tickets can be manually read by the STATS equipment.

The data held on the magnetic-stripe of each Sydney ticket is normally 50 nibbles (4 bits) including the start and stop sentinels (which is equivalent is 25 bytes (8 bits) of data). The limited amount of data actually held on the stripe and the ingenuity of the original encoding, must also raise doubts about claims made that the original Sydney ticketing system was simply too complex to be translated to a contactless smartcard implementation.

In fact the 50 nibble magnetic-stripe is already able to handle three different types of ticket - periodical, multi-trip and time based, as well as an early trip history implementation (done by adding a extra 51 nibbles of data to the stripe on active bus TravelTen tickets). The conclusion must be that it was quite feasible for the originally planned T-Card to be a contactless smartcard incorporating all of the existing Sydney magnetic-stripe tickets types. The similar but newer Prodata magnetic-stripe ticket reader machines used on Melbourne buses (and later trams) from August 1996 even included a contactless smart card reader/writer function to permit this evolution.


 History Of Sydney's Public Transport Magnetic-Stripe Ticketing
ESR Opening day souvenir ticket from 23rd June 1979 UTA Hydrofoil FerryTen Ticket from 17th July 1989 ticket number 115671 issued by machine 602 at Manly UTA Green TravelPass Ticket from 31st July 1989 ticket number 126960 issued by machine 602 at Manly - from Rob O'Regan's web site STA Jet 10 Ticket from 10th August 1992 SRA Single Ticket Central to Edgecliff from day of AFC launch 10th May 1993 - from Rob O'Regan's web site Original ATL Abberfield Industries 1989 Gate as originally installed

The earliest magnetic stripe ticket system used in Sydney was that first used on the Eastern Suburbs Railway (ESR), which opened with a magnetic-stripe ticketing system, supplied by Cubic-ATL, on 23rd June 1979.

In 1989 the Sydney Ferry services (then) run by the Urban Transit Authority of NSW, including the Manly Ferry and (then) Hydrofoil services, became the second form of Sydney public transport to change over to magnetic-stripe tickets.

The tender for the ferry magnetic-stripe ticket system was awarded to Thorn Software Sciences (part of (then) Thorn-EMI) with local firm Abberfield Industries (of Brookvale). After installation and testing, the new system was in use for Manly Hydrofoil ticketing on Friday 7th July 1989, though the official public system start was Monday 10th July. The tickets were used for single, return, new ten-trip ("FerryTen"), and weekly, quarterly and yearly ("TravelPass") ticketing.

The introduction of discounted ten-trip FerryTen tickets marked an enhancement of ferry ticketing options, which assisted occasional ferry users, regular Hydrofoil users, and those in part-time work. The FerryTen multi-trip ticket was a carry-over from the pre-magnetic-stripe MetroTen concept previously adopted on Sydney Buses. The TravelPass periodicals were simply magnetic-stripe versions of the original flash-passes.


The original Thorn tickets were clearly designed with the principle of visually displaying as much data as possible to provide a backup to the magnetic-stripe data and to aid diagnostics. In particular the original Mk1 ferry tickets also showed a great deal of the data encoded on the magnetic-stripe on the front of the tickets. This printed data included; ticket serial number (6 digits), issuing machine number (3 digits), date of issue (6 digits), ticket price, transport mode, and type of ticket (single, 10-trip, weekly etc.). Mk1a tickets (after mid-April 1990) added the issue time (4 digits) in addition to all this data. Surviving examples of early single, return and FerryTen tickets would be rare, as the gates originally captured these tickets on entry for the last ride. Original ticket machine numbers were 60X at Manly and 10X at Circular Quay. For FerryTens, the number of remaining trips was displayed to the passenger by a vacuum fluorescent display on the gate.

The State Transit Authority of NSW (previously Urban Transit) commenced magnetic-stripe ticketing (branded "STATS") on buses on 31st August 1992, using AES Prodata equipment as described above. The stripe data was in the new all-mode compatible format. However as State Transit issued many magnetic-stripe tickets pre-encoded, the earliest tickets carried encoded issue dates prior to this system commencement date. For example a Green TravelPass bought on the 31st August had an issue (actually manufacture) date code "3C2" - i.e. 19th August 1992. An analysis of early ferry magnetic-stripe system tickets reveals the original ferry Thorn magnetic-stripe data format was also changed over to the new whole government public transport ticketing format during August 1992.

The State Rail Authority of NSW was the last organisation to roll out magnetic stripe ticketing across its NSW suburban and interurban rail network. CountryLink retained foldered paper tickets. The rail system equipment was progressively installed from mid-1992, with the official SRA AFC system commencement on the 10th May 1993. The SRA implementation was based around installing ticket vending machines (TVMs) and booking office machines (BOMs) at almost every station, but only having barrier gate equipment at principle stations. The stations with gates included city stations and main stations. The SRA ordered their equipment, including ticket machines and gates, from Cubic. The data format on State Rail issued magnetic-strip tickets again adhered to the common all-mode format. During this implementation the original ESR magnetic-stripe ticket barriers were entirely replaced with new Cubic equipment.

The original ferry barrier and ticket machine equipment was replaced with new equipment in early 1999 after a tender was awarded to AES Prodata around June 1997. This was the same design of equipment that was installed at Melbourne city railway stations in 1997-8. These machines added the feature of printing usage on the back of the single, return and ten-trip tickets. This AFC Equipment Co. barrier equipment was again changed in July 2012 to the current StateRail/Railcorp Cubic equipment. While a sample unit of the vintage Manly token-operated turnstiles was retained by the Sydney Heritage Fleet, no example equipment from the subsequently replaced automatic fare collection installations seems to have been retained.

On 31st July 2016 the era of magnetic stripe tickets on Sydney's public transport systems initially ended, after 37 years of use. The system's final all-mode date code was "965" (hex) (Midnight to 4 a.m. Monday), with the continuously looping day count having already passed through zero twice since 1992! From that date sales of magnetic-stripe single and return tickets by Transport for NSW ended, and all magnetic-stripe ticket equipment was closed. Even though withdrawn from sale, until that date, all previously purchased magnetic-stripe ticket types had remained operational.

However on 28th June 2019 the STATS magnetic-stripe ticket system was reintroduced by SETS and the HCVA. With installation assisted by SETS, original AES Prodata equipment was trialled with new ticket stock on the HCVA's MAN midi night wharves tour. This was the first occasion since 1st August 2016 where Sydney bus passengers could use magnetic stripe tickets in a green machine. It is believed that this is the first time anywhere in the world that a magnetic-stripe ticketing system has been returned to service.


 Data Format Of Sydney's Public Transport Magnetic-Stripe Ticketing

Decode Example 1 - STA Jetcat 10 Trip

Here is the Thorn format magnetic-stripe data read from the Hydrofoil FerryTen ticket dated 17th July 1989 as pictured above (undecoded):-

A3180EDBE3724EBC1E461CD372B80303CC72C6CB72A672E3726FA3

Here is the later format magnetic-stripe data read from a similar Jet 10 (Manly Jetcat 10 trip) ticket issued on 10th August 1992 also pictured above (undecoded):-

D4599FC18CCFC188889C4444443C2042263AA68CEBACCCC46D

Note the second nibble is even, so this is the XOR and even nibble bit reversal decode of the above data :-

13063B920C3B90001A8000007FE446025903B22A16000

Lets put some spaces in to make the fields clearer :-

1 3 06 3B9 20C 3B9 000 1A8 000 00 7FE 446 0 259 03B22 A16 000

As a verification of a successful magnetic-stripe decode, the ticket issue date code in the forth field "3B9" and the time code "20C" in the fifth field matches the 10th August 1992 date and 8:44 time printed on the ticket. The issuing machine number in fields 13/14 "259" (in hex) converts to 601 (in decimal) which is the other number visible on the ticket face.

Decode Example 2 - Pre-encoded STA Green TravelPass

Here is the magnetic-stripe data read from a State Transit pre-encoded Green TravelPass sold on the 31st August 1992. It is stamped with an expiry date of 7th September 1992 (undecoded):-

D79883F315ED280FAB35882A69999999109E4755E55555570D

Note the second nibble is odd, so this is the XOR and odd nibble bit reversal decode of the above data :-

710B3C44D3FA1FA116B0583F00000011975340DB00000

Again lets put some spaces in to make the fields clearer :-

7 1 0B 3C4 4D3 FA1 FA1 16B 058 3F 000 000 1 197 5340D B00 000

Being pre-encoded, the ticket was sold with its encoded validity period unset, as this is normally applied on its first insertion. But with the start and end dates, in fields 6 and 7, still showing the open date "FA1" and the "last scanned" date and time, in fields 11 and 12, as "000" it is clear this ticket has never been inserted in a green machine or gate.

Again as a verification of a successful magnetic-stripe decode beyond the open dates, the ticket origin field is "16B" which is STA and destination field is "058" which is Green TravelPass (zone validity), both matching the ticket artwork!

So the format of the data on the magnetic-stripe appears to be as follows :-
Note non-single tickets such as ten trip, day trippers and periodicals may omit some data fields or use some for different purposes from those indicated below. Also State Transit Bus TravelTens, once used, add another 51 digits of (hex) data following on from these standard fields.

Sydney Ferries Magnetic Stripe Ticket Decode

Note the numerals are hex (base 16) not decimal (base 10). Thus one character represents 16 values, two represents 256 different values, three - 4096 values and five - 1048576 values. Although the stripe is located in a similar place on the card to the tracks on credit and loyalty cards etc. (using tracks 1 & 2), the stripe encoding is a different custom format. It uses 4-bit (nibble) numerals, and relies on logic XOR and bit reversal coding. Also remember that in 1989 the typical desktop PC was based around an Intel '286 processor.

The date, time and station (for railway tickets) data example values - shown above - can be easily decoded from these pre-computed tables. Note this is a very large html file with a size of 8.66MB !



 
© Copyright 2019
Sydney Electric Train Society
www.sets.org.au