项目作者: archaelus

项目描述 :
Buspirate Crate for Rust
高级语言: Rust
项目地址: git://github.com/archaelus/ruspirate.git
创建时间: 2018-01-15T07:53:34Z
项目社区:https://github.com/archaelus/ruspirate

开源协议:MIT License

下载


ruspirate

Buspirate Crate for Rust

Allows you to detect, open, and control a Bus Pirate from rust. Some utilities are included to read and write eeproms with it.

Prerequisites

I use nightly rust (rustc 1.25.0-nightly (e6072a7b3 2018-01-13)) for now and haven’t tested other versions.

Install and Build

  1. $ git clone https://github.com/archaelus/ruspirate.git
  2. $ cargo build

Utils

List Pirates

List attached bus pirates.

  1. $ cargo run --bin list_pirates

rpir8

The swiss army knife of rust-controlled buspirate activity.

  1. $ cargo run --bin rpir8
  2. Compiling ruspirate v0.1.0 (file:///....../rust/ruspirate)
  3. Finished dev [unoptimized + debuginfo] target(s) in 1.43 secs
  4. Running `target/debug/rpir8`
  5. Rpir8 0.1.0
  6. Geoff Cant <geoff+rust@archant.us>
  7. Bus pirates things. With Rust!
  8. USAGE:
  9. rpir8 <SUBCOMMAND>
  10. FLAGS:
  11. -h, --help Prints help information
  12. -V, --version Prints version information
  13. SUBCOMMANDS:
  14. help Prints this message or the help of the given subcommand(s)
  15. list List buspirates
  16. test Test a buspirate

List attached bus pirates:

  1. $ cargo run --bin=rpir8 list
  2. (1) "/dev/cu.usbmodem00000001" (USB VID:PID=04D8:FB00 SER=00000001 LOCATION=20-1.3.4.1)

Test the default attached bus pirate:

  1. $ cargo run --bin=rpir8 test
  2. Testing Device { device: "/dev/cu.usbmodem00000001", hwid: "USB VID:PID=04D8:FB00 SER=00000001 LOCATION=20-1.3.4.1" }
  3. Yay! Opened Some("/dev/cu.usbmodem00000001") as BusPirate { port: 3 }
  4. Good pirate (vsn One)!

Grab the reset version information of the bus pirate:

  1. $ cargo run --bin=rpir8 vsn -- -d /dev/cu.usbmodem
  2. /dev/cu.usbmodem00000001:
  3. Bus Pirate v4
  4. Firmware v6.2-beta1 r1981
  5. DEVID:0x1019 REVID:0x0004 (24FJ256GB106 UNK)
  6. http://dangerousprototypes.com