-
Notifications
You must be signed in to change notification settings - Fork 92
HydraFW binary raw wire mode guide
This guide is updated towards firmware release HydraFW v0.8 Beta and later
This mode allows to control 2-Wire and 3-Wire (called raw-wire)
- 2-Wire pins: CLK=PB3, IO=PB4
- For more details see https://github.com/hydrabus/hydrafw/wiki/HydraFW-2wire-guide
- 3-Wire pins: CLK=PB3, SDI=PB4, SDO=PB5
- For more details see https://github.com/hydrabus/hydrafw/wiki/HydraFW-3wire-guide
Once the raw-wire mode has been selected, the following commands are available :
-
0b00000000
Return to main mode. ReturnsBBIO1
-
0b00000001
Mode identification. ReturnsRAW1
-
0b00000110
Read byte -
0b00000111
Read bit -
0b00001000
Peek input pin -
0b00001001
Clock tick -
0b0000101x
Clock low(0) / high(1) -
0b0000110x
Data low(0) / high(1) -
0b0001xxxx
Bulk raw-wire transfer -
0b0010xxxx
Bulk clock ticks -
0b0011xxxx
Bulk send bits -
0b01000000
Configure peripherals -
0b011000xx
Set raw-wire speed -
0b10000xy0
Configure raw-wire port -
0b11xxxxxx
Binary Auxiliary pins
This command ready a byte on the raw-wire bus, and sends it back to the user.
This command will send a clock pulse, then return the value of the data line to the user.
This command returns the state of the data line.
This command sends a clock pulse on the CLK line. Returns 0x01
once done.
This commands sets the CLK line low(0) or high(1). Returns 0x01
once done.
This commands sets the data line low(0) or high(1). Returns 0x01
once done.
In this mode, the last 4 bits of the command define the number of bytes to write (from 1 to 16) (Command 0b00010000
will send 1 byte). Hydrabus will wait for the defined number of bytes, then send a 0x01
(acknowledge).
In this mode, the last 4 bits of the command define the number of clock ticks to send (from 1 to 16) (Command 0b00100000
will send 1 clock tick). Returns 0x01
once done.
In this mode, the last 4 bits of the command define the number of bits to send (from 1 to 16) (Command 0b00110000
will send 1 bit). Returns 0x01
once done.
Do nothing (to be defined for future evolution).
Returns 0x01
.
This command sets the raw-wire device bitrate. The two last bits will select the speed (int bits/sec) within the following list :
-
0b00
=> 5000 -
0b01
=> 50000 -
0b10
=> 100000 -
0b11
=> 1000000
This commands returns 0x01
if successful, 0x00
in case of error.
This allows to set the following parameters :
-
w
sets the pin output (0=open drain, 1=push-pull) -
x
sets the mode (0=2-wire, 1=3-wire) -
y
sets the endianness (0=MSB, 1=LSB) -
z
sets the clock polarity (0=idle low, 1=idle high)
This commands returns 0x01
if successful, 0x00
in case of error.
- 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