mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
chg: add response ack.
This commit is contained in:
parent
1709c1ce1a
commit
46d540490f
4 changed files with 22 additions and 0 deletions
|
@ -30,6 +30,7 @@ extern "C" {
|
|||
#include "desfire.h"
|
||||
#include "iso14443b.h"
|
||||
#include "Standalone/standalone.h"
|
||||
#include "flashmem.h"
|
||||
|
||||
extern const uint8_t OddByteParity[256];
|
||||
extern int rsamples; // = 0;
|
||||
|
@ -240,6 +241,7 @@ extern void felica_sniff(uint32_t samples, uint32_t triggers);
|
|||
extern void felica_sim_lite(uint64_t uid);
|
||||
extern void felica_dump_lite_s();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -190,4 +190,5 @@ void EXFLASH_TEST(void) {
|
|||
Dbprintf("%s \r\n","TEST done!");
|
||||
|
||||
EXFLASH_Erase();
|
||||
cmd_send(CMD_ACK, 1, 0, 0, 0,0);
|
||||
}
|
|
@ -461,6 +461,17 @@ char* pb(uint32_t b) {
|
|||
|
||||
int CmdAnalyseA(const char *Cmd){
|
||||
|
||||
UsbCommand c = {CMD_READ_FLASH_MEM, {0,0,0}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbCommand resp;
|
||||
|
||||
if ( !WaitForResponseTimeout(CMD_ACK, &resp, 2000) ) {
|
||||
PrintAndLog("timeout while waiting for reply.");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
printf("-- " _BLUE_(its my message) "\n");
|
||||
printf("-- " _RED_(its my message) "\n");
|
||||
printf("-- " _YELLOW_(its my message) "\n");
|
||||
|
@ -482,6 +493,13 @@ int CmdAnalyseA(const char *Cmd){
|
|||
shiftReg = shiftReg << 8 | rev;
|
||||
|
||||
printf("shiftreg after %08x | pattern %08x \n", shiftReg, SYNC_16BIT);
|
||||
|
||||
uint8_t n0 = 0, n1 = 0;
|
||||
|
||||
n0 = (rev & (uint8_t)(~(0xFF >> (8-4)))) >> 4;
|
||||
n1 = (n1 << 4) | (rev & (uint8_t)(~(0xFF << 4)));
|
||||
|
||||
printf("rev %02X | %02X %s | %02X %s |\n", rev, n0, pb(n0), n1, pb(n1) );
|
||||
|
||||
/*
|
||||
hex(0xb24d shr 0) 0xB24D 0b1011001001001101
|
||||
|
|
|
@ -762,6 +762,7 @@ int CmdBuffClear(const char *Cmd)
|
|||
if (cmdp == 'h' || cmdp == 'H') return usage_data_buffclear();
|
||||
|
||||
UsbCommand c = {CMD_BUFF_CLEAR, {0,0,0}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
ClearGraph(true);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue