diff --git a/armsrc/fpgaloader.c b/armsrc/fpgaloader.c index 1deb5b7d..c0b04f3c 100644 --- a/armsrc/fpgaloader.c +++ b/armsrc/fpgaloader.c @@ -434,6 +434,9 @@ void FpgaDownloadAndGo(int bitstream_version) inflateEnd(&compressed_fpga_stream); + // turn off antenna + FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); + // free eventually allocated BigBuf memory BigBuf_free(); BigBuf_Clear_ext(false); } diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index a95f5ac9..0530be72 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -720,6 +720,7 @@ int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool lea return 0; } +// ISO14443-4. 7. Half-duplex block transmission protocol int CmdHF14AAPDU(const char *cmd) { uint8_t data[USB_CMD_DATA_SIZE]; int datalen = 0; @@ -727,7 +728,7 @@ int CmdHF14AAPDU(const char *cmd) { bool leaveSignalON = false; bool decodeTLV = false; - CLIParserInit("hf 14a apdu", "Send ISO 14443-4 APDU to tag", "Sample:\n\thf 14a apdu -st 00A404000E325041592E5359532E444446303100\n"); + CLIParserInit("hf 14a apdu", "Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL)", "Sample:\n\thf 14a apdu -st 00A404000E325041592E5359532E444446303100\n"); void* argtable[] = { arg_param_begin, @@ -739,6 +740,7 @@ int CmdHF14AAPDU(const char *cmd) { }; if (CLIParserParseString(cmd, argtable, sizeof(argtable) / sizeof(argtable[0]), false)){ CLIParserFree(); + return 0; } @@ -945,7 +947,7 @@ static command_t CommandTable[] = {"cuids", CmdHF14ACUIDs, 0, " Collect n>0 ISO14443 Type A UIDs in one go"}, {"sim", CmdHF14ASim, 0, " -- Simulate ISO 14443a tag"}, {"snoop", CmdHF14ASnoop, 0, "Eavesdrop ISO 14443 Type A"}, - {"apdu", CmdHF14AAPDU, 0, "Send ISO 14443-4 APDU to tag"}, + {"apdu", CmdHF14AAPDU, 0, "Send an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol"}, {"raw", CmdHF14ACmdRaw, 0, "Send raw hex data to tag"}, {NULL, NULL, 0, NULL} }; diff --git a/common/usb_cdc.c b/common/usb_cdc.c index 91a63cf3..348b97e9 100644 --- a/common/usb_cdc.c +++ b/common/usb_cdc.c @@ -77,8 +77,8 @@ static const char cfgDescriptor[] = { 0x02, // CbNumInterfaces 0x01, // CbConfigurationValue 0x00, // CiConfiguration - 0xC0, // CbmAttributes 0xA0 - 0xFA, // CMaxPower + 0x80, // CbmAttributes (Bus Powered) + 0x4B, // CMaxPower (150mA max current drawn from bus) /* Interface 0 Descriptor: Communication Class Interface */ 0x09, // bLength