First adjustments for FPC BT link

This commit is contained in:
Philippe Teuwen
2019-04-23 23:36:36 +02:00
parent dda63f9556
commit e453aff88c
4 changed files with 19 additions and 2 deletions

View File

@@ -491,7 +491,14 @@ void pm3_version(bool verbose) {
PacketResponseNG resp;
clearCommandBuffer();
SendCommandOLD(CMD_VERSION, 0, 0, 0, NULL, 0);
#ifdef USART_SLOW_LINK
// 10s timeout for slow FPC, e.g. over BT
// as this is the very first command sent to the pm3
// that initiates the BT connection
if (WaitForResponseTimeout(CMD_ACK, &resp, 10000)) {
#else
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
#endif
#ifdef __WIN32
PrintAndLogEx(NORMAL, "\n [ Proxmark3 RFID instrument ]\n");
#else

View File

@@ -421,7 +421,7 @@ __attribute__((force_align_arg_pointer))
PacketResponseOLD rx_old;
memcpy(&rx_old, &rx_raw.pre, sizeof(PacketResponseNGPreamble));
if ((!uart_receive(sp, ((uint8_t *)&rx_old) + sizeof(PacketResponseNGPreamble), sizeof(PacketResponseOLD) - sizeof(PacketResponseNGPreamble), &rxlen)) || (rxlen != sizeof(PacketResponseOLD) - sizeof(PacketResponseNGPreamble))) {
PrintAndLogEx(WARNING, "Received packet frame error var part too short? %d/%d", rxlen, sizeof(PacketResponseOLD) - sizeof(PacketResponseNGPreamble));
PrintAndLogEx(WARNING, "Received packet OLD frame payload error too short? %d/%d", rxlen, sizeof(PacketResponseOLD) - sizeof(PacketResponseNGPreamble));
error = true;
}
if (!error) {