mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Merge branch 'master' into experimental_varlen2
* master: (33 commits) unified Proxmark3 text removed more colors rearranged banner output and messages textual revert revert revert style spaces fix fake com port style style styles not null? style style style style style style ...
This commit is contained in:
commit
8b99df9074
34 changed files with 148 additions and 177 deletions
|
@ -62,7 +62,7 @@ void SendCommand(UsbCommand *c) {
|
|||
#endif
|
||||
|
||||
if (offline) {
|
||||
PrintAndLogEx(NORMAL, "Sending bytes to proxmark failed - offline");
|
||||
PrintAndLogEx(WARNING, "Sending bytes to Proxmark3 failed." _YELLOW_("offline") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ bool hookUpPM3() {
|
|||
ret = false;
|
||||
offline = 1;
|
||||
} else {
|
||||
PrintAndLogEx(SUCCESS, "Proxmark reconnected\n");
|
||||
PrintAndLogEx(SUCCESS, "Proxmark3 reconnected\n");
|
||||
serial_port_name = ;
|
||||
ret = true;
|
||||
offline = 0;
|
||||
|
@ -325,13 +325,13 @@ __attribute__((force_align_arg_pointer))
|
|||
if (txBufferNGLen) { // NG packet
|
||||
if (!uart_send(sp, (uint8_t *) &txBufferNG, txBufferNGLen)) {
|
||||
//counter_to_offline++;
|
||||
PrintAndLogEx(WARNING, "sending bytes to proxmark failed");
|
||||
PrintAndLogEx(WARNING, "sending bytes to Proxmark3 device" _RED_("failed") );
|
||||
}
|
||||
txBufferNGLen = 0;
|
||||
} else {
|
||||
if (!uart_send(sp, (uint8_t *) &txBuffer, sizeof(UsbCommand))) {
|
||||
//counter_to_offline++;
|
||||
PrintAndLogEx(WARNING, "sending bytes to proxmark failed");
|
||||
PrintAndLogEx(WARNING, "sending bytes to Proxmark3 device" _RED_("failed") );
|
||||
}
|
||||
}
|
||||
txBuffer_pending = false;
|
||||
|
@ -362,7 +362,7 @@ bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode,
|
|||
PrintAndLogEx(INFO, "Using UART port " _YELLOW_("%s"), portname);
|
||||
sp = uart_open(portname, speed);
|
||||
} else {
|
||||
PrintAndLogEx(SUCCESS, "Waiting for Proxmark to appear on " _YELLOW_("%s"), portname);
|
||||
PrintAndLogEx(SUCCESS, "Waiting for Proxmark3 to appear on " _YELLOW_("%s"), portname);
|
||||
fflush(stdout);
|
||||
int openCount = 0;
|
||||
do {
|
||||
|
@ -399,17 +399,16 @@ bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode,
|
|||
}
|
||||
}
|
||||
|
||||
// check if we can communicate with Pm3
|
||||
int TestProxmark(void) {
|
||||
// check if we can communicate with Pm3
|
||||
clearCommandBuffer();
|
||||
UsbCommand resp;
|
||||
UsbCommand c = {CMD_PING, {0, 0, 0}, {{0}}};
|
||||
SendCommand(&c);
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
||||
PrintAndLogEx(INFO, "Ping successful, communicating with PM3 over %s.", resp.arg[0] == 1 ? "FPC" : "USB");
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 5000)) {
|
||||
PrintAndLogEx(INFO, "Communicating with PM3 over %s.", resp.arg[0] == 1 ? "FPC" : "USB");
|
||||
return 1;
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, _RED_("Ping failed"));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -417,7 +416,6 @@ int TestProxmark(void) {
|
|||
void CloseProxmark(void) {
|
||||
conn.run = false;
|
||||
|
||||
|
||||
#ifdef __BIONIC__
|
||||
if (USB_communication_thread != 0) {
|
||||
pthread_join(USB_communication_thread, NULL);
|
||||
|
@ -478,8 +476,8 @@ bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand *response, size_t ms_timeo
|
|||
|
||||
if (msclock() - start_time > 3000 && show_warning) {
|
||||
// 3 seconds elapsed (but this doesn't mean the timeout was exceeded)
|
||||
PrintAndLogEx(NORMAL, "Waiting for a response from the proxmark...");
|
||||
PrintAndLogEx(NORMAL, "You can cancel this operation by pressing the pm3 button");
|
||||
PrintAndLogEx(INFO, "Waiting for a response from the proxmark3...");
|
||||
PrintAndLogEx(INFO, "You can cancel this operation by pressing the pm3 button");
|
||||
show_warning = false;
|
||||
}
|
||||
}
|
||||
|
@ -588,7 +586,7 @@ bool dl_it(uint8_t *dest, uint32_t bytes, uint32_t start_index, UsbCommand *resp
|
|||
|
||||
if (msclock() - start_time > 3000 && show_warning) {
|
||||
// 3 seconds elapsed (but this doesn't mean the timeout was exceeded)
|
||||
PrintAndLogEx(NORMAL, "Waiting for a response from the proxmark...");
|
||||
PrintAndLogEx(NORMAL, "Waiting for a response from the Proxmark3...");
|
||||
PrintAndLogEx(NORMAL, "You can cancel this operation by pressing the pm3 button");
|
||||
show_warning = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue