-
Notifications
You must be signed in to change notification settings - Fork 92
HydraFW binary SMARTCARD mode guide
This guide is updated towards firmware release HydraFW v0.10 and later
This mode allows to control SMARTCARD
- SMARTCARD pins: /VCC=PA5, RST=PA6, CD=PA7, CLK=PA8, TX=PB6
For more details see https://github.com/hydrabus/hydrafw/wiki/HydraFW-SMARTCARD-guide
Once the SMARTCARD mode has been selected, the following commands are available :
-
0b00000000
Return to main mode. ReturnsBBIO1
-
0b00000001
Mode identification. ReturnsCRD1
-
0b00000010
RST low. Returns0x01
-
0b00000011
RST high. Returns0x01
-
0b00000100
Write-then-read (see below) -
0b00000110
Set CLK prescaler (see below) -
0b00000111
Set Guard Time (see below) -
0b01100000
Set SMARTCARD speed -
0b10000xyz
Configure SMARTCARD port -
0b11xxxxxx
Binary Auxiliary pins
This command sets the SMARTCARD device bitrate. It must be followed by 4 bytes, representing the speed in bauds (little-endian).
This commands returns 0x01
if successful, 0x00
in case of error.
This command is used to send at most 4096 bytes and will read at most 4096 bytes of data. Format :
Byte 1 2 3 4 5 6 ...
|----------|----------|----------|----------|----------|----------|------...
[command] [Bytes to write] [Bytes to read] [Data to write
The bytes to read/write are in big-endian format.
All data will be buffered before being sent to the SMARTCARD.
Read data will also be buffered on the Hydrabus. A 0x01
is sent before sending values back to the user.
This commands reads one byte, and sets the prescaler accordingly. The following formula allows to calculate the final CLK frequency :
fclk = 42000000/<prescaler_value>
This commands returns 0x01
if successful, 0x00
in case of error.
This commands reads one byte, and sets the guard time value accordingly.
This commands returns 0x01
if successful, 0x00
in case of error.
This allows to set the following parameters :
-
x
sets the parity bit (0
= even,1
= odd) -
y
sets the stop bits (0
(for 0.5 stop bits) or1
(for 1.5 stop bits)) -
z
sets the clock polarity value (0
or1
)
This commands returns 0x01
if successful, 0x00
in case of error.
See https://github.com/hydrabus/hydrafw/wiki/HydraFW-SMARTCARD-guide for more explanation.
- CHANGELOG
- Console commands
- Binary mode guide
-
NFC/HydraNFC v1 guide
- Read UID of an ISO/IEC_14443 Tag
- Read UID and data of a MIFARE Ultralight Tag
- Read UID of an ISO/IEC 15693 Tag
- Emul ISO14443a Tag
- Emul MIFARE Ultralight Tag
- Emul Mifare Classic Tag
- Unique NFC sniffer design
- Launch NFC sniffer from console
- Sniffer ISO14443A wireshark pcap
- Autonomous/stand-alone sniffer mode
- Sniffer ISO14443A real-time infinite trace mode
- HydraFW-HydraNFC-v1.x-TRF7970A-Tutorial