codebutler / farebot

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

CEPAS EZ-Link newer cards and Pixel #174

Closed mranostay closed 5 years ago

mranostay commented 5 years ago

Newer EZ-Link cards don't seem to work at all on a Google Pixel. And NfcTool can't detect it all even, but can confirm it is readable with an ACR122U reader + laptop.

Can dump the last 30 transactions using pn53x-tamashell + raw commands.

Working card (Expiry date: 07 Jan 2021)

NFC device: ACS / ACR122U PICC Interface opened
1 ISO14443B passive target(s) found:
ISO/IEC 14443-4B (106 kbps) target:
               PUPI: d5  40  4f  23  
   Application Data: 1c  00  00  11  
      Protocol Info: 77  81  85

Newer card that doesn't work (Expiry date: 29 Jan 2025)

NFC device: ACS / ACR122U PICC Interface opened
1 ISO14443B passive target(s) found:
ISO/IEC 14443-4B (106 kbps) target:
               PUPI: da  1a  6d  4b
   Application Data: 1c  2d  94  11
      Protocol Info: f7  71  85

Guess my main question is newer CEPAS cards using some new spec that isn't compatible with older readers (aka the NXP chip in the Pixel) or somewhere in the Android NFC stack it isn't validating that a supported card is in range?

mranostay commented 5 years ago

More debug.. so Pixel is detecting the NFC card

05-02 19:27:12.145  2188  2188 D NativeNfcTag: Connect to a tech with a different handle
05-02 19:27:12.246  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(672)] reSelect: tag is not active
05-02 19:27:12.246  2188  2513 E libnfc_nci: [ERROR:NativeNfcManager.cpp(319)] nfaConnectionCallback: NFA_SELECT_RESULT_EVT error: status = 3
05-02 19:27:12.247  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(1167)] nativeNfcTag_doCheckNdef: tag already deactivated
05-02 19:27:12.247  2188  2188 D NativeNfcTag: Check NDEF Failed - status = 3
05-02 19:27:12.247  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(540)] nativeNfcTag_doConnect: tag already deactivated
05-02 19:27:12.247  2188  2188 D NativeNfcTag: Connect Failed - status = 255
05-02 19:27:12.247  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(738)] nativeNfcTag_doReconnect: tag already deactivated
05-02 19:27:12.247  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(801)] nativeNfcTag_doDisconnect: tag already deactivated
05-02 19:27:12.508  2188  2188 D NativeNfcTag: Connect to a tech with a different handle
05-02 19:27:12.609  2188  2513 E libnfc_nci: [ERROR:NativeNfcManager.cpp(319)] nfaConnectionCallback: NFA_SELECT_RESULT_EVT error: status = 3
05-02 19:27:12.610  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(672)] reSelect: tag is not active
05-02 19:27:12.610  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(1167)] nativeNfcTag_doCheckNdef: tag already deactivated
05-02 19:27:12.610  2188  2188 D NativeNfcTag: Check NDEF Failed - status = 3
05-02 19:27:12.610  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(540)] nativeNfcTag_doConnect: tag already deactivated
05-02 19:27:12.610  2188  2188 D NativeNfcTag: Connect Failed - status = 255
05-02 19:27:12.610  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(738)] nativeNfcTag_doReconnect: tag already deactivated
05-02 19:27:12.610  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(801)] nativeNfcTag_doDisconnect: tag already deactivated
05-02 19:27:12.875  2188  2188 D NativeNfcTag: Connect to a tech with a different handle
05-02 19:27:12.977  2188  2513 E libnfc_nci: [ERROR:NativeNfcManager.cpp(319)] nfaConnectionCallback: NFA_SELECT_RESULT_EVT error: status = 3
05-02 19:27:12.977  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(672)] reSelect: tag is not active
05-02 19:27:12.977  2188  2188 E libnfc_nci: [ERROR:NativeNfcTag.cpp(1167)] nativeNfcTag_doCheckNdef: tag already deactivated
05-02 19:27:12.977  2188  2188 D NativeNfcTag: Check NDEF Failed - status = 3
mranostay commented 5 years ago

Testing with a new EZ-Link card and it works as expected. So likely it is a combo of the coil in the NFC card, and the antenna of the pixel is why the other one can't be read.