mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
smart upgrade - now uses NG, added crc for each transfer to verify data integrity before flashing
This commit is contained in:
parent
4ff8c44d85
commit
57f226c922
3 changed files with 86 additions and 28 deletions
|
@ -219,7 +219,7 @@ static bool I2C_WaitForSim(void) {
|
|||
// 8051 speaks with smart card.
|
||||
// 1000*50*3.07 = 153.5ms
|
||||
// 1byte transfer == 1ms with max frame being 256bytes
|
||||
if (!WaitSCL_H_delay(20 * 1000 * 50))
|
||||
if (!WaitSCL_H_delay(10 * 1000 * 50))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -807,7 +807,7 @@ void SmartCardUpgrade(uint64_t arg0) {
|
|||
}
|
||||
|
||||
// writing takes time.
|
||||
WaitMS(100);
|
||||
WaitMS(50);
|
||||
|
||||
// read
|
||||
res = I2C_ReadFW(verfiydata, size, msb, lsb, I2C_DEVICE_ADDRESS_BOOT);
|
||||
|
@ -827,7 +827,8 @@ void SmartCardUpgrade(uint64_t arg0) {
|
|||
length -= size;
|
||||
pos += size;
|
||||
}
|
||||
reply_mix(CMD_ACK, isOK, pos, 0, 0, 0);
|
||||
|
||||
reply_ng(CMD_SMART_UPGRADE, (isOK) ? PM3_SUCCESS : PM3_ESOFT, NULL, 0);
|
||||
LED_C_OFF();
|
||||
BigBuf_free();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue