mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Added a proper way to check if it is rdv4 fw
This commit is contained in:
parent
da84eb6206
commit
474aaed4b7
5 changed files with 16 additions and 4 deletions
|
@ -453,6 +453,12 @@ static void SendCapabilities(void) {
|
||||||
capabilities.baudrate = g_usart_baudrate;
|
capabilities.baudrate = g_usart_baudrate;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RDV4
|
||||||
|
capabilities.is_rdv4 = true;
|
||||||
|
#else
|
||||||
|
capabilities.is_rdv4 = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
capabilities.compiled_with_flash = true;
|
capabilities.compiled_with_flash = true;
|
||||||
capabilities.hw_available_flash = FlashInit();
|
capabilities.hw_available_flash = FlashInit();
|
||||||
|
|
|
@ -1202,7 +1202,7 @@ void pm3_version_short(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, " Target.... %s", (is_genuine_rdv4) ? _YELLOW_("RDV4") : _YELLOW_("PM3 GENERIC"));
|
PrintAndLogEx(NORMAL, " Target.... %s", (is_genuine_rdv4) ? _YELLOW_("RDV4") : _RED_("device / fw mismatch"));
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL, " Target.... %s", _YELLOW_("PM3 GENERIC"));
|
PrintAndLogEx(NORMAL, " Target.... %s", _YELLOW_("PM3 GENERIC"));
|
||||||
}
|
}
|
||||||
|
@ -1291,13 +1291,17 @@ void pm3_version(bool verbose, bool oneliner) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, " device.................... %s", (is_genuine_rdv4) ? _GREEN_("RDV4") : _GREEN_("PM3 GENERIC"));
|
PrintAndLogEx(NORMAL, " device.................... %s", (is_genuine_rdv4) ? _GREEN_("RDV4") : _RED_("device / fw mismatch"));
|
||||||
PrintAndLogEx(NORMAL, " firmware.................. %s", (is_genuine_rdv4) ? _GREEN_("RDV4") : _GREEN_("PM3 GENERIC"));
|
PrintAndLogEx(NORMAL, " firmware.................. %s", (is_genuine_rdv4) ? _GREEN_("RDV4") : _YELLOW_("RDV4"));
|
||||||
PrintAndLogEx(NORMAL, " external flash............ %s", IfPm3Flash() ? _GREEN_("present") : _YELLOW_("absent"));
|
PrintAndLogEx(NORMAL, " external flash............ %s", IfPm3Flash() ? _GREEN_("present") : _YELLOW_("absent"));
|
||||||
PrintAndLogEx(NORMAL, " smartcard reader.......... %s", IfPm3Smartcard() ? _GREEN_("present") : _YELLOW_("absent"));
|
PrintAndLogEx(NORMAL, " smartcard reader.......... %s", IfPm3Smartcard() ? _GREEN_("present") : _YELLOW_("absent"));
|
||||||
PrintAndLogEx(NORMAL, " FPC USART for BT add-on... %s", IfPm3FpcUsartHost() ? _GREEN_("present") : _YELLOW_("absent"));
|
PrintAndLogEx(NORMAL, " FPC USART for BT add-on... %s", IfPm3FpcUsartHost() ? _GREEN_("present") : _YELLOW_("absent"));
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL, " firmware.................. %s", _YELLOW_("PM3 GENERIC"));
|
PrintAndLogEx(NORMAL, " firmware.................. %s", _YELLOW_("PM3 GENERIC"));
|
||||||
|
if (IfPm3Flash()) {
|
||||||
|
PrintAndLogEx(NORMAL, " external flash............ %s", _GREEN_("present"));
|
||||||
|
}
|
||||||
|
|
||||||
if (IfPm3FpcUsartHost()) {
|
if (IfPm3FpcUsartHost()) {
|
||||||
PrintAndLogEx(NORMAL, " FPC USART for BT add-on... %s", _GREEN_("present"));
|
PrintAndLogEx(NORMAL, " FPC USART for BT add-on... %s", _GREEN_("present"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ bool IfPm3Present(void) {
|
||||||
bool IfPm3Rdv4Fw(void) {
|
bool IfPm3Rdv4Fw(void) {
|
||||||
if (!IfPm3Present())
|
if (!IfPm3Present())
|
||||||
return false;
|
return false;
|
||||||
return (g_pm3_capabilities.compiled_with_flash) || (g_pm3_capabilities.compiled_with_smartcard);
|
return (g_pm3_capabilities.is_rdv4);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IfPm3Flash(void) {
|
bool IfPm3Flash(void) {
|
||||||
|
|
|
@ -95,6 +95,7 @@ ifeq ($(PLATFORM),PM3RDV4)
|
||||||
PLATFORM_DEFS = -DWITH_SMARTCARD -DWITH_FLASH -DRDV4
|
PLATFORM_DEFS = -DWITH_SMARTCARD -DWITH_FLASH -DRDV4
|
||||||
PLTNAME = Proxmark3 RDV4
|
PLTNAME = Proxmark3 RDV4
|
||||||
PLATFORM_FPGA = xc2s30
|
PLATFORM_FPGA = xc2s30
|
||||||
|
RDV4 = yes
|
||||||
else ifeq ($(PLATFORM),PM3OTHER)
|
else ifeq ($(PLATFORM),PM3OTHER)
|
||||||
$(warning PLATFORM=PM3OTHER is deprecated, please use PLATFORM=PM3GENERIC)
|
$(warning PLATFORM=PM3OTHER is deprecated, please use PLATFORM=PM3GENERIC)
|
||||||
PLTNAME = Proxmark3 generic target
|
PLTNAME = Proxmark3 generic target
|
||||||
|
|
|
@ -205,6 +205,7 @@ typedef struct {
|
||||||
// rdv4
|
// rdv4
|
||||||
bool hw_available_flash : 1;
|
bool hw_available_flash : 1;
|
||||||
bool hw_available_smartcard : 1;
|
bool hw_available_smartcard : 1;
|
||||||
|
bool is_rdv4 : 1;
|
||||||
} PACKED capabilities_t;
|
} PACKED capabilities_t;
|
||||||
#define CAPABILITIES_VERSION 6
|
#define CAPABILITIES_VERSION 6
|
||||||
extern capabilities_t g_pm3_capabilities;
|
extern capabilities_t g_pm3_capabilities;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue