This involves a refactor to the arm HID code to allow for arbitrary
preambles (such as HID Proximity and Paradox).
The client also borrows from the HID code, but is not shared, so could
use a significant refactor in the future.
* rework iso14443b device functions
* hf_read_rx_xcorr.v: transfer i/q pair in one 16bit frame
* hi_read_tx.v: invert ssp_dout. When nothing is transferred (ssp_dout=0), this results in no modulation (carrier on)
* adjust arm sources accordingly
* iso14443b.c: switch off carrier after hf 14b sri512read and hf 14b srix4kread
* iso14443b.c: fix DMA circular buffer handling
**DEVICE FIRMWARE UPDATE**
The code changes needed to support long tag emulation required an update to the device firmware. As of this patch, devices running older firmware will not be able to read or emulate HID tags until the firmware is updated. Additionally, devices with the firmware from this update or newer will not properly read or encode HID tags with a prior version client.
The 'lf hid encode' command has been further refined, and is now entirely parameterized to support use of fields other than facility code and card number. The client help data has been updated to show the correct syntax.
to use lf config settings instead of it's own settings. (now allows
full options of lf config...)
also it will now run `data samples` when the command completes making it
not necessary to run manually...
note: adjusted client wait message as it was confusing.
by setting delay to 0 we can use cmd binary to bitbang the antenna.
note that the timing isn't perfect (especially on the off periods) but
is fairly close. worst i've seen it off is 8us on a large off period.
but i don't have the best test equipment...
cotag read could enter endless loop, now cancels if the next bit doesn't
appear
em4x05 detection would loop due to a threshold never being met, now has
a dump out after 1000 samples tested.
fixed some indenting in hitag2 while i was reviewing that code for
potential endless loops...
* adjust LFSim to download lf fpga prior to setting emulation buffer to prevent buffer overwrite condition if you are coming from HF fpga.
* fix lf sim big buff overwrite with fpga download. Move fix to the buffer download cmd.
.. data for both format types (64 bit and 224 bit)
also adjust 224 bit demod and clone to output and input in PSK2 instead
of PSK1 as this appears to be most common for this format.
... to speed up the loops waiting for carrier signal to go high or low
by only checking for a halt (button press or usbpol) every 1000th loop
iteration.
some users were experiencing modulating reactions to be too slow.
add parameter for # bits to read
auto get samples after lf read/snoop (don't need to do a `data samples`
anymore)
add safe function to get DemodBuffer
add some lf demod comments and apply new lf_read function instead of
read then get samples.
fixed output bug in lf t55xx config print
fixed small bug in lf t55xx detect during ST check
fix noralsy demod bug (st should be true)
fix sprint_bin_break bug (didn't print last bit)
add a function to save/restore demodbuffer
remove redundant countFC call in PSKDemod
clean up pskclockdetect functions
fix indala26decode bug (end of data sometimes not correct)
improve PSK detection / demodulation
improve NRZ detection
improve t55xx commands & fix a few bugs
add t55xx page1 detection - added it to lf search
added experimental t55xx testmode write
helps get the data dumped even if positioning isn't 100% perfect.
also switched em4x05 commands to WaitUS instead of SpinDelayUs, per
@pwpiwi 's suggestion.
plus some minor adjustments
and added a quick em4x05 test:
bool EM4x05Block0Test(uint32_t *wordData)
if successful very likely the tag is an em4x05 or compatible...
@iceman1001 s updates + some of my own.
still more to do:
-auto demod responses
-figure out config block
-figure out block 0 info / serial # in block 1
-figure out block 3 protection data
-add dump all blocks cmd
...as it is currently understood - need to add base 12 printed ID to
demod output...
add Q5 option to pyramid
fix missing include I mistakenly removed in cmdlf
lf viking from other users - just put my spin on it
lf awid refactored code - possible to make it not 26bit specific now
with minor chanages
lfdemod.c now supports extra debug printing if `data setdebug` = 2 when
not on device (on client not arm)
slight adjustment to lf t55xx sampling code to start at the same spot
more consistently
reduce indala detection false positives
lf t55xx commands heavily tested and seem to be stable and reliable on
most modulations/bitrates (excluding Sequence Terminator configured
cards).
@iceman1001 s cleanup of some t55xx read code, plus some timing tests to
improve lf t5 detect/read...
small typo in pcf 16 address bytes instead of 4...
add option for verbose or not on bigbuf clear cmd.