// set password and mode, and return UID BOOL q5_login(BYTE *response, BYTE *pass) { BYTE tmp[35]; // check we need password - if we can get UID without, then we don't if(q5_get_uid(tmp)) return FALSE; if(strlen(pass) == 0) pass= Q5_DEFAULT_PWD; memcpy(tmp, Q5_AOR, 2); hextobinstring(tmp + 2, pass); tmp[34]= '\0'; // send password if (!q5_send_command(response, tmp, strlen(tmp), RESET, NO_SYNC, 0)) return FALSE; // see if we can now get UID if(!q5_get_uid(tmp)) return FALSE; PWD_Mode= TRUE; strcpy(Password, pass); strcpy(response, pass); return TRUE; }
BOOL get_tag_uid(BYTE *response) { switch(RFIDlerConfig.TagType) { case TAG_TYPE_ASK_RAW: return ask_raw_get_uid(response); case TAG_TYPE_AWID_26: return awid26_get_uid(response); case TAG_TYPE_EM4X02: return em4x02_get_uid(response); case TAG_TYPE_FDXB: return fdxb_get_uid(response); case TAG_TYPE_FSK1_RAW: case TAG_TYPE_FSK2_RAW: return fsk_raw_get_uid(response); case TAG_TYPE_HID_26: return hid26_get_uid(response); case TAG_TYPE_HITAG1: return hitag1_get_uid(response); case TAG_TYPE_HITAG2: return hitag2_get_uid(response); case TAG_TYPE_INDALA_64: return indala64_get_uid(response); case TAG_TYPE_INDALA_224: return indala224_get_uid(response); case TAG_TYPE_PSK1_RAW: return psk1_raw_get_uid(response); case TAG_TYPE_Q5: //case TAG_TYPE_T55X7: return q5_get_uid(response); case TAG_TYPE_UNIQUE: return unique_get_uid(response); default: break; } return FALSE; }