Updated the README.txt

CHG:  added marshmellows last changes with rtrim, and minor fixes.
DEL:  code cleanup in usb_cdc.c
This commit is contained in:
iceman1001 2015-01-01 14:07:42 +01:00
parent c579a5871e
commit 0a966150a0
6 changed files with 103 additions and 120 deletions

View file

@ -1,87 +1,63 @@
The iceman fork.
NOTICE:
(2014-03-26)
This is now the official Proxmark repository!
INTRODUCTION:
The official Proxmark repository is found here: https://github.com/Proxmark/proxmark3
The proxmark3 is a powerful general purpose RFID tool, the size of a deck
of cards, designed to snoop, listen and emulate everything from
Low Frequency (125kHz) to High Frequency (13.56MHz) tags.
This repository contains enough software, logic (for the FPGA), and design
documentation for the hardware that you could, at least in theory,
do something useful with a proxmark3.
NEWS:
RESOURCES:
Whats in this fork? I have scraped the web for different enhancements to the PM3 sourcecode and not all of them ever found their way to the master branch.
Among the stuff is
* jonor's hf 14a raw timing patch
* Piwi's updates. (usually gets into the master)
* Holimans iclass, (usually gets into the master)
* Marshmellows LF fixes (will go into the master)
* Midnitesnakes Ultralight, Ultralight-c enhancements
* My desfire, Ultralight extras, LF T55xx enhancements, bugs fixes (filelength, hf mf commands ), TNP3xxx lua scripts, Awid26, skidata scripts (will come)
* other osbscury patches like for the sammy-mode, (offline you know), tagidentifications, defaultkeys.
* This repository!
https://github.com/Proxmark/proxmark3
Give me a hint, and I'll see if I can't merge in the stuff you have.
* The Wiki
https://github.com/Proxmark/proxmark3/wiki
PM3 GUI:
* The GitHub page
http://proxmark.github.io/proxmark3/
I do tend to rename and move stuff around, the official PM3-GUI from Gaucho will not work so good. *sorry*
* The Forum
http://www.proxmark.org/forum
* The IRC chanel
irc.freenode.org #proxmark3
-or-
http://webchat.freenode.net/?channels=#proxmark3
DEVELOPMENT:
The tools required to build or run the project will vary depending on
your operating system. Please refer to the Wiki for details.
This fork is adjusted to compile on windows/mingw environment with Qt5.3.1 & GCC 4.8
For people with linux you will need to patch some sourcecode and some small change to one makefile. If you are lazy, you google the forum and find asper's or holimans makefile or you find your solution below.
* https://github.com/Proxmark/proxmark3/wiki
Common errors linux/macOS finds
Error:
* loclass/fileutils.c:15:2: warning: implicit declaration of function _stat [-Wimplicit-function-declaration]
Solution:
* Remove the "unscore" sign. In linux you use without underscore, in windows you need a underscore.
OBTAINING HARDWARE:
Error:
* \client\makefile the parameter -lgdi32
Solution:
* Remove parameter.
The Proxmark 3 is available for purcahse (assembled and tested) from the
following locations:
Error:
* Using older Qt4.6 gives compilation errors.
Solution
* Upgrade to Qt5.3.1
OR
* Change these two line in \client\makefile
CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui -I$(QTDIR)/include/QtWidgets -I/mingw/include
QTLDLIBS = -L$(QTDIR)/lib -lQt5Core -lQt5Gui -lQt5Widgets
* http://proxmark3.com/
* http://www.xfpga.com/
TO
Most of the ultra-low-volume contract assemblers could put
something like this together with a reasonable yield. A run of around
a dozen units is probably cost-effective. The BOM includes (possibly-
outdated) component pricing, and everything is available from Digikey
and the usual distributors.
If you've never assembled a modern circuit board by hand, then this is
not a good place to start. Some of the components (e.g. the crystals)
must not be assembled with a soldering iron, and require hot air.
The schematics are included; the component values given are not
necessarily correct for all situations, but it should be possible to do
nearly anything you would want with appropriate population options.
The printed circuit board artwork is also available, as Gerbers and an
Excellon drill file.
CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
LICENSING:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
And old Qt4 version is found here: http://www.icesql.se/proxmark3/code/linuxmakefile.txt but this one doesn't have all new files in it. So I don't recommend it.
Jonathan Westhues
user jwesthues, at host cq.cx
May 2007, Cambridge MA
January 2015, Sweden
iceman at host iuse.se

View file

@ -226,7 +226,7 @@ int Cmdaskmandemod(const char *Cmd)
PrintAndLog("EM410x pattern found: ");
printEM410x(lo);
}
if (BitLen>16) return 1;
//if (BitLen>16) return 1;
return 0;
}
@ -976,6 +976,15 @@ int CmdLtrim(const char *Cmd)
RepaintGraphWindow();
return 0;
}
int CmdRtrim(const char *Cmd)
{
int ds = atoi(Cmd);
GraphTraceLen = ds;
RepaintGraphWindow();
return 0;
}
/*
* Manchester demodulate a bitstream. The bitstream needs to be already in
@ -1377,13 +1386,14 @@ static command_t CommandTable[] =
{"fskdemod", CmdFSKdemod, 1, "Demodulate graph window as a HID FSK"},
{"fskhiddemod", CmdFSKdemodHID, 1, "Demodulate graph window as a HID FSK using raw"},
{"fskiodemod", CmdFSKdemodIO, 1, "Demodulate graph window as an IO Prox FSK using raw"},
{"fskrawdemod", CmdFSKrawdemod, 1, "[clock rate] [invert] Demodulate graph window from FSK to binary (clock = 64 or 50)(invert = 1 or 0)"},
{"fskrawdemod", CmdFSKrawdemod, 1, "[clock rate] [invert] [rchigh] [rclow] Demodulate graph window from FSK to binary (clock = 50)(invert = 1 or 0)(rchigh = 10)(rclow=8)"},
{"grid", CmdGrid, 1, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"},
{"hexsamples", CmdHexsamples, 0, "<bytes> [<offset>] -- Dump big buffer as hex bytes"},
{"hide", CmdHide, 1, "Hide graph window"},
{"hpf", CmdHpf, 1, "Remove DC offset from trace"},
{"load", CmdLoad, 1, "<filename> -- Load trace (to graph window"},
{"ltrim", CmdLtrim, 1, "<samples> -- Trim samples from left of trace"},
{"rtrim", CmdRtrim, 1, "<location to end trace> -- Trim samples from right of trace"},
{"mandemod", CmdManchesterDemod, 1, "[i] [clock rate] -- Manchester demodulate binary stream (option 'i' to invert output)"},
{"manrawdecode", Cmdmandecoderaw, 1, "Manchester decode binary stream already in graph buffer"},
{"manmod", CmdManchesterMod, 1, "[clock rate] -- Manchester modulate a binary stream"},

View file

@ -36,6 +36,7 @@ int CmdHide(const char *Cmd);
int CmdHpf(const char *Cmd);
int CmdLoad(const char *Cmd);
int CmdLtrim(const char *Cmd);
int CmdRtrim(const char *Cmd);
int Cmdmandecoderaw(const char *Cmd);
int CmdManchesterDemod(const char *Cmd);
int CmdManchesterMod(const char *Cmd);

View file

@ -571,6 +571,7 @@ int CmdVchDemod(const char *Cmd)
//by marshmellow
int CmdLFfind(const char *Cmd)
{
int ans = 0;
char cmdp = param_getchar(Cmd, 0);
if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') {
@ -582,8 +583,7 @@ int CmdLFfind(const char *Cmd)
return 0;
}
int ans = 0;
if (!offline && cmdp != '1' ){
if (!offline || (cmdp != '1') ){
ans = CmdLFRead("");
} else if (GraphTraceLen<1000) {
PrintAndLog("Data in Graphbuffer was too small.");
@ -607,7 +607,9 @@ int CmdLFfind(const char *Cmd)
ans=CmdIndalaDemod("224");
PrintAndLog("Indala (224): %s", (ans)?"YES":"NO" );
//PrintAndLog("No Known Tags Found!\n");
if (!ans)
PrintAndLog("No Known Tags Found!\n");
return 0;
}

View file

@ -34,8 +34,6 @@
#include "string.h"
#include "../include/proxmark3.h"
//static UsbCommand txcmd;
bool cmd_receive(UsbCommand* cmd) {
// Check if there is a usb packet available

View file

@ -223,7 +223,6 @@ byte_t btReceiveBank = AT91C_UDP_RX_DATA_BK0;
void usb_disable() {
// Disconnect the USB device
AT91C_BASE_PIOA->PIO_ODR = GPIO_USB_PU;
// SpinDelay(100);
// Clear all lingering interrupts
if(pUdp->UDP_ISR & AT91C_UDP_ENDBUSRES) {
@ -236,32 +235,31 @@ void usb_disable() {
//* \brief This function Activates the USB device
//*----------------------------------------------------------------------------
void usb_enable() {
// Set the PLL USB Divider
AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;
// Set the PLL USB Divider
AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;
// Specific Chip USB Initialisation
// Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock
AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;
AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);
// Specific Chip USB Initialisation
// Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock
AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;
AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);
// Enable UDP PullUp (USB_DP_PUP) : enable & Clear of the corresponding PIO
// Set in PIO mode and Configure in Output
AT91C_BASE_PIOA->PIO_PER = GPIO_USB_PU; // Set in PIO mode
// Enable UDP PullUp (USB_DP_PUP) : enable & Clear of the corresponding PIO
// Set in PIO mode and Configure in Output
AT91C_BASE_PIOA->PIO_PER = GPIO_USB_PU; // Set in PIO mode
AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU; // Configure as Output
// Clear for set the Pullup resistor
// Clear for set the Pullup resistor
AT91C_BASE_PIOA->PIO_CODR = GPIO_USB_PU;
// Disconnect and reconnect USB controller for 100ms
usb_disable();
// Disconnect and reconnect USB controller for 100ms
usb_disable();
// Wait for a short while
for (volatile size_t i=0; i<0x100000; i++);
// SpinDelay(100);
// Wait for a short while
for (volatile size_t i=0; i<0x100000; i++);
// Reconnect USB reconnect
AT91C_BASE_PIOA->PIO_SODR = GPIO_USB_PU;
AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU;
// Reconnect USB reconnect
AT91C_BASE_PIOA->PIO_SODR = GPIO_USB_PU;
AT91C_BASE_PIOA->PIO_OER = GPIO_USB_PU;
}
//*----------------------------------------------------------------------------
@ -300,28 +298,26 @@ bool usb_poll()
//* \brief Read available data from Endpoint OUT
//*----------------------------------------------------------------------------
uint32_t usb_read(byte_t* data, size_t len) {
byte_t bank = btReceiveBank;
byte_t bank = btReceiveBank;
uint32_t packetSize, nbBytesRcv = 0;
uint32_t time_out = 0;
uint32_t time_out = 0;
while (len)
{
while (len) {
if (!usb_check()) break;
if ( pUdp->UDP_CSR[AT91C_EP_OUT] & bank ) {
packetSize = MIN(pUdp->UDP_CSR[AT91C_EP_OUT] >> 16, len);
len -= packetSize;
len -= packetSize;
while(packetSize--)
data[nbBytesRcv++] = pUdp->UDP_FDR[AT91C_EP_OUT];
pUdp->UDP_CSR[AT91C_EP_OUT] &= ~(bank);
if (bank == AT91C_UDP_RX_DATA_BK0)
{
if (bank == AT91C_UDP_RX_DATA_BK0) {
bank = AT91C_UDP_RX_DATA_BK1;
} else {
} else {
bank = AT91C_UDP_RX_DATA_BK0;
}
}
}
if (time_out++ == 0x1fff) break;
if (time_out++ == 0x1fff) break;
}
btReceiveBank = bank;
@ -353,7 +349,7 @@ uint32_t usb_write(const byte_t* data, const size_t len) {
// Wait for the the first bank to be sent
while (!(pUdp->UDP_CSR[AT91C_EP_IN] & AT91C_UDP_TXCOMP)) {
if (!usb_check()) return length;
}
}
pUdp->UDP_CSR[AT91C_EP_IN] &= ~(AT91C_UDP_TXCOMP);
while (pUdp->UDP_CSR[AT91C_EP_IN] & AT91C_UDP_TXCOMP);
pUdp->UDP_CSR[AT91C_EP_IN] |= AT91C_UDP_TXPKTRDY;