Add request specification version to 'hf felica info'

This commit is contained in:
kormax
2026-03-05 20:30:30 +02:00
parent ec25ea77a4
commit 10a3fa7e6d
4 changed files with 194 additions and 56 deletions
+19 -9
View File
@@ -20,6 +20,8 @@
#include "common.h"
#define FELICA_SPECIFICATION_VERSION_MAX_OPTIONS 16U
typedef enum FELICA_COMMAND {
FELICA_CONNECT = (1 << 0),
FELICA_NO_DISCONNECT = (1 << 1),
@@ -133,6 +135,23 @@ typedef struct {
uint8_t IDm[8];
} PACKED felica_get_platform_info_request_t;
typedef struct {
uint8_t length[1];
uint8_t command_code[1];
uint8_t IDm[8];
uint8_t reserved[2];
} PACKED felica_request_specification_version_request_t;
typedef struct {
felica_status_flags_t status_flags;
bool has_specification_version;
uint8_t format_version;
uint8_t basic_version[2];
uint8_t number_of_option;
size_t option_version_count;
uint8_t option_version_list[FELICA_SPECIFICATION_VERSION_MAX_OPTIONS * 2];
} felica_request_specification_version_info_t;
typedef struct {
felica_frame_response_t frame_response;
uint8_t node_number[1];
@@ -162,15 +181,6 @@ typedef struct {
uint8_t system_code_list[32];
} PACKED felica_syscode_response_t;
typedef struct {
felica_frame_response_t frame_response;
felica_status_flags_t status_flags;
uint8_t format_version[1];
uint8_t basic_version[2];
uint8_t number_of_option[1];
uint8_t option_version_list[4];
} PACKED felica_request_spec_response_t;
typedef struct {
felica_frame_response_t frame_response;
uint8_t m2c[8];
+2 -2
View File
@@ -864,8 +864,8 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
#define FELICA_GETPLATFORMINFO_REQ 0x3a
#define FELICA_GETPLATFORMINFO_ACK 0x3b
#define FELICA_OSVER_REQ 0x3c
#define FELICA_OSVER_ACK 0x3d
#define FELICA_REQUEST_SPEC_VERSION_REQ 0x3c
#define FELICA_REQUEST_SPEC_VERSION_ACK 0x3d
#define FELICA_RESET_MODE_REQ 0x3e
#define FELICA_RESET_MODE_ACK 0x3f