mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
Capabilities versionning, would also detect platform struct pack issues
This commit is contained in:
parent
5aed3e04c9
commit
3412e9d8c5
3 changed files with 8 additions and 1 deletions
|
@ -613,6 +613,11 @@ int TestProxmark(void) {
|
|||
|
||||
SendCommandNG(CMD_CAPABILITIES, NULL, 0);
|
||||
if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false)) {
|
||||
if ((resp.length != sizeof(pm3_capabilities)) || (resp.data.asBytes[0] != CAPABILITIES_VERSION)) {
|
||||
PrintAndLogEx(ERR, _RED_("Capabilities structure version sent by Proxmark3 is not the same as the one used by the client!"));
|
||||
PrintAndLogEx(ERR, _RED_("Please flash the Proxmark with the same version as the client."));
|
||||
return PM3_EDEVNOTSUPP;
|
||||
}
|
||||
memcpy(&pm3_capabilities, resp.data.asBytes, MIN(sizeof(capabilities_t), resp.length));
|
||||
conn.send_via_fpc_usart = pm3_capabilities.via_fpc;
|
||||
conn.uart_speed = pm3_capabilities.baudrate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue