Petrockutil is a command line utility for interacting with petrockblock.com devices.
Petrockutil is written in the Go programming language (http://golang.org) for maximum speed and portability.
Download the binaries for your platform, unzip the archive and run the command line tool without any arguments to get usage information.
A typical series of steps would be to first
- scan for serial ports,
petrockutil scan serial
, then - read the firmware version,
petrockutil gamepadblock readversion <port>
, and then - if you do not have AVRDude installed, install it,
petrockutil gamepadblock prepare
, - update the firmware,
petrockutil gamepadblock update <port>
.
Here is a screencast that shows the usage of the tool:
We provide binaries for OSX, Windows, and Linux. You find the latest releases on our web site at https://blog.petrockblock.com/gamepadblock-downloads/.
Calling petrockutil
without any arguments prints usage information to the console:
$ ./petrockutil
NAME:
petrockutil - Command Line Utility for petrockblock.com gadgets
USAGE:
petrockutil [global options] command [command options] [arguments...]
VERSION:
1.0.0
COMMANDS:
scan Scan for connected devices on Serial, USB, or Bluetooth ports
gamepadblock Installs avrdude, read firmware version, and update firmware of your GamepadBlock
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
Usually, the first thing to do is to look for the serial com port of the device that that you want to interact with:
$ ./petrockutil scan serial
/dev/cu.Bluetooth-Incoming-Port /dev/tty.Bluetooth-Incoming-Port
/dev/cu.usbmodem1421 /dev/tty.usbmodem1421