mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
ADD: well, starting with a luascript for reading calypso tags, made me remake the 14b raw command on client and device side. Sorry @marshmellow42 , but this one broke your "hf 14b info" implementation. I fixed the "hf 14b read" and the hf search. So not to bad, but still a bit broken. The 14b raw device side is now very similar to 14a raw. Which is good. There is a Standard 14b 0x050008 detection and STmicroelectronic 0x0600 detection on deviceside. This removes a lot of code client side.
I also made the SRi read functions better by combining them. The demodulation / uart code should be the same as last summers changes. The device side code can now be even smaller.
This commit is contained in:
parent
790e8eae09
commit
6fc68747f6
17 changed files with 937 additions and 876 deletions
|
@ -734,7 +734,7 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
|||
datalen = (datalen > USB_CMD_DATA_SIZE) ? USB_CMD_DATA_SIZE : datalen;
|
||||
|
||||
c.arg[1] = (datalen & 0xFFFF) | (uint32_t)(numbits << 16);
|
||||
memcpy(c.d.asBytes,data,datalen);
|
||||
memcpy(c.d.asBytes, data, datalen);
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
@ -749,26 +749,15 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
|||
}
|
||||
|
||||
static void waitCmd(uint8_t iSelect) {
|
||||
uint8_t *recv;
|
||||
UsbCommand resp;
|
||||
char *hexout;
|
||||
uint16_t len = 0;
|
||||
|
||||
if (WaitForResponseTimeout(CMD_ACK,&resp,1500)) {
|
||||
recv = resp.d.asBytes;
|
||||
uint8_t iLen = iSelect ? resp.arg[1] : resp.arg[0];
|
||||
PrintAndLog("received %i octets",iLen);
|
||||
if(!iLen)
|
||||
if (WaitForResponseTimeout(CMD_ACK,&resp,1500)) {
|
||||
len = iSelect ? (resp.arg[1] & 0xffff) : (resp.arg[0] & 0xffff);
|
||||
PrintAndLog("received %i octets", len);
|
||||
if(!len)
|
||||
return;
|
||||
hexout = (char *)malloc(iLen * 3 + 1);
|
||||
if (hexout != NULL) {
|
||||
for (int i = 0; i < iLen; i++) { // data in hex
|
||||
sprintf(&hexout[i * 3], "%02X ", recv[i]);
|
||||
}
|
||||
PrintAndLog("%s", hexout);
|
||||
free(hexout);
|
||||
} else {
|
||||
PrintAndLog("malloc failed your client has low memory?");
|
||||
}
|
||||
PrintAndLog("%s", sprint_hex(resp.d.asBytes, len) );
|
||||
} else {
|
||||
PrintAndLog("timeout while waiting for reply.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue