* using WITH_FPC:
* activate basic usart
* no double buffer for now, no interrupt
* usart_dataavailable/usart_readbuffer/usart_writebuffer, to demo it:
* pm3 client over USB, minicom over usart
* analyse a d 414243
* using WITH_FPC_HOST:
* it implies WITH_FPC as it's based on it
* control pm3 with client over usart
* EXPERIMENTAL! still some frame desync issues
* you can connect both from usart & USB with two pm3 clients
* actually you *have* to connect USB for the moment because
it's used to send debug messages about buggy usart... See Dbprintf_usb below
* "sessions": msgs are directed to the latest client to have sent a cmd
* Dbprintf_usb macro to send msgs to USB client to help debugging usart...
* We now have an option to run client at different speed as usart is 115200:
client/proxmark3 /dev/ttyUSB0 -b 115200
* Consequently, argc,argv handling is a bit revamped, it was so messy...
* USB and flashing are still at 460800, don't try flashing over usart yet ^^
- lf t55xx brute (tries bruteforcing a range of pwds
- lf t55xx chk (uses dictionary file or RDV4 flashmem)
FIX: adjust lf sim (@marshmellow42) see 7008cf9c15
"attempt 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 256th loop
iteration. some users were experiencing modulating reactions to be too slow.
ADD: 'lf t55xx chk'
It uses @marshmellows42 idea behind commit (6178b085a0)
With calculating a baseline (read block0 32times and average the signal-ish) and sampling only 1024 signal data. The algo then proceeds to calc the average and keep track of the candidate which is given the most difference in signal data average value. I do some squaring and shifting for this.
The candidate is then send back to client to be tested properly with trymodulation like before.
This seems to work good on t55xx card which has a ASK configuration.
WORK-IN-PROGRESS
CHG: 'script run read_pwd_mem.lua' - script now can print those uploaded dictionary files.
How to upload
pm3 --> mem load f default_iclass_keys i
pm3 --> mem load f default_keys m
pm3 --> mem load f default_pwd t
How to validate / view
PM3 -->scr run read_pwd_mem -o 237568 -k 8
pm3 -->scr run read_pwd_mem -o 241664 -k 6
pm3 -->scr run read_pwd_mem -o 245760 -k 4