Closed Vantablack closed 7 years ago
yup, I am having trouble scanning my Nets Card, "Invalid Response"
Please do open a pull request, thank you!
Oh hey @codebutler! Thanks for closing this issue!
@Vantablack Are you able to read the card now after the fix?
@themakerman I currently do not have access to an Android device so can’t check for you. However it did work after I applied some changes see (https://github.com/Vantablack/farebot/commit/a0c1f97f433c2d363203936b1384c31c12b0be06) which I believe was committed in https://github.com/codebutler/farebot/commit/d3637bdff63201c2c65d13167c2cd7532f330651
@Vantablack it did worked. It's not updated in the production though on playstore.
@Vantablack Do you think since IOS 11 NFC has came up we can use the same cepas protocol for iOS users across island? I think majority people use iPhone in SG. Have you made any research on iOS capabilities to read SG transit cards?
@themakerman I don’t think iOS 11 Core NFC supports sending custom APDU. From the documentation, I think it only supports reading NDEF formatted tags only?
Issue
Hi I'm having an issue when attempting to scan a CEPAS 2.0 card and I'm getting Invalid Response
Error 1
After some digging, I got an error log which is full log here
From here I deduced that DesfireTagReader is called instead of CEPASTagReader. So I swapped the order in
TagReaderFactory.kt
Error 2
Error 1 was fixed but another was created (Error 2), full log here
And this was caused by the ArrayList having a size() of 0 and so I tried using Arrays [] instead by following what was done in v0.5
Error 3
Error 2 was fixed but Error 3 was created, full log here
It was due to invalid purses having null values for
getCAN
,getCSN
,getLastCreditTransactionHeader
,getLastTransactionRecord
andgetIssuerSpecificData
inCEPASPurse.java
, and adding @Nullable seems to solve the issue.Similar to this merge request, its seems like data is stored in purse 3 (I've tested 3 recent cards).
Possible Fix
I'm not sure if I should open a merge request but here's my current fixes.
https://github.com/Vantablack/farebot/commit/a0c1f97f433c2d363203936b1384c31c12b0be06