farebot icon indicating copy to clipboard operation
farebot copied to clipboard

Support for Boston MBTA Charlie Cards

Open Daenyth opened this issue 10 years ago • 21 comments

I'd really love to see support for these. How can I help gather info to make this happen?

Daenyth avatar Nov 07 '13 16:11 Daenyth

Not quite sure, but I think CharlieCard is using MIFARE Classic---does anyone have any info on this?

jonathanahn avatar Nov 07 '13 16:11 jonathanahn

Wikipedia says MIFARE and has some other info as well - similar systems. I'm not sure if it's useful or not.

http://en.wikipedia.org/wiki/CharlieCard

Daenyth avatar Nov 07 '13 17:11 Daenyth

Hmm... I can check later when I get home. I was also thinking of adding MBTA to the system these days.

jonathanahn avatar Nov 07 '13 18:11 jonathanahn

I was interested in this in the past - I believe MBTA is MiFare classic, but it is encrypted. Given that farebot now supports other cards, provided the encryption keys, I think it would be possible.

alecloudenback avatar Nov 16 '13 23:11 alecloudenback

Yeah my nexus can't read CharlieCard so I assume that's correct.

On a quasi-related note, now I am wondering what other contributors here are using (in terms of nfc readers-phones or devices) to read data. I might just get a reader on e-bay or something since there are fair amount of cities using MiFare Classic system.

jonathanahn avatar Nov 18 '13 00:11 jonathanahn

Is there any way I can help move this process along?

Daenyth avatar Dec 16 '13 16:12 Daenyth

I don't have any data w/ me (I can't read MiFare Classic cards w/ my nexus) so unless anyone else is willing to step up and start gathering some data for this, I think this will be on halt for now. If you have some trip/station data to contribute, that would be an awesome starting point, I think.

Thanks!

jonathanahn avatar Dec 20 '13 04:12 jonathanahn

Happy to gather data, unsure about the process. I am able to read the MiFare Classic CharlieCard on my HTC One, but of course need the encryption keys to make the data useful. What can I do from here to provide data that is useful to you?

Scanning the card, the ID read (when converted from hex to dec) does match the number printed on the card, but of course the rest of the data is encrypted.

Info on the old analysis for those curious: http://web.mit.edu/zacka/www/mbta.html

TrevorSayre avatar Feb 14 '14 17:02 TrevorSayre

One issue is that a lot of phones don't support MiFare Classic emulation due to licensing concerns. The Galaxy Nexus was able to, but I don't think later Nexus versions are able. I don't know about Galaxy S[N] phones.

On Fri, Feb 14, 2014 at 12:38 PM, Trevor Sayre [email protected]:

Happy to gather data, unsure about the process. I am able to read the MiFare Classic CharlieCard on my HTC One, but of course need the encryption keys to make the data useful. What can I do from here to provide data?

Reply to this email directly or view it on GitHubhttps://github.com/codebutler/farebot/issues/68#issuecomment-35106103 .

alecloudenback avatar Feb 14 '14 18:02 alecloudenback

I have a nexus 5 and could get access to a galaxy nexus if needed if I could get clear directions on things I could do to help

Daenyth avatar Feb 14 '14 18:02 Daenyth

That seems correct. It does not seem reasonable to emulate MiFare Classic with Android: http://stackoverflow.com/a/20068329/1736092 https://jedicorp.com/security/nfc-cloning-mifare-classic-smartcard/

May need custom ROMs to emulate the card, which is not a viable solution for a general purpose app.

TrevorSayre avatar Feb 14 '14 18:02 TrevorSayre

You don't need emulation to read the card, but some phones do not support reading these tags at all.

codebutler avatar Feb 14 '14 23:02 codebutler

Are there not low cost NFC shields for either Raspberry Pi or Arduino? With android fun.

DefyMiners avatar Jan 07 '15 10:01 DefyMiners

I started coding it but I need more dumps. Especially I need annotated dumps with balance, recent topups and recent trips.

phcoder avatar Aug 27 '18 09:08 phcoder

@phcoder how do you get that data? I have a nexus 5x I could try with

Daenyth avatar Aug 27 '18 11:08 Daenyth

@Daenyth Mifare Classic Tool, Farebot or metrodroid on pixel 2. Idk if Nexus 5X supports mfc. And you need keys. Keys are avilable on the internet or ask me privately where to find them

phcoder avatar Aug 27 '18 12:08 phcoder

I think I've managed to decode the structures but I can't recover dates yet as I have no dump with a known trip or topup timestamp and price/amount.

phcoder avatar Aug 27 '18 12:08 phcoder

I'll install the tool and see what I can get. Can you send me an email to discuss? daenyth@gmail.

Daenyth avatar Aug 28 '18 09:08 Daenyth

APK with first version: https://drive.google.com/file/d/1dsyH2XNjJLSQd6C0ev9ArYcFrO9RggAm/view?usp=sharing

phcoder avatar Sep 06 '18 00:09 phcoder

@phcoder I would love to ask you privately where to find keys but I can't find a way to contact you privately (via email or any other means)! I have some keys but using Mifare Classic Tools and my keys I am unable to write to certain sectors on my CharlieCards because I am missing Key B for those sectors. Can you provide contact info?

chrisknepper avatar Mar 06 '19 19:03 chrisknepper

Any updates on putting this in?

jpbulman avatar Jan 10 '20 18:01 jpbulman