mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-28 02:50:21 +08:00
Merge branch 'master' of https://github.com/RfidResearchGroup/proxmark3
This commit is contained in:
commit
d5802ff766
1 changed files with 18 additions and 0 deletions
|
@ -353,6 +353,24 @@ static int CmdUsartBtFactory(const char *Cmd) {
|
|||
return PM3_EFATAL;
|
||||
}
|
||||
|
||||
memset(data, 0, sizeof(data));
|
||||
len = 0;
|
||||
string = "AT+ROLE=S";
|
||||
PrintAndLogEx(SUCCESS, "TX (%3u):%.*s", strlen(string), strlen(string), string);
|
||||
|
||||
ret = usart_txrx((uint8_t *)string, strlen(string), data, &len, 1000);
|
||||
if (ret == PM3_SUCCESS) {
|
||||
PrintAndLogEx(SUCCESS, "RX (%3u):%.*s", len, len, data);
|
||||
if (strcmp((char *)data, "OK+ROLE:S") == 0) {
|
||||
PrintAndLogEx(SUCCESS, "Role set to " _GREEN_("Slave"));
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Unexpected response to AT+ROLE=S: " _YELLOW_("%.*s"), len, data);
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Lost contact with add-on, please try again");
|
||||
return PM3_EFATAL;
|
||||
}
|
||||
|
||||
memset(data, 0, sizeof(data));
|
||||
len = 0;
|
||||
string = "AT+PIN1234";
|
||||
|
|
Loading…
Reference in a new issue