@@ -27,18 +27,49 @@ The general structure of commands and responses is as follows:
2727| Return code | Description |
2828| ----------- | ----------------------- |
2929| 0x6400 | Execution Error |
30+ | 0x6400 | Wrong buffer length |
3031| 0x6982 | Empty buffer |
3132| 0x6983 | Output buffer too small |
33+ | 0x6984 | Data is invalid |
3234| 0x6986 | Command not allowed |
35+ | 0x6987 | Tx is not initialized |
36+ | 0x6B00 | P1/P2 are invalid |
3337| 0x6D00 | INS not supported |
3438| 0x6E00 | CLA not supported |
3539| 0x6F00 | Unknown |
40+ | 0x6F01 | Sign / verify error |
3641| 0x9000 | Success |
3742
3843---
3944
4045## Command definition
4146
47+ ### GET_DEVICE_INFO
48+
49+ #### Command
50+
51+ | Field | Type | Content | Expected |
52+ | ----- | -------- | ---------------------- | -------- |
53+ | CLA | byte (1) | Application Identifier | 0xE0 |
54+ | INS | byte (1) | Instruction ID | 0x01 |
55+ | P1 | byte (1) | Parameter 1 | 0x00 |
56+ | P2 | byte (1) | Parameter 2 | 0x00 |
57+ | L | byte (1) | Bytes in payload | 0x00 |
58+
59+ #### Response
60+
61+ | Field | Type | Content | Note |
62+ | --------- | -------- | ------------------ | ------------------------ |
63+ | TARGET_ID | byte (4) | Target Id | |
64+ | OS_LEN | byte (1) | OS version length | 0..64 |
65+ | OS | byte (?) | OS version | Non terminated string |
66+ | FLAGS_LEN | byte (1) | Flags length | 0 |
67+ | MCU_LEN | byte (1) | MCU version length | 0..64 |
68+ | MCU | byte (?) | MCU version | Non terminated string |
69+ | SW1-SW2 | byte (2) | Return code | see list of return codes |
70+
71+ ---
72+
4273### GET_VERSION
4374
4475#### Command
@@ -53,34 +84,35 @@ The general structure of commands and responses is as follows:
5384
5485#### Response
5586
56- | Field | Type | Content | Note |
57- | ------- | -------- | ---------------- | ------------------------------- |
58- | TEST | byte (1) | Test Mode | 0xFF means test mode is enabled |
59- | MAJOR | byte (2) | Version Major | 0..65535 |
60- | MINOR | byte (2) | Version Minor | 0..65535 |
61- | PATCH | byte (2) | Version Patch | 0..65535 |
62- | LOCKED | byte (1) | Device is locked | |
63- | SW1-SW2 | byte (2) | Return code | see list of return codes |
87+ | Field | Type | Content | Note |
88+ | --------- | -------- | ---------------- | ------------------------------- |
89+ | TEST | byte (1) | Test Mode | 0x01 means test mode is enabled |
90+ | MAJOR | byte (2) | Version Major | 0..65535 |
91+ | MINOR | byte (2) | Version Minor | 0..65535 |
92+ | PATCH | byte (2) | Version Patch | 0..65535 |
93+ | LOCKED | byte (1) | Device is locked | It'll always be 0 |
94+ | TARGET_ID | byte (4) | Target Id | |
95+ | SW1-SW2 | byte (2) | Return code | see list of return codes |
6496
6597---
6698
6799### INS_GET_ADDR
68100
69101#### Command
70102
71- | Field | Type | Content | Expected | |
72- | ------- | -------- | ------------------------- | ----------- | --- |
73- | CLA | byte (1) | Application Identifier | 0x99 | |
74- | INS | byte (1) | Instruction ID | 0x01 | |
75- | P1 | byte (1) | Request User confirmation | No = 0 | |
76- | P2 | byte (1) | Signature scheme | Ed25519 = 0 | |
77- | | | | Sr25519 = 1 | |
78- | L | byte (1) | Bytes in payload | (depends) | |
79- | Path[ 0] | byte (4) | Derivation Path Data | 0x80000000 | 44 |
80- | Path[ 1] | byte (4) | Derivation Path Data | 0x80000000 | 434 |
81- | Path[ 2] | byte (4) | Derivation Path Data | ? | |
82- | Path[ 3] | byte (4) | Derivation Path Data | ? | |
83- | Path[ 4] | byte (4) | Derivation Path Data | ? | |
103+ | Field | Type | Content | Expected |
104+ | ------- | -------- | ------------------------- | -------------- --- |
105+ | CLA | byte (1) | Application Identifier | 0x99 |
106+ | INS | byte (1) | Instruction ID | 0x01 |
107+ | P1 | byte (1) | Request User confirmation | No = 0 |
108+ | P2 | byte (1) | Signature scheme | Ed25519 = 0 |
109+ | | | | Sr25519 = 1 |
110+ | L | byte (1) | Bytes in payload | (depends) |
111+ | Path[ 0] | byte (4) | Derivation Path Data | 0x80000000 \ | 44 |
112+ | Path[ 1] | byte (4) | Derivation Path Data | 0x80000000 \ | 434 |
113+ | Path[ 2] | byte (4) | Derivation Path Data | ? |
114+ | Path[ 3] | byte (4) | Derivation Path Data | ? |
115+ | Path[ 4] | byte (4) | Derivation Path Data | ? |
84116
85117#### Response
86118
0 commit comments