hydrabus / hydrafw_hydranfc_shield_v2

HydraFW dedicated to HydraBus v1 / HydraNFC Shield v2
Apache License 2.0
39 stars 11 forks source link

Improve NFC sniffer (PCD/PICC) ISO/IEC 14443A #19

Open bvernoux opened 3 years ago

bvernoux commented 3 years ago

Actual code provide basic low level sniffer for (PCD/PICC) ISO/IEC 14443A when using dnfc2 => sniff command T_SNIFF (Test special sniffer ST25R3916 MCU_CLK(PA5) and CSI CSO) It requires a Logic Analyzer or an Oscilloscope to capture the binary data then user's shall do manual decode of the PCD / PICC bit to final data. Logic Analyzer Setup: Capture trigger on Channel 0 (CSO) on rising edge

Setup example image

Example capture and "manual" decoding DSView with DSLogic U3Pro16 capture of a Mifare Classic 4K image

Picoscope capture of a Mifare Classic 1K image

Any contribution is welcome for the decoder to be embedded in Firmware or done externally on PC or even better by writing a dedicated PulseView/DSView decoder

gurujustin commented 3 years ago

Is there sniffer mode in this code?

bvernoux commented 3 years ago

So far the sniffer code for ISO14443A is not finished (so this issue will remain open until it is implemented and fully working) See https://github.com/hydrabus/hydrafw_hydranfc_shield_v2/wiki/HydraFW-HydraNFC-v2-guide-dnfc-mode#todo

Alternative way (low level requires oscilloscope/logic analyzer) to sniff any protocol (raw mode) is to use dnfc mode with command set-nfc-obsv See https://github.com/hydrabus/hydrafw_hydranfc_shield_v2/wiki/HydraFW-HydraNFC-v2-guide-dnfc-mode#debugdeveloper-mode-for-nfc-shield-v2-with-dnfc-mode-spi-low-level see "Analog Test and Observation Register 1 (Test Output CSI/CSO)"

I can provide more details in private if you are interested in this alternative low level (requiring oscilloscope/logic analyer) until the sniffer code for ISO14443A is available

gurujustin commented 3 years ago

could you explain in more detail?

bvernoux commented 3 years ago

Please contact me by Email bvernoux@hydrabus.com (and provide details where/when you have bought HydraNFC v2 + HydraBus) I do not want to provide support about that in an issue as it is very technical and requires hardware (oscilloscope/logic analyzer HydraBus+HydraNFC v2) and knowledge on ST25R3916