Difference between revisions of "Bus Pirate: First steps"
Jostrowski (talk | contribs) (Finish Linux section) |
|||
(8 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
Here the upgrade process for the Bus Pirate v3.6 will be showcased. | Here the upgrade process for the Bus Pirate v3.6 will be showcased for [1.] Windows using the GUI application and for [2.] Linux using the console application. | ||
This will use the tutorial provided by the [http://dangerousprototypes.com/docs/Bus_Pirate manufacture] and the [https://github.com/BusPirate/Bus_Pirate github repository] | This will use the tutorial provided by the [http://dangerousprototypes.com/docs/Bus_Pirate manufacture] and the [https://github.com/BusPirate/Bus_Pirate github repository] | ||
== Description == | == Description == | ||
The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff. It's got a bunch of features an intrepid hacker might need to prototype their next project. The Bus Pirate is used through a simple terminal interface. | The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff. It's got a bunch of features an intrepid hacker might need to prototype their next project. The Bus Pirate is used through a simple terminal interface. | ||
For [http://dangerousprototypes.com/docs/Bus_Pirate_menu_options_guide#I_Hardware.2C_firmware.2C_microcontroller_version_information all commands visit the manufactures website] | |||
'''Protocols | '''Protocols | ||
Line 31: | Line 28: | ||
* flashrom bios/flash programmer | * flashrom bios/flash programmer | ||
== Windows == | == [1.] Windows == | ||
; Check Bus Pirate Version | |||
: Connect via Putty (baud rate 115200) to the Bus Pirate and type <code>i</code> | |||
HiZ>i | |||
Bus Pirate v3b | |||
Firmware v5.10 (r559) Bootloader v4.4 | |||
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) | |||
http://dangerousprototypes.com | |||
: Hardware v3b and v3.5 shipped with '''bootloader v4+, continue below''' | |||
: Hardware v3a and v2go shipped with '''bootloader v2''', please see the [http://dangerousprototypes.com/docs/Bus_Pirate#Bus_Pirate_v3_bootloader_upgradesbootloader upgrade guide] | |||
*; Enter Bus Pirate Bootloader mode (2 options) | |||
: 1. Connect via Putty to the Bus Pirate and type <code>$</code> (! after this you have to close the application otherwise the firmware loader can not connect) | |||
: 2. Connect the two pins: PGD and PGC (see image: [http://dangerousprototypes.com/docs/images/thumb/2/26/Bpv3-upgrade-jumper.jpg/250px-Bpv3-upgrade-jumper.jpg]) | |||
* Download: https://github.com/mikebdp2/Bus_Pirate.git | |||
* Navigate to Bus_Pirate\BPv3-bootloader\ds30_Loader_GUI | |||
*; Run 'ds30 Loader GUI.exe' | |||
* Click Connect / and select the firmware image (found under Bus_Pirate\package_latest\BPv3\bpv3_fw7.0_opt2_18092016.hex) | |||
* Click Load | |||
== [2.] Linux == | |||
=== Communicate with the Bus Pirate === | === Communicate with the Bus Pirate === | ||
;Install minicom serial reader/writer | ; Install minicom serial reader/writer | ||
:<code> sudo apt install minicom</code> | : <code> sudo apt install minicom</code> | ||
;Connect BusPirate to the computer | ; Connect BusPirate to the computer | ||
:Check on what port the Bus Pirate connected to: | : Check on what port the Bus Pirate connected to: | ||
:<code>dmesg | tail</code> | : <code>dmesg | tail</code> | ||
j@laptop:~$ dmesg | tail | j@laptop:~$ dmesg | tail | ||
Line 60: | Line 73: | ||
[ 765.891161] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0 | [ 765.891161] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0 | ||
;Configure minicom | ; Configure minicom | ||
:<code>minicom -s</code> | : <code>minicom -s</code> | ||
:select <code>Serial port setup</code> | : select <code>Serial port setup</code> | ||
:set to following parameters: | : set to following parameters: | ||
+-----------------------------------------------------------------------+ | +-----------------------------------------------------------------------+ | ||
Line 77: | Line 90: | ||
+-----------------------------------------------------------------------+ | +-----------------------------------------------------------------------+ | ||
:Then <code>Save setup as dfl</code> | : Then <code>Save setup as dfl</code> | ||
;Connect to Bus Pirate | ; Connect to Bus Pirate | ||
:<code>sudo minicom</code> | : <code>sudo minicom</code> | ||
:Press Enter and following should be displayed: | : Press Enter and following should be displayed: | ||
Welcome to minicom 2.7.1 | Welcome to minicom 2.7.1 | ||
OPTIONS: I18n | OPTIONS: I18n | ||
Line 90: | Line 103: | ||
'''If <code>Hiz/></code> is not being displayed the connection was not successful | '''If <code>Hiz/></code> is not being displayed the connection was not successful | ||
;Get Bus Pirate version | ; Get Bus Pirate version | ||
:Enter: <code>i</code> | : Enter: <code>i</code> | ||
HiZ>i | HiZ>i | ||
Line 103: | Line 116: | ||
Hardware v3a and v2go shipped with '''bootloader v2''', please see the [http://dangerousprototypes.com/docs/Bus_Pirate#Bus_Pirate_v3_bootloader_upgradesbootloader upgrade guide] | Hardware v3a and v2go shipped with '''bootloader v2''', please see the [http://dangerousprototypes.com/docs/Bus_Pirate#Bus_Pirate_v3_bootloader_upgradesbootloader upgrade guide] | ||
For [http://dangerousprototypes.com/docs/Bus_Pirate_menu_options_guide#I_Hardware.2C_firmware.2C_microcontroller_version_information all commands visit the manufactures website] | |||
== Update Firmware == | |||
In general there are two options. You can: | |||
# Build the [http://dangerousprototypes.com/docs/Compile_the_Bus_Pirate_firmware source code yourself] | |||
# Or use a precompiled binary of the firmware: ('''recommended''') | |||
'''This tutorial is using the latest community package 7.1 for the BusPiratev3''' | |||
'''The latest is posted in [[http://dangerousprototypes.com/forum/index.php?topic=8498.135 here]]''' (usually by the user called USBEprom) | |||
'''IMPORTANT: In order to update to v7.1 you need to upgrade the bootloader to v4.5''' (see [http://dangerousprototypes.com/forum/index.php?topic=8498.135 forum discussion], otherwise <code>$</code> to enter the bootloader will not work) | |||
''This tutorial is using Windows, if you have a Linux system please read "How to update with pirate-loader.rtf" in the downloaded folder'' | |||
; Download firmware v7.1 for Bus Pirate v3.6 | |||
;Download firmware v7 for Bus Pirate v3.6 | : Latest post by USBEprom: http://dangerousprototypes.com/forum/index.php?topic=8498.120 | ||
:<code> | : Or if the site is unavailable use this copy [[File:BPv3-bootloaderv4xtov45-update-vb ENG-g2.7z]] @credits to USBEprom (Note: Read the the summary!) | ||
: | ; Update Bootloader | ||
* Check the bootloader version, it needs to be 4.1+, otherwise follow the description in "How to use UPGRADE_TO_BL_v4.5.bat.rft" | |||
* Change the COM-port to the correct one in UPGRADE_TO_BL_v4.5.bat | |||
* Save changes | |||
* Enter Bootloader (2 options): | |||
:: 1. connect via some serial terminal (eg. minicom) and enter <code>$</code> (! after this you have to close the application otherwise the firmware loader can not connect) '''recommended''' | |||
:: 2. connect the two pins: PGD and PGC (see image: [http://dangerousprototypes.com/docs/images/thumb/2/26/Bpv3-upgrade-jumper.jpg/250px-Bpv3-upgrade-jumper.jpg]) | |||
* Run UPGRADE_TO_BL_v4.5.bat | |||
* Ignore the error: Erasing page 42, a800...ERROR [50], Error updating firmware :( | |||
* Unplug an re-plug the USB cable of the BusPirate v3 | |||
* Open the terminal and press <code>space</code> for further instructions | |||
* Type <code>yes</code> if prompted -> This will overwrite the old bootloader | |||
; Upgrade the firmware: | |||
* Change COM-port to correct one in UPGRADE_FW_S_1-29092019.hex.bat | |||
* Save changed file | |||
* Run the file | |||
* Ignore error: Erasing page 42, a800...ERROR [50] Error updating firmware :( | |||
* Unplug and re-plug the BusPirate | |||
* Done! | |||
HiZ>i | |||
Bus Pirate v3.5 | |||
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5 | |||
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8) | |||
http://dangerousprototypes.com | |||
== Used Hardware == | == Used Hardware == |
Latest revision as of 09:57, 31 March 2023
Summary
Here the upgrade process for the Bus Pirate v3.6 will be showcased for [1.] Windows using the GUI application and for [2.] Linux using the console application.
This will use the tutorial provided by the manufacture and the github repository
Description
The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff. It's got a bunch of features an intrepid hacker might need to prototype their next project. The Bus Pirate is used through a simple terminal interface.
For all commands visit the manufactures website
Protocols
- 1-Wire
- I2C
- SPI
- JTAG
- Asynchronous serial
- MIDI
- PC keyboard
- HD44780 LCD
- 2- and 3-wire libraries with bitwise pin control
- Scriptable binary bitbang, 1-Wire, I2C, SPI, and UART modes.
Application Support
- AVRDude AVR programmer (AVRDude v5.8+, firmware v4 (any) or v5.9+)
- OpenOCD JTAG debugger
- flashrom bios/flash programmer
[1.] Windows
- Check Bus Pirate Version
- Connect via Putty (baud rate 115200) to the Bus Pirate and type
i
HiZ>i Bus Pirate v3b Firmware v5.10 (r559) Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com
- Hardware v3b and v3.5 shipped with bootloader v4+, continue below
- Hardware v3a and v2go shipped with bootloader v2, please see the upgrade guide
- Enter Bus Pirate Bootloader mode (2 options)
- 1. Connect via Putty to the Bus Pirate and type
$
(! after this you have to close the application otherwise the firmware loader can not connect) - 2. Connect the two pins: PGD and PGC (see image: [1])
- Download: https://github.com/mikebdp2/Bus_Pirate.git
- Navigate to Bus_Pirate\BPv3-bootloader\ds30_Loader_GUI
- Run 'ds30 Loader GUI.exe'
- Click Connect / and select the firmware image (found under Bus_Pirate\package_latest\BPv3\bpv3_fw7.0_opt2_18092016.hex)
- Click Load
[2.] Linux
Communicate with the Bus Pirate
- Install minicom serial reader/writer
sudo apt install minicom
- Connect BusPirate to the computer
- Check on what port the Bus Pirate connected to:
dmesg | tail
j@laptop:~$ dmesg | tail [ 760.610683] ftdi_sio 1-1.2:1.0: device disconnected [ 765.780110] usb 1-1.2: new full-speed USB device number 7 using xhci_hcd [ 765.887218] usb 1-1.2: New USB device found, idVendor=0403, idProduct=6001 [ 765.887224] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 765.887227] usb 1-1.2: Product: FT232R USB UART [ 765.887230] usb 1-1.2: Manufacturer: FTDI [ 765.887233] usb 1-1.2: SerialNumber: A907NRH0 [ 765.890644] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected [ 765.890768] usb 1-1.2: Detected FT232RL [ 765.891161] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
- Configure minicom
minicom -s
- select
Serial port setup
- set to following parameters:
+-----------------------------------------------------------------------+ | A - Serial Device : /dev/ttyUSB0 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : No | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+
- Then
Save setup as dfl
- Connect to Bus Pirate
sudo minicom
- Press Enter and following should be displayed:
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyUSB0, 16:23:34 Press CTRL-A Z for help on special keys HiZ>
If Hiz/>
is not being displayed the connection was not successful
- Get Bus Pirate version
- Enter:
i
HiZ>i Bus Pirate v3b Firmware v5.10 (r559) Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com
Hardware v3b and v3.5 shipped with bootloader v4+, continue below
Hardware v3a and v2go shipped with bootloader v2, please see the upgrade guide
For all commands visit the manufactures website
Update Firmware
In general there are two options. You can:
- Build the source code yourself
- Or use a precompiled binary of the firmware: (recommended)
This tutorial is using the latest community package 7.1 for the BusPiratev3
The latest is posted in [here] (usually by the user called USBEprom)
IMPORTANT: In order to update to v7.1 you need to upgrade the bootloader to v4.5 (see forum discussion, otherwise $
to enter the bootloader will not work)
This tutorial is using Windows, if you have a Linux system please read "How to update with pirate-loader.rtf" in the downloaded folder
- Download firmware v7.1 for Bus Pirate v3.6
- Latest post by USBEprom: http://dangerousprototypes.com/forum/index.php?topic=8498.120
- Or if the site is unavailable use this copy File:BPv3-bootloaderv4xtov45-update-vb ENG-g2.7z @credits to USBEprom (Note: Read the the summary!)
- Update Bootloader
- Check the bootloader version, it needs to be 4.1+, otherwise follow the description in "How to use UPGRADE_TO_BL_v4.5.bat.rft"
- Change the COM-port to the correct one in UPGRADE_TO_BL_v4.5.bat
- Save changes
- Enter Bootloader (2 options):
- 1. connect via some serial terminal (eg. minicom) and enter
$
(! after this you have to close the application otherwise the firmware loader can not connect) recommended - 2. connect the two pins: PGD and PGC (see image: [2])
- 1. connect via some serial terminal (eg. minicom) and enter
- Run UPGRADE_TO_BL_v4.5.bat
- Ignore the error: Erasing page 42, a800...ERROR [50], Error updating firmware :(
- Unplug an re-plug the USB cable of the BusPirate v3
- Open the terminal and press
space
for further instructions - Type
yes
if prompted -> This will overwrite the old bootloader
- Upgrade the firmware
- Change COM-port to correct one in UPGRADE_FW_S_1-29092019.hex.bat
- Save changed file
- Run the file
- Ignore error: Erasing page 42, a800...ERROR [50] Error updating firmware :(
- Unplug and re-plug the BusPirate
- Done!
HiZ>i Bus Pirate v3.5 Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5 DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8) http://dangerousprototypes.com
Used Hardware
Bus Pirate v3.6 Universal serial interface