MBS - SmartCardMBS

Hi, I’m trying to use “SmartCardMBS”, following the sample project named “SmartCard”.
I need to read personal data from a health card (Italy).

I can’t figure out how to use the “ReadFile” method.

Can I, using it, access the file directly? Or do I have to navigate step-by-step from node MF, to node DF1 and then, finally, to EF?

ReadFile takes MemoryBlock as parameter: but only the node id? or all the APDU command?

You can do your own transfers as you need.
ReadFile is a convenience function, which just takes the file ID and then does various commands to get the file.

So it does a select command (A4) and then a loop with read commands (B0)

but if the file is in a sublevel
(MF \ DF 1 \ EF_personal_data)

Can I directly use a single call to the ReadFile method, directly indexing the file containing the personal data?

dim mydata as MemoryBlock
Dim comando1 as new MemoryBlock(2)
comando1.UInt8Value(0) = &h3F
comando1.UInt8Value(1) = &h00
mydata = card.ReadFile(comando1)

PS: is sending the bytes in little or big endian?

for example, 3F00 should be written
3F
00

or

00
3F
?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.