This commit is contained in:
iceman1001 2019-05-08 00:17:52 +02:00
commit 964006fd21
3 changed files with 20 additions and 26 deletions

View file

@ -461,11 +461,8 @@ void SendCapabilities(void) {
#endif
#ifdef WITH_FPC_USART_HOST
capabilities.compiled_with_fpc_usart_host = true;
// TODO
capabilities.hw_available_fpc_usart_btaddon = true;
#else
capabilities.compiled_with_fpc_usart_host = false;
capabilities.hw_available_fpc_usart_btaddon = false;
#endif
#ifdef WITH_LF
capabilities.compiled_with_lf = true;
@ -1520,6 +1517,7 @@ static void PacketReceived(PacketCommandNG *packet) {
break;
case CMD_CAPABILITIES:
SendCapabilities();
break;
case CMD_PING:
reply_ng(CMD_PING, PM3_SUCCESS, packet->data.asBytes, packet->length);
break;

View file

@ -608,7 +608,7 @@ int TestProxmark(void) {
return PM3_EIO;
SendCommandNG(CMD_CAPABILITIES, NULL, 0);
if (WaitForResponseTimeoutW(CMD_PING, &resp, 1000, false)) {
if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false)) {
memcpy(&pm3_capabilities, resp.data.asBytes, resp.length);
conn.send_via_fpc_usart = pm3_capabilities.via_fpc;
conn.uart_speed = pm3_capabilities.baudrate;

View file

@ -137,36 +137,32 @@ typedef struct {
uint16_t read_gap;
} t55xx_config;
// TODO add more fields to report all hw & sw capabilities of pm3
typedef struct {
uint32_t baudrate;
bool via_fpc;
bool via_fpc :1;
// rdv4
bool compiled_with_flash;
bool compiled_with_smartcard;
bool compiled_with_fpc_usart;
bool compiled_with_fpc_usart_dev;
bool compiled_with_fpc_usart_host;
bool compiled_with_flash :1;
bool compiled_with_smartcard :1;
bool compiled_with_fpc_usart :1;
bool compiled_with_fpc_usart_dev :1;
bool compiled_with_fpc_usart_host :1;
// lf
bool compiled_with_lf;
bool compiled_with_hitag;
bool compiled_with_lf :1;
bool compiled_with_hitag :1;
// hf
bool compiled_with_hfsniff;
bool compiled_with_iso14443a;
bool compiled_with_iso14443b;
bool compiled_with_iso15693;
bool compiled_with_felica;
bool compiled_with_legicrf;
bool compiled_with_iclass;
bool compiled_with_hfsniff :1;
bool compiled_with_iso14443a :1;
bool compiled_with_iso14443b :1;
bool compiled_with_iso15693 :1;
bool compiled_with_felica :1;
bool compiled_with_legicrf :1;
bool compiled_with_iclass :1;
// misc
bool compiled_with_lcd;
bool compiled_with_lcd :1;
// Following are not yet implemented:
// rdv4
bool hw_available_flash;
bool hw_available_smartcard;
// rdv4 bt addon
bool hw_available_fpc_usart_btaddon;
bool hw_available_flash :1;
bool hw_available_smartcard :1;
} PACKED capabilities_t;
extern capabilities_t pm3_capabilities;