Read eVRC smart card SK by PC/SC

93 Views Asked by At

I'm trying to use PC/SC in PHP to read the eVRC vehicle technical license from Slovakia.

I connect to the card, but when I want to find out the files with the command: 00A4040C0A0000004564556522D3031 (A0000004564556522D3031 is AID SK), so I get result 6A8A (File not found).

commands:

$context = scard_establish_context();
$readers = scard_list_readers($context);
$reader = $readers[0];
echo "Using reader: ", $reader, "\n";
$connection = scard_connect($context, $reader);
var_dump($connection);
// AID SK: A0000004564556522D3031
$CMD = "00A4040C0A0000004564556522D3031";
$res = scard_transmit($connection, $CMD);
var_dump($res);

result:

Using reader: Generic Smart Card Reader Interface 0
resource(5) of type (PC/SC Connection)
string(4) "6A82"
File not found

I am using XAMPP and the php_pcsc.dll library from pecl.php.net/package/pcsc/0.5.1/windows for PHP 7.4

Am I doing something wrong (wrong command)?

Thank you for the advice.

Martin

0

There are 0 best solutions below