I try to communicate with a smartcard using this code:
It works just fine, except for one crucial detail: I can only get 258 bytes. I'm guessing that means 256 bytes + 2 response status bytes, so in reality I can only get 256 bytes.
But the thing is that I am certain that the response should be ~1300 bytes. I can tell because in the first 256 bytes is a length indicator. The response is also in standard TLV encoding, so I've been able to verify using online tools that my length calculation is correct.
So I'm wondering, should I do something special to get more than 256 bytes? Am I supposed to somehow wrap the Wait For in a loop somehow and wait for more events, or how is this supposed to work? (I have added Log() after the Wait For, to see if it automatically gets more than one event, which doesn't happen.)
B4X:
TagTech.RunAsync("TT", "transceive", Array(Array As Byte(0x00, 0xCB, 0x3F, 0xFF, 0x05, 0x5c, 0x03, 0x5F, 0xC1, 0x01, 0x00)), 0)
Wait For TT_RunAsync (Flag As Int, Success As Boolean, Result As Object)
It works just fine, except for one crucial detail: I can only get 258 bytes. I'm guessing that means 256 bytes + 2 response status bytes, so in reality I can only get 256 bytes.
But the thing is that I am certain that the response should be ~1300 bytes. I can tell because in the first 256 bytes is a length indicator. The response is also in standard TLV encoding, so I've been able to verify using online tools that my length calculation is correct.
So I'm wondering, should I do something special to get more than 256 bytes? Am I supposed to somehow wrap the Wait For in a loop somehow and wait for more events, or how is this supposed to work? (I have added Log() after the Wait For, to see if it automatically gets more than one event, which doesn't happen.)