HydraFW Binary mode guide - hydrabus/hydrafw GitHub Wiki
HydraFW Binary mode guide
This guide is updated towards firmware release HydraFW v0.11 and later
Binary mode description:
Like the bus pirate, HydraBus can be used inwith a more compact protocol which allows scripting its usage
- Syntax is similar to bus pirate (where applicable)
- Currently supported modes :
- Raw-wire
- 2-WIRE (Since 3679dc0601220ee4ac897d7e3af4cb59b545e984)
- 3-WIRE (Since a9681c5e39155f7ae1b6e1b2668950ef70b1223b)
- I2C (Since 53ab788fa02beac41ae7e1d3e392f5bc38fd8b83)
- SPI (Since a6c9697a7f69feabd5f0452d7940fcfad4630b5e)
- JTAG/OpenOCD (Since f5350d1e25358f6e86d496d035a172ea5c7baa81)
- CAN (Since da87a52f0078185c5a3df9d2279181216ec442a1)
- PIN (Since e9451c71dfbe44fe5623be493c0cfa1c307aae29)
- NAND Flash (Since 0685c439a9765073dd5848872f7f174ed7bbe8aa)
- SMARTCARD (Since e93be6ced16bcbc0faacd2ac24fa5fa1bedf6d0e)
- NFC Reader (Since 0264ac7515d2811576b6db2af00ab7878686ee3e)
- MMC (Since 532e4ed70666062f10f2fe47bd6108e64f4e9e10)
- SDIO (Since 28deb4fdfefc1e2d2a41c364197147b16e42d8c3)
- Auxiliary pins (Since 858de3f1fe260b07ad0d0893f3bded5ee730b018)
- Raw-wire
Note All hex (0x00) or binary (0b00000000) values below represent a raw byte, not an ASCII string.
Usage
Enter binary mode
Send 20 0x00 (null bytes) to Hydrabus. It should then respond with the string BBIO1
Main mode commands
0b00000000Reset binary mode. ReturnsBBIO10b00000001SPI mode ReturnsSPI10b00000010I2C mode ReturnsI2C10b00000011UART mode ReturnsART10b000001001-Wire mode Returns1W010b00000101Raw-wire mode ReturnsRAW10b00000110JTAG/OpenOCD mode. ReturnsOCD10b00001000CAN mode ReturnsCAN10b00001001PIN mode ReturnsPIN10b00001010NAND Flash mode ReturnsFLA10b00001011SMARTCARD mode ReturnsCRD10b00001100NFC Reader mode ReturnsNFC10b00001101MMC mode ReturnsMMC10b00001110SDIO mode ReturnsSDI10b00001111Returns to console mode. (Ctrl-O (SI) can be pressed if you need to exit Binary Mode from a Console Terminal app). ReturnsHydrabus
Utilities
0b00010100Read ADC (PA1). Returns 2 bytes with the ADC value (big-endian).0b00010101Read ADC (PA1) continuously. Returns ADC values continuously. Stop by sending0x00.0b00010110Read PWM frequency (PC6). Returns frequency in Hz (4 bytes), then duty cycle in % (4 bytes).
Auxiliary-pins
0b11000000Read auxiliary pins0b1101wxyzWrite auxiliary pins0b11100000Read auxiliary pins mode0b11110000Set auxiliary pins mode
Auxiliary-pins are not available for all BBIO modes see each BBIO mode to check if available.
For more details on Binary Auxiliary-pins see https://github.com/hydrabus/hydrafw/wiki/Auxiliary-pins
Related information
Information about the bus pirate binary mode is available here : http://dangerousprototypes.com/2009/10/09/bus-pirate-raw-bitbang-mode/
In order to use Binary mode on any computer see Python 3.6+ library https://github.com/hydrabus/pyHydrabus