From 0363be935895ba8d746703fb57c74856b7a2c3d4 Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Fri, 17 Nov 2017 09:13:37 +0100 Subject: [PATCH 1/4] fix: USB Power requirements * correctly indicate the maximum current drawn from the USB bus --- common/usb_cdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/usb_cdc.c b/common/usb_cdc.c index 91a63cf3..3d17f81c 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 + 0xC0, // CbmAttributes (Self Powered - for those with a battery) + 0x4B, // CMaxPower (150mA max current drawn from bus without battery) /* Interface 0 Descriptor: Communication Class Interface */ 0x09, // bLength From f380317220a8326545c528f5a054238d54b9046c Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Tue, 28 Nov 2017 21:22:29 +0100 Subject: [PATCH 2/4] Change USB Configuration to "Bus Powered" --- common/usb_cdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/usb_cdc.c b/common/usb_cdc.c index 3d17f81c..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 (Self Powered - for those with a battery) - 0x4B, // CMaxPower (150mA max current drawn from bus without battery) + 0x80, // CbmAttributes (Bus Powered) + 0x4B, // CMaxPower (150mA max current drawn from bus) /* Interface 0 Descriptor: Communication Class Interface */ 0x09, // bLength From dc93020701a50f1b593be08ccf0efa391670ce0f Mon Sep 17 00:00:00 2001 From: Iceman Date: Thu, 30 Nov 2017 12:46:40 +0100 Subject: [PATCH 3/4] Update fpgaloader.c (#500) This address part1 in issue https://github.com/Proxmark/proxmark3/issues/499 Device power out 13.56Mhz when started (initialised). This output is not stopped until arbitary command is sent. --- armsrc/fpgaloader.c | 3 +++ 1 file changed, 3 insertions(+) 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); } From 606eddca8dd9e16e8752146bd6a42f812e42b593 Mon Sep 17 00:00:00 2001 From: merlokk Date: Thu, 30 Nov 2017 19:34:20 +0200 Subject: [PATCH 4/4] added hint on `hf 14a apdu`. close #495 --- client/cmdhf14a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index a0f3ce57..8064724c 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -725,6 +725,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; @@ -734,6 +735,7 @@ int CmdHF14AAPDU(const char *cmd) { if (strlen(cmd) < 2) { PrintAndLog("Usage: hf 14a apdu [-s] [-k] [-t] "); + PrintAndLog("Command sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL)"); PrintAndLog(" -s activate field and select card"); PrintAndLog(" -k leave the signal field ON after receive response"); PrintAndLog(" -t executes TLV decoder if it possible. TODO!!!!"); @@ -1019,7 +1021,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} };