Thanks for your answer, there's a lot to unpack in it! I'll just have to cut it up into pieces so I don't miss anything.
there was a bug related to the number of bytes in the response, allegedly fixed in android P.
Understood. In that case it should not affect me, because I'm testing this with Android 14.
However, I do wonder if you have a source? I do have users with Android P and I'd like to read more to better understand if this would affect them.
there is way to query the maxresponse size.
I'll see if I can find it, it's not obvious to me at the moment. However, it's a modern card so we can
probably assume that it's ~64k.
if the response begins with AF, a loop is possible. in fact, required if you need more that what would be returned in the first response.
The response does not begin with AF, but out of curiousity: How would I do that look if that was the case? Would the Wait For just be called several times or would I have to do something more involved?
EDIT after reading more online: The response does not begin with AF, but if it did I think I should just keep sending 00 C0 00 00 XX until 61 XX indicates there is nothing more to receive. Is this correct?
although you're using transceive, your command looks like a typical apdu command.
Yes, it's an apdu command. My understanding was that I should use transceive, is that not correct?
the last byte (so-called Le) indicates what you are expecting back. it looks like you have 0. 0 = 256 bytes max. to allow for the maximum (and assuming your device does not suffer from the bug), Le needs to be 2 or 3 bytes, depending on what you set Lc at. for this to work, extended apdu's need to be supported. since you already think the response should be 1000 bytes, that means a 1 byte Le won't work. you need to see if you can extend the command and include 2 bytes instead of 1 at the end.
This is really very interesting. I started with doing this approach, that you mentioned:
TagTech.RunAsync("TT", "transceive", Array(Array As Byte(0x00, 0xCB, 0x3F, 0xFF, 0x05, 0x5c, 0x03, 0x5F, 0xC1, 0x01, 0xFF, 0xFF)), 0)
Wait For TT_RunAsync (Flag As Int, Success As Boolean, Result As Object)
I removed the last 0x00 and added 0xFF 0xFF instead. However, this just gave me a response of 0x67 0x00
I read this Wikipedia page for more info about apdu:
It clearly states that a zero limits to 256 bytes so that was an error you helped correct - thank you! But there clearly is something else I'm not understanding here.
Both you and the Wikipedia page states that for Le to be two bytes, I need to adjust Lc. The only way I can see to adjust Lc is to change it from 0x05 to 0x00 0x00 0x05. As best I can understand, this would be an "extended Lc", which in turn would make it possible to have a two-byte. So I did that:
TagTech.RunAsync("TT", "transceive", Array(Array As Byte(0x00, 0xCB, 0x3F, 0xFF, 0x00, 0x00, 0x05, 0x5c, 0x03, 0x5F, 0xC1, 0x01, 0x00, 0x00)), 0)
Wait For TT_RunAsync (Flag As Int, Success As Boolean, Result As Object)
This gave the response of 0x67 0x00, which means "Incorrect length or address range error".
Any ideas?