+int usage_lf_io_fskdemod(void) {
+ PrintAndLog("Enables IOProx compatible reader mode printing details of scanned tags.");
+ PrintAndLog("By default, values are printed and logged until the button is pressed or another USB command is issued.");
+ PrintAndLog("If the [1] option is provided, reader mode is exited after reading a single card.");
+ PrintAndLog("");
+ PrintAndLog("Usage: lf io fskdemod [h] [1]");
+ PrintAndLog("Options :");
+ PrintAndLog(" h : This help");
+ PrintAndLog(" 1 : (optional) stop after reading a single card");
+ PrintAndLog("");
+ PrintAndLog("Samples");
+ PrintAndLog(" lf io fskdemod");
+ PrintAndLog(" lf io fskdemod 1");
+ return 0;
+}
+
+int usage_lf_io_sim(void) {
+ PrintAndLog("Enables simulation of IOProx card with specified facility-code and card number.");
+ PrintAndLog("Simulation runs until the button is pressed or another USB command is issued.");
+ PrintAndLog("");
+ PrintAndLog("Usage: lf io sim [h] <version> <facility-code> <card-number>");
+ PrintAndLog("Options :");
+ PrintAndLog(" h : This help");
+ PrintAndLog(" <version> : 8bit version");
+ PrintAndLog(" <facility-code> : 8bit value facility code");
+ PrintAndLog(" <card number> : 16bit value card number");
+ PrintAndLog("");
+ PrintAndLog("Samples");
+ PrintAndLog(" lf io sim 26 101 1337");
+ return 0;
+}
+
+int usage_lf_io_clone(void) {
+ PrintAndLog("Enables cloning of IOProx card with specified facility-code and card number onto T55x7.");
+ PrintAndLog("The T55x7 must be on the antenna when issuing this command. T55x7 blocks are calculated and printed in the process.");
+ PrintAndLog("");
+ PrintAndLog("Usage: lf io clone [h] <version> <facility-code> <card-number> [Q5]");
+ PrintAndLog("Options :");
+ PrintAndLog(" h : This help");
+ PrintAndLog(" <version> : 8bit version");
+ PrintAndLog(" <facility-code> : 8bit value facility code");
+ PrintAndLog(" <card number> : 16bit value card number");
+ PrintAndLog(" Q5 : optional - clone to Q5 (T5555) instead of T55x7 chip");
+ PrintAndLog("");
+ PrintAndLog("Samples");
+ PrintAndLog(" lf io clone 26 101 1337");
+ return 0;
+}
+
+int CmdIODemodFSK(const char *Cmd) {
+ if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_io_fskdemod();
+ int findone = (Cmd[0]=='1') ? 1 : 0;
+ UsbCommand c = {CMD_IO_DEMOD_FSK};