mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
fix: 'hw connect' - if pm3 client was in offline more to start with, check..
This commit is contained in:
parent
a20392edf3
commit
f85280ad41
1 changed files with 9 additions and 3 deletions
|
@ -509,12 +509,18 @@ static int CmdConnect(const char *Cmd) {
|
||||||
if (strlen(port) == 0 )
|
if (strlen(port) == 0 )
|
||||||
GetSavedSerialPortName( &port );
|
GetSavedSerialPortName( &port );
|
||||||
|
|
||||||
|
if ( port == NULL ) {
|
||||||
|
return usage_hw_connect();
|
||||||
|
}
|
||||||
// if we were already connected, disconnect first.
|
// if we were already connected, disconnect first.
|
||||||
if (session.pm3_present) {
|
//if (session.pm3_present) {
|
||||||
PrintAndLogEx(INFO, "Disconnecting from current serial port");
|
PrintAndLogEx(INFO, "Disconnecting from current serial port");
|
||||||
CloseProxmark();
|
CloseProxmark();
|
||||||
session.pm3_present = false;
|
session.pm3_present = false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
// set timeouts
|
||||||
|
//int res = uart_reconfigure_timeouts(sp, UART_USB_CLIENT_RX_TIMEOUT_MS);
|
||||||
|
|
||||||
// try to open serial port
|
// try to open serial port
|
||||||
session.pm3_present = OpenProxmark(port, false, 20, false, USART_BAUD_RATE);
|
session.pm3_present = OpenProxmark(port, false, 20, false, USART_BAUD_RATE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue