]> git.zerfleddert.de Git - proxmark3-svn/blame - armsrc/iso15693.h
fix 'hf iclass snoop'
[proxmark3-svn] / armsrc / iso15693.h
CommitLineData
d9de20fa 1//-----------------------------------------------------------------------------
2// Piwi - October 2018
3//
4// This code is licensed to you under the terms of the GNU GPL, version 2 or,
5// at your option, any later version. See the LICENSE.txt file for the text of
6// the license.
7//-----------------------------------------------------------------------------
8// Routines to support ISO 15693.
9//-----------------------------------------------------------------------------
10
3d2c9c9b 11#ifndef ISO15693_H__
12#define ISO15693_H__
d9de20fa 13
14#include <stdint.h>
3d2c9c9b 15#include <stddef.h>
16#include <stdbool.h>
d9de20fa 17
3d2c9c9b 18// Delays in SSP_CLK ticks.
19// SSP_CLK runs at 13,56MHz / 32 = 423.75kHz when simulating a tag
c41dd5f9 20#define DELAY_ISO15693_VCD_TO_VICC_SIM 132 // 132/423.75kHz = 311.5us from end of command EOF to start of tag response
21//SSP_CLK runs at 13.56MHz / 4 = 3,39MHz when acting as reader. All values should be multiples of 16
3d2c9c9b 22#define DELAY_ISO15693_VCD_TO_VICC_READER 1056 // 1056/3,39MHz = 311.5us from end of command EOF to start of tag response
c41dd5f9 23#define DELAY_ISO15693_VICC_TO_VCD_READER 1024 // 1024/3.39MHz = 302.1us between end of tag response and next reader command
ece38ef3 24// times in samples @ 212kHz when acting as reader
25#define ISO15693_READER_TIMEOUT 330 // 330/212kHz = 1558us, should be even enough for iClass tags responding to ACTALL
3d2c9c9b 26
c41dd5f9 27void Iso15693InitReader();
28void CodeIso15693AsReader(uint8_t *cmd, int n);
3d2c9c9b 29void CodeIso15693AsTag(uint8_t *cmd, size_t len);
8efd0b80 30void TransmitTo15693Reader(const uint8_t *cmd, size_t len, uint32_t *start_time, uint32_t slot_time, bool slow);
c41dd5f9 31int GetIso15693CommandFromReader(uint8_t *received, size_t max_len, uint32_t *eof_time);
32void TransmitTo15693Tag(const uint8_t *cmd, int len, uint32_t *start_time);
33int GetIso15693AnswerFromTag(uint8_t* response, uint16_t max_len, uint16_t timeout, uint32_t *eof_time);
be09ea86 34void SnoopIso15693(uint8_t jam_search_len, uint8_t *jam_search_string);
d9de20fa 35void AcquireRawAdcSamplesIso15693(void);
36void ReaderIso15693(uint32_t parameter);
37void SimTagIso15693(uint32_t parameter, uint8_t *uid);
38void BruteforceIso15693Afi(uint32_t speed);
3d2c9c9b 39void DirectTag15693Command(uint32_t datalen, uint32_t speed, uint32_t recv, uint8_t data[]);
096dee17 40void SetTag15693Uid(uint8_t *uid);
d9de20fa 41void SetDebugIso15693(uint32_t flag);
c41dd5f9 42bool LogTrace_ISO15693(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool readerToTag);
d9de20fa 43
44#endif
Impressum, Datenschutz