I'm using a GEMALTO IDBRIDGE K30 connected over USB to an Android device.
First I'm sending a PC_to_RDR_IccPowerOff message like this.
byte[] data= new byte[]{
(byte) 0x62,
(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00,
(byte) 0x00,
(byte) 0x00,
(byte) 0x00, (byte) 0x00};
UsbInterface intf = _usbDevice.getInterface(0);
UsbEndpoint outputEndpoint = intf.getEndpoint(1);
UsbEndpoint inputEndpoint = intf.getEndpoint(0);
intf.getEndpointCount();
UsbDeviceConnection connection = _usbManager.openDevice(_usbDevice);
connection.claimInterface(intf, forceClaim);
//activate card for apdu
final int dataTransferred = connection.bulkTransfer(inputEndpoint, data, data.length, TIMEOUT);
Log.e(SIGNATURE_LOG, String.format("Written %s bytes to the dongle. Data written: %s", data.length, byteArrayToHexArrayString(data)));
As response i get
Message received of lengths 64 and content: [80, 18, 00, 00, 00, 00, 00, 00, 00, 00, 3B, DF, 18, 00, 81, 31, FE, 58, 80, 31, 90, 52, 41, 01, 64, 05, C9, 03, AC, 73, B7, B1, D4, 44, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
After this i wait 5 seconds and than i try to send an APDU Select command with PC_to_RDR_XfrBlock.
byte[] data2= new byte[]{
(byte) 0x6F,
(byte) 0x10, (byte) 0x00, (byte) 0x00, (byte) 0x00,
(byte) 0x00,
(byte) 0x01,
(byte) 0x00,
(byte) 0x00, (byte) 0x00,
(byte) 0x00,
(byte) 0x00,
(byte) 0x0C,
(byte) 0x00, (byte) 0xA4, (byte) 0x04, (byte) 0x00,
(byte) 0x07, (byte) 0xA0, (byte) 0x00, (byte) 0x00,
(byte) 0x01, (byte) 0x18, (byte) 0x45, (byte) 0x4E,
(byte) 0x15,};
As Response I get this what is an Error F4 with the Description PROCEDURE BYTE CONFLICT:
Message received of lengths 64 and content: [80, 00, 00, 00, 00, 00, 01, 40, F4, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
Can anybody help me? I don´t understand what i am doing wrong.