added simple sim function for em4x50

This commit is contained in:
tharexde 2020-10-26 22:10:48 +01:00
parent c1f5fc546d
commit 96e05d49df
5 changed files with 8 additions and 0 deletions

View file

@ -1121,6 +1121,10 @@ static void PacketReceived(PacketCommandNG *packet) {
em4x50_restore((em4x50_data_t *)packet->data.asBytes);
break;
}
case CMD_LF_EM4X50_SIM: {
em4x50_sim((uint32_t *)packet->data.asBytes);
break;
}
#endif
#ifdef WITH_ISO15693

View file

@ -29,5 +29,6 @@ void em4x50_login(uint32_t *password);
void em4x50_reset(void);
void em4x50_watch(void);
void em4x50_restore(em4x50_data_t *etd);
void em4x50_sim(uint32_t *word);
#endif /* EM4X50_H */

View file

@ -662,6 +662,7 @@ static command_t CommandTable[] = {
{"4x50_reset", CmdEM4x50Reset, IfPm3EM4x50, "reset EM4x50"},
{"4x50_watch", CmdEM4x50Watch, IfPm3EM4x50, "read EM4x50 continously"},
{"4x50_restore",CmdEM4x50Restore, IfPm3EM4x50, "restore EM4x50 dump to tag"},
{"4x50_sim", CmdEM4x50Sim, IfPm3EM4x50, "simulate single EM4x50 word (uid)"},
{NULL, NULL, NULL, NULL}
};

View file

@ -29,5 +29,6 @@ int CmdEM4x50Login(const char *Cmd);
int CmdEM4x50Reset(const char *Cmd);
int CmdEM4x50Watch(const char *Cmd);
int CmdEM4x50Restore(const char *Cmd);
int CmdEM4x50Sim(const char *Cmd);
#endif

View file

@ -513,6 +513,7 @@ typedef struct {
#define CMD_LF_EM4X50_RESET 0x0247
#define CMD_LF_EM4X50_WATCH 0x0248
#define CMD_LF_EM4X50_RESTORE 0x0249
#define CMD_LF_EM4X50_SIM 0x0250
// Sampling configuration for LF reader/sniffer
#define CMD_LF_SAMPLING_SET_CONFIG 0x021D
#define CMD_LF_FSK_SIMULATE 0x021E