codebutler / farebot

Read data from public transit cards using your NFC Android phone!
http://codebutler.github.com/farebot
GNU General Public License v3.0
967 stars 272 forks source link

Support for Boston MBTA Charlie Cards #68

Open Daenyth opened 10 years ago

Daenyth commented 10 years ago

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

jonathanahn commented 10 years ago

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

Daenyth commented 10 years ago

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

jonathanahn commented 10 years ago

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

alecloudenback commented 10 years ago

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.

jonathanahn commented 10 years ago

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.

Daenyth commented 10 years ago

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

jonathanahn commented 10 years ago

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!

TrevorSayre commented 10 years ago

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

alecloudenback commented 10 years ago

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 notifications@github.comwrote:

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 .

Daenyth commented 10 years ago

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

TrevorSayre commented 10 years ago

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.

codebutler commented 10 years ago

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

DefyMiners commented 9 years ago

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

phcoder commented 6 years ago

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

Daenyth commented 6 years ago

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

phcoder commented 6 years ago

@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 commented 6 years ago

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.

Daenyth commented 6 years ago

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

phcoder commented 6 years ago

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

chrisknepper commented 5 years ago

@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?

jpbulman commented 4 years ago

Any updates on putting this in?