- // Retrieve the full 4 or 7 byte long uid
- uid = param_get64ex(Cmd, cmdp+1, 0, 16);
- if (uid == 0 )
- errors = TRUE;
-
- if (uid > 0xffffffff) {
- PrintAndLog("Emulating ISO/IEC 14443 type A tag with 7 byte UID (%014"llx")",uid);
- flags |= FLAG_7B_UID_IN_DATA;
- } else {
- PrintAndLog("Emulating ISO/IEC 14443 type A tag with 4 byte UID (%08x)",uid);
- flags |= FLAG_4B_UID_IN_DATA;
+ // Retrieve the full 4,7,10 byte long uid
+ param_gethex_ex(Cmd, cmdp+1, uid, &uidlen);
+ switch(uidlen) {
+ //case 20: flags |= FLAG_10B_UID_IN_DATA; break;
+ case 14: flags |= FLAG_7B_UID_IN_DATA; break;
+ case 8: flags |= FLAG_4B_UID_IN_DATA; break;
+ default: errors = TRUE; break;
+ }
+ if (!errors) {
+ PrintAndLog("Emulating ISO/IEC 14443 type A tag with %d byte UID (%s)", uidlen>>1, sprint_hex(uid, uidlen>>1));
+ useUIDfromEML = FALSE;