This simple script stores 1, 2 or 3 different EM4102 on a single T5577.
There is an option to enter the number engraved on the fob in decimal form.
The script can therefore be useful if the original EM4102 doesn't work but
has an engraved ID number. By entering such an ID as a single EM4102, we
can create a working copy of our damaged fob.
A tag T5577 created in this way works with the following USB readers:
- ACM08Y
- ACM26C
- Sycreader R60D
- Elatech Multitech TWN4
Signed-off-by: Jarek Barwinski <116510448+jareckib@users.noreply.github.com>
since this is somekind of work in progress, I'm still going for a PR.
This commit is reworking some comments and making the code stable
(at least as good es or better as before).
Also made als const as #define
first steps in understading and optimizing this function.
replace != with < - if we don't poll fast enough, it is possible that
the condition != is missed.
still not done with DemodPCF7931(). But now including changes in ReadPCF7931().
They work tightly together.
Trying to resolve some issues and bugs. Basically it seems to work and
my results are consistent. However, they still deviate from what I get if
I do analyze the signal using lf read and data commands.
still some issues somewhere.
demod function now seems to work basically. Not all error cases are handled I guess.
Also still debug prints, since I've to figure out the rest.
Also unclear, why limit the buffer size to 1-2 blocks only?
firs commit of a few to come.
First renames of variables, added a few comments to improve clarity.
Fixed types (int -> unitx_t , const, ...) - not all. still some to come
Fixed 2 conditions that did not work properly. Here some explanation:
Imagine dest[i-1] = 255 and dest[i] = 0. THis would mean a clear falling edge.
However, this code would not work, since dest[i] > lmax is not true.
This condition only works if I have at least 1 sample between lmax and 255.
Same for the other way around.