Skip to content

codebutler/farebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

523 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FareBot

FareBot

Read your remaining balance, recent trips, and other information from contactless public transit cards using your NFC-enabled device.

FareBot runs on:

  • Android β€” built-in NFC (6.0+)
  • iOS β€” built-in NFC (iPhone 7+)
  • macOS (experimental) β€” PC/SC smart card readers or PN533 USB NFC readers
  • Web (experimental) β€” PN533 USB NFC readers (Chrome/Edge/Opera)

Download

Written By

Thanks To

Note

Huge thanks to the Metrodroid project, a fork of FareBot that added support for many additional transit systems. All features as of v3.1.0 (04a603ba) have been backported.

Supported Cards

Asia

Card Location Protocol Android iOS macOS Web
Beijing Municipal Card Beijing, China ISO 7816 βœ… βœ… βœ… βœ…
City Union China ISO 7816 βœ… βœ… βœ… βœ…
Edy Japan FeliCa βœ… βœ… βœ… βœ…
EZ-Link Singapore CEPAS βœ… βœ… βœ… βœ…
Kartu Multi Trip Jakarta, Indonesia FeliCa βœ… βœ… βœ… βœ…
KomuterLink Malaysia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
NETS FlashPay Singapore CEPAS βœ… βœ… βœ… βœ…
Octopus Hong Kong FeliCa βœ… βœ… βœ… βœ…
One Card All Pass South Korea ISO 7816 βœ… βœ… βœ… βœ…
Shanghai Public Transportation Card Shanghai, China ISO 7816 βœ… βœ… βœ… βœ…
Shenzhen Tong Shenzhen, China ISO 7816 βœ… βœ… βœ… βœ…
Suica / ICOCA / PASMO Japan FeliCa βœ… βœ… βœ… βœ…
T-money South Korea ISO 7816 βœ… βœ… βœ… βœ…
T-Union China ISO 7816 βœ… βœ… βœ… βœ…
Touch 'n Go Malaysia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Wuhan Tong Wuhan, China ISO 7816 βœ… βœ… βœ… βœ…

Australia & New Zealand

Card Location Protocol Android iOS macOS Web
Adelaide Metrocard Adelaide, SA DESFire βœ… βœ… βœ… βœ…
BUSIT Waikato, NZ Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Manly Fast Ferry Sydney, NSW Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Metrocard Christchurch, NZ Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Myki Melbourne, VIC DESFire βœ… βœ… βœ… βœ…
Opal Sydney, NSW DESFire βœ… βœ… βœ… βœ…
Otago GoCard Otago, NZ Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SeqGo Queensland Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SmartRide Rotorua, NZ Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SmartRider Perth, WA Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Snapper Wellington, NZ ISO 7816 βœ… βœ… βœ… βœ…

Europe

Card Location Protocol Android iOS macOS Web
Bonobus Cadiz, Spain Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Carta Mobile Pisa, Italy ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Envibus Sophia Antipolis, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
HSL Helsinki, Finland DESFire βœ… βœ… βœ… βœ…
KorriGo Brittany, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Leap Dublin, Ireland DESFire βœ… βœ… βœ… βœ…
Lisboa Viva Lisbon, Portugal ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Mobib Brussels, Belgium ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Navigo Paris, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
OuRA Grenoble, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
OV-chipkaart Netherlands Classic πŸ”’ / Ultralight βœ… βœ…Β³ βœ… βœ…
Oyster London, UK Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Pass Pass Hauts-de-France, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Pastel Toulouse, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Rejsekort Denmark Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
RicaricaMi Milan, Italy Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SLaccess Stockholm, Sweden Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
TaM Montpellier, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Tampere Tampere, Finland DESFire βœ… βœ… βœ… βœ…
Tartu Bus Tartu, Estonia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
TransGironde Gironde, France ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
VΓ€sttrafik Gothenburg, Sweden Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Venezia Unica Venice, Italy ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
Waltti Finland DESFire βœ… βœ… βœ… βœ…
Warsaw Warsaw, Poland Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…

Middle East & Africa

Card Location Protocol Android iOS macOS Web
Gautrain Gauteng, South Africa Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Hafilat Abu Dhabi, UAE DESFire βœ… βœ… βœ… βœ…
Metro Q Qatar Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
RavKav Israel ISO 7816 (Calypso) βœ… βœ… βœ… βœ…

North America

Card Location Protocol Android iOS macOS Web
Charlie Card Boston, MA Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Clipper San Francisco, CA DESFire / Ultralight βœ… βœ… βœ… βœ…
Compass Vancouver, Canada Ultralight βœ… βœ… βœ… βœ…
LAX TAP Los Angeles, CA Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
MSP GoTo Minneapolis, MN Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Opus Montreal, Canada ISO 7816 (Calypso) βœ… βœ… βœ… βœ…
ORCA Seattle, WA DESFire βœ… βœ… βœ… βœ…
Ventra Chicago, IL Ultralight βœ… βœ… βœ… βœ…

Russia & Former Soviet Union

Card Location Protocol Android iOS macOS Web
Crimea Trolleybus Card Crimea Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Ekarta Yekaterinburg, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Electronic Barnaul Barnaul, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Kazan Kazan, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Kirov transport card Kirov, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Krasnodar ETK Krasnodar, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Kyiv Digital Kyiv, Ukraine Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Kyiv Metro Kyiv, Ukraine Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
MetroMoney Tbilisi, Georgia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
OMKA Omsk, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Orenburg EKG Orenburg, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Parus school card Crimea Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Penza transport card Penza, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Podorozhnik St. Petersburg, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Samara ETK Samara, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SitiCard Nizhniy Novgorod, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
SitiCard (Vladimir) Vladimir, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Strizh Izhevsk, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Troika Moscow, Russia Classic πŸ”’ / Ultralight βœ… βœ…Β³ βœ… βœ…
YarGor Yaroslavl, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Yaroslavl ETK Yaroslavl, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Yoshkar-Ola transport card Yoshkar-Ola, Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Zolotaya Korona Russia Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…

South America

Card Location Protocol Android iOS macOS Web
Bilhete Único SΓ£o Paulo, Brazil Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…
Bip! Santiago, Chile Classic πŸ”’ βœ…ΒΉ ❌ βœ… βœ…

Taiwan

Card Location Protocol Android iOS macOS Web
EasyCard Taipei Classic πŸ”’ / DESFire βœ… βœ…β΄ βœ… βœ…

Identification Only (Serial Number)

These cards can be detected and identified, but their data is locked or not stored on-card:

Card Location Protocol Reason Android iOS macOS Web
AT HOP Auckland, NZ DESFire Locked βœ… βœ… βœ… βœ…
Holo Oahu, HI DESFire Not stored on card βœ… βœ… βœ… βœ…
Istanbul Kart Istanbul, Turkey DESFire Locked βœ… βœ… βœ… βœ…
Nextfare DESFire Various DESFire Locked βœ… βœ… βœ… βœ…
Nol Dubai, UAE DESFire Locked βœ… βœ… βœ… βœ…
Nortic Scandinavia DESFire Locked βœ… βœ… βœ… βœ…
Presto Ontario, Canada DESFire Locked βœ… βœ… βœ… βœ…
Strelka Moscow Region, Russia Classic πŸ”’ Locked βœ…ΒΉ ❌ βœ… βœ…
Sun Card Orlando, FL Classic πŸ”’ Locked βœ…ΒΉ ❌ βœ… βœ…
TPF Fribourg, Switzerland DESFire Locked βœ… βœ… βœ… βœ…
TriMet Hop Portland, OR DESFire Not stored on card βœ… βœ… βœ… βœ…

Platform Compatibility

Protocol Android iOS macOS Web
CEPAS βœ… βœ… βœ… βœ…
FeliCa βœ… βœ… βœ… βœ…
ISO 7816 βœ… βœ… βœ… βœ…
MIFARE Classic βœ…ΒΉ ❌ βœ… βœ…
MIFARE DESFire βœ… βœ… βœ… βœ…
MIFARE Ultralight βœ… βœ… βœ… βœ…
NFC-V / Vicinity βœ… βœ… βœ…Β² ❌

ΒΉ Requires NXP NFC chip β€” most Samsung and some other Android devices use non-NXP controllers and cannot read MIFARE Classic. Β² PC/SC readers only. PN533-based USB readers do not support NFC-V. Β³ Ultralight variant only. ⁴ DESFire variant only. πŸ”’ Requires encryption keys β€” see Cards Requiring Keys.

Cards Requiring Keys

Some MIFARE Classic cards require encryption keys to read. You can obtain keys using a Flipper Zero, Proxmark3, or MFOC. These include:

  • Bilhete Único
  • Charlie Card
  • EasyCard (older MIFARE Classic variant)
  • OV-chipkaart
  • Oyster
  • And most other MIFARE Classic-based cards

Flipper Zero Integration

FareBot supports connecting to a Flipper Zero to browse and import NFC card dumps and MIFARE Classic key dictionaries.

Platform USB Bluetooth
Android Yes Yes
iOS β€” Yes
macOS Yes β€”
Web Yes Yes

From the home screen menu, tap Flipper Zero to connect via USB serial or Bluetooth Low Energy, browse the /ext/nfc file system, select card dump files (.nfc), and import them into your card history. You can also import the Flipper user key dictionary (mf_classic_dict_user.nfc) into the app's global key store, which is used as a fallback when reading MIFARE Classic cards.

Building

$ git clone https://github.com/codebutler/farebot.git
$ cd farebot
$ make              # show all targets
Command Description
make android Build Android debug APK
make android-install Build and install on connected Android device (via adb)
make ios Build iOS app for physical device
make ios-sim Build iOS app for simulator
make ios-install Build and install on connected iOS device (auto-detects device)
make desktop Run macOS desktop app (experimental)
make web Build web app (experimental, WebAssembly)
make web-run Run web app dev server with hot reload
make test Run all tests
make clean Clean all build artifacts

A development container is available for sandboxed development with Claude Code.

Tech Stack

Project Structure

  • base/ β€” Core utilities, MDST reader, ByteArray extensions
  • card/ β€” Shared card abstractions
  • card/*/ β€” Card protocol implementations (classic, desfire, felica, etc.)
  • transit/ β€” Shared transit abstractions (Trip, Station, TransitInfo, etc.)
  • transit/*/ β€” Transit system implementations (one per system)
  • flipper/ β€” Flipper Zero integration (RPC client, transport abstractions, parsers)
  • app/ β€” KMP app framework (UI, ViewModels, DI, platform code)
  • app/android/ β€” Android app shell (Activities, manifest, resources)
  • app/ios/ β€” iOS app shell (Swift entry point, assets, config)
  • app/desktop/ β€” macOS desktop app (experimental, PC/SC + PN533 + RC-S956 USB NFC)
  • app/web/ β€” Web app (experimental, WebAssembly via Kotlin/Wasm)

License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

Read data from public transit cards using your NFC Android phone!

Resources

License

Stars

Watchers

Forks

Packages

No packages published