Closed PeteClubSeven closed 9 months ago
Hey just an update here. I couldn't find anything wrong but then I noticed that on my Android device when tapping a Satscard apparently the IsoDep.Timeout property on my device shows a timeout of 618 milliseconds which isn't long enough to perform the 1-second wait command. That would mean it's not really something you can influence because that's decided by the card protocol itself.
Hi, in my Flutter plugin where I use your library to communicate with Satscards and Tapsigners I'm encountering a strange problem. I've tested a bunch of functions which seem OK but the CKTapCard::Wait() function always triggers a strange exception when sending the bytes through IsoDep.transceive(). When searching online the error message I'm receiving typically means the message wasn't formatted correctly or there was some error receiving data from the NFC device. I wanted to make sure I wasn't experiencing data corruption and the data checks out.
Here is what the debugger is showing me inside TransportImpl::Send() once I call Wait() on a newly constructed CKTapCard:
And here is what the Java debugger shows is getting passed to IsoDep.transceive():
The Java version is a signed byte array but it is a binary match. Interestingly when I send the command the auth delay does actually decrease by one (as shown by subsequent Status commands), however we never actually receive a valid response from the CKTapCard. I've tested the following functions and none of them cause an Android exception to be thrown:
I will continue investigating, potentially checking different SDK versions but I really can't see why this is an issue. Currently I'm testing with a Fairphone 4 running Android 12 and my app is using SDK version 31 with NDK version 21.4.7075529.