11.2. APDU Commands over VCOM

Sending and Receiving Applet APDU Commands on VCOM using a Serial Terminal Emulator.

11.2.1. COM port parameters

Parameter

Value

Baud Rate

115200 bit/s

Data bits

8 Databits

Parity

No Parity

Stop Bits

1 Stop bit

FlowControl

Enable DTR

11.2.2. VCOM Format

Each APDU/command to be sent over the VCOM bridge has a 4 bytes header, the APDU to send follows as payload. The response contains the same header, followed by the response payload.

Byte

Description

1

Command

  • 00: SoftReset / Fetch ATR

  • 01: Other commands

2

Node Address

3

Len MSB

4

Len LSB

11.2.3. Example Commands

The example shows the commands strings to be sent over VCOM and some parsing of the commands/responses

11.2.3.1. Soft Reset/ATR Response

  • Soft Reset / Request ATR .

Field

Bytes in Hex

Command

00 00 00 00

VCOM Header

-

APDU

-

Response

00 00 00 23 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F

VCOM Header

00 00 00 23

Atr Response

-- -- -- -- 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F

11.2.3.2. Select IOT Applet

Select the SE050 IoT applet

Field

Bytes in Hex

Command

01 00 00 15 00 A4 04 00 0F A0 00 00 03 96 54 53 00 00 00 01 03 00 00 00 00

VCOM Header

01 00 00 15

APDU

-- -- -- -- 00 A4 04 00 0F A0 00 00 03 96 54 53 00 00 00 01 03 00 00 00 00

Response

01 00 00 09 03 01 00 3F FF 01 0B 90 00

VCOM Header

01 00 00 09

APDU Response

-- -- -- -- 03 01 00 3F FF 01 0B 90 00

applet Version

appletVersion in TLV with Tag1, (Len=7)

-- -- -- -- -- -- -- -- 03 01 00 3F FF 01 0B

11.2.3.3. Get applet Version

Gets the applet version information.

Field

Bytes in Hex

Command

01 00 00 04 80 04 00 20

VCOM Header

01 00 00 04

APDU

-- -- -- -- 80 04 00 20

Response

01 00 00 0D 41 82 00 07 03 01 00 3F FF 01 0B 90 00

VCOM Header

01 00 00 0D

APDU Response

-- -- -- -- 41 82 00 07 03 01 00 3F FF 01 0B 90 00

applet Version

appletVersion in TLV with Tag1, (Len=7)

-- -- -- -- -- -- -- -- 03 01 00 3F FF 01 0B

11.2.3.4. GetRandom

Gets x(8) byte random data from the SE050.

Field

Bytes in Hex

Command

01 00 00 0D 80 04 00 49 00 00 04 41 02 00 08 00 00

VCOM Header

01 00 00 0D

APDU

-- -- -- -- 80 04 00 49 00 00 04 41 02 00 08 00 00

Response

01 00 00 0E 41 82 00 08 B5 47 3C 8C A5 16 AC 31 90 00

VCOM Header

01 00 00 0E

APDU Response

-- -- -- -- 41 82 00 08 B5 47 3C 8C A5 16 AC 31 90 00

RandomData

-- -- -- -- -- -- -- -- B5 47 3C 8C A5 16 AC 31

11.2.3.5. GetUID

UID is an object with Object ID = 0x7FFF0206.

Field

Bytes in Hex

Command

01 00 00 13 80 02 00 00 00 00 0A 41 04 7F FF 02 06 43 02 00 12 00 00

VCOM Header

01 00 00 13

APDU

-- -- -- -- 80 02 00 00 00 00 0A 41 04 7F FF 02 06 43 02 00 12 00 00

Response

01 00 00 18 41 82 00 12 04 00 50 01 55 55 55 55 55 55 55 04 FF FF FF FF FF FA 90 00

VCOM Header

01 00 00 18

APDU Response

-- -- -- -- 41 82 00 12 04 00 50 01 55 55 55 55 55 55 55 04 FF FF FF FF FF FA 90 00

UID

UID in TLV with Tag1

-- -- -- -- -- -- -- -- 04 00 50 01 55 55 55 55 55 55 55 04 FF FF FF FF FF FA