+
+ uint8_t *data = malloc(readlen);
+ if ( !data ){
+ PrintAndLog("Cannot allocate memory");
+ return 2;
+ }
+
+ if ( readlen != len )
+ PrintAndLog("Fail, only managed to read 0x%02X bytes", readlen);
+
+ // copy data from device
+ GetEMLFromBigBuf(data, readlen, 0);
+ if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500)){
+ PrintAndLog("Command execute timeout");
+ if ( data )
+ free(data);
+ return 1;
+ }
+
+ PrintAndLog("\n ## | Data");
+ PrintAndLog("-----+-----");
+ print_hex_break( data, readlen, 32);
+ } else {
+ PrintAndLog("failed reading tag");