-
Notifications
You must be signed in to change notification settings - Fork 7
Home
The pok3rtool
CLI application runs on Linux, Windows, and Mac OS X. Along with some development
tools, pok3rtool
implements the firmware update protocol over USB for the POK3R and POK3R RGB.
The pok3rtool
executable is built with CMake. You will need the LibChaos submodule cloned to
build it. After it is compiled, it should have no runtime dependencies, and can be run portably.
WARNING: THIS TOOL CAN VERY EASILY BRICK YOUR KEYBOARD IF USED INCORRECTLY, MAKING IT UNUSABLE WITHOUT EXPENSIVE DEVELOPMENT TOOLS. READ THE DOCUMENTATION, POSSIBLY READ THE CODE, AND PROCEED AT YOUR OWN RISK.
To elaborate on the above warning, most of the pok3rtool commands are read-only, and reasonably
safe. The two commands that modify flash, setversion
and flash
, should be used carefully.
For example, there is no good way for the flash
command to tell if the provided file is really
valid firmware. There is some protection in the bootloader from jumping blindly into any data,
but if broken firmware is uploaded, the bootloader may get stuck in a hard fault loop. There is
no way to prevent the bootloader from starting the main firmware, so this effectively bricks
the keyboard.
In case the above happens to you, and you have access to a hardware debugger (eg. Segger J-Link), this can be fixed fairly simply. The first time, the microcontroller must be unlocked. This will erase the flash, and the correct firmware image can then be uploaded.
After the first time, the procedure is much faster. In the OpenOCD telnet prompt, type
flash erase_address VERSION_ADDRESS 0x400
, where VERSION_ADDRESS
is the base address of the
firmware version information. See the corresponding wiki page for your keyboard.
list
Finds all connected supported devices and reads their versions.
version
Read the version from the keyboard.
setversion <version string>
Write the version to the keyboard. The version can be any string value, within a reasonable length.
info
Read miscellaneous information from the keyboard. For development.
reboot
Reset the keyboard to the main firmware.
bootloader
Reset the keyboard to the bootloader firmware.
dump <output>
On patched firmware, read the contents of flash out of the keyboard. For development.
flash <version string> <firmware bin file>
Write new firmware and version to the keyboard.
--ok
Suppress warning message.
-t | --type
Specify the device type to connect to.
Type | Description |
---|---|
pok3r | Vortex POK3R |
pok3r-rgb | Vortex POK3R RGB |
vortex-core | Vortex Core |
vortex-tester | Vortex Switch Tester |
./pok3rtool version
Read the version from any device.
./pok3rtool -t pok3r bootloader
Reset to the bootloader firmware on a POK3R.
./pok3rtool --ok -t pok3r-rgb flash V130 disassemble/pok3r_rgb/v130/firmware_v130.bin
Upload firmware to a POK3R RGB, set the version "V130".