iceman1001 [Mon, 10 Oct 2016 19:52:58 +0000 (21:52 +0200)]
CHG: "hf legic sim" old imp, uses two timers, we have one. I'm seriously starting on thinking about a UART instead, to read the dmabuffer. If only I knew howto.
iceman1001 [Mon, 10 Oct 2016 08:59:16 +0000 (10:59 +0200)]
CHG: "script run emlu2dump" now can read old legic hex-ascii dumps. (with spaces) and convert to a binary file
CHG: "script run emlu2html" now can read old legic hex-ascii dumps. (with spaces) and convert to a generic html file
These changes makes it easier to for old legic dumps to be used with the new "legic dump/restore/eload/esave" commands
iceman1001 [Sun, 9 Oct 2016 13:41:31 +0000 (15:41 +0200)]
CHG: "hf legic write" - now writes on the limits better.
CHG: "hf legic restore" - now restors :)
CHG: "hf legic rdmem" - now has a nice offset row above the read data. try: 'hf legic rdmem 0 100'
iceman1001 [Sat, 8 Oct 2016 17:12:51 +0000 (19:12 +0200)]
CHG: the call to TurnReadLFOn has a delay / number as parameter. Seems to be gone.
FIX: fixes to EM4050 code since when I changed the timer. It should work nice now.
iceman1001 [Fri, 7 Oct 2016 09:58:14 +0000 (11:58 +0200)]
CHG: "hf legic write" got a make over in how its called. Now called with 'offset' and 'data'
'hf legic write o 10 d 11223344' - this will write 4 bytes (0x11,0x22,0x33,0x44) to tag from offset 10 (0x0A)
iceman1001 [Thu, 6 Oct 2016 17:13:23 +0000 (19:13 +0200)]
ADD: "hf legic eload" - Load binary file to emulator memory. Use "h" for help text
ADD: "hf legic esave" - Save emulator memory to binary file. Use "h" for help text
iceman1001 [Wed, 5 Oct 2016 19:42:13 +0000 (21:42 +0200)]
CHG: command name changes..
old "hf legic info" is now "hf legic reader"
old "hf legic read" is now "hf legic rdmem"
old "hf legic decode" is now "hf legic info"
ADD: new command "hf legic dump", which will autodetect tagtype and dump all mem to a binary file.
iceman1001 [Mon, 3 Oct 2016 21:24:59 +0000 (23:24 +0200)]
CHG: changed to use BigBuff_Eml memory instead of big_buff_malloc.
CHG: downloading eml memory from device should use uint's
CHG: "hf legic read" has a different printing. It now prints 32bytes / row
iceman1001 [Mon, 3 Oct 2016 06:03:47 +0000 (08:03 +0200)]
CHG: Patch for making PM3 compatible to MCU's CDC-Host libraries Thanks to @cjbrigato to tweak the cdc imp.
https://gist.github.com/cjbrigato/ef7fc18119f7c4900efbbef9bda0eb0f
CHG: added addresize to legic select struct.
CHG: TIMER, it turns out the TC0, TC1 and TC2 is only 16bit. So adjust to use two clocks to get a 32bit timer.
CHG: code clean up in legic device side. consistency with variable names..
CHG: 'hf list legic' doesn't print the parity now.
CHG: 'hf legic read' the device side timings is starting to look much better. HUGE Thanks to @will-rbnt for endless checks and logic analyser feedback. Without his effort this would not work. What does work? We can now use ANY IV in legic. The PM3 Master version is flawed, will only work with IV=0x55.
---still broke--- my crc implementation.. I know I'm about to look into it.
CHG: and now that I do actually check on bitlenght, I can get a better annotation yet again. Looking at it raises a question, acknowledge is 0x19 or 0x39, they just don't match up with tagtype identification of 0x0D, 0x1D, 0x39. I'll need to look at a 1024 tags response in a trace with a valid reader.
CHG: saw @menshiyun 's change to localtime on github.
CHG: make sure that the 'iceman' label is in the version text. This is purely to make sure if they are using my fork or not.
CHG: according to measureement by @wilrn the actual timing for receiving tag data, is 90us (ONE) and 100us (ZERO) which is not mentioned anywhere before. What a find!
CHG: lowered the timout again, but re-added the spindelay since 14a requires 5ms powerup before entering the idle-state where tag starts to listen.
CHG: fix the ticks compare xx > 1 into xx >= 1
FIX: "hf 14a read" / "hf mf *" / "hf mfdes info" and failure when calling these commands serveral times in row.
For long transactions the sspclock compare with >1 instead of >=1 .. Now the timer resets properly.
CHG: use some #define constants for iso-commands.
FIX: This commit fixes the broken LF since I change the spindelay calls. The original problem is that spindelayus calls is incremented with21.3us each step, making it very hard to find exact timings found in the datasheets for T55x7, HID etcetc. When @marshmellow and I looked into this 2014, I had this on my back of my mind but forgot it since I didn't know how the source code / pm3 worked. This behavior in spindelayus has given the bit-period for ON/OFF measured in (us) very hard to find. Its kind of magic that it worked so far so good. Well until I started to look into the "hf legic" bitbanging ASK ON/OFF keying and that one needs a much more precis timer. Same goes for the PCF7931 code.
I've added a precise timer in the new files ticks.c and moved some older stuff from util.c to have a solid base for this.
UNTESTED, and the timings measured for t55x7 in lfops.c and other parts has not been adjusted to this "correct" timer.
CHG: reverted back from the idea of measureing in (us) microseconds, the timer is too raw, gives 10-15us delays. Now we are measuring ticks, which is (1 us = 1.5ticks)
like it was before. ie: 80us = 80*1.5 = 120ticks.