This is the tool we use to flash and pre-flight devices after manufacturing. It's a command-line (text-based) program written in Ruby that downloads firmware, flashes the device, and optionally generates and prints a label.
This tool was written and tested on a Mac, but should work on Linux just as well. It may need some modification to run on Windows.
Requires the ruby version specified. Recommended to use rbenv to manage Ruby versions.
brew install rbenv ruby-build # Mac
# or
sudo apt install rbenv # Debian/Ubuntu
rbenv init
rbenv install 3.2.2Requires esptool to flash and communicate with the ESP.
brew install esptool # Mac
pip install esptool # any system with PythonThe program will download firmware images to ~/Downloads. Make sure this directory exists!
Steps to install and set up this program.
Open a terminal window and navigate to your preferred workspace directory, then run:
git clone https://github.com/konnected-io/cli-flash-tool.git Or, download the ZIP of this repo from Github.
Installs all Ruby dependencies
cd cli-flash-tool
bundleCopy the config.yaml.example file in the root of this repo to config.yaml:
cp config.yaml.example config.yamlNow edit the config.yaml with your settings and preferences. Here's an example:
flash: true
network_check: true
label_printer:
enabled: true
type: pdf
name: Brother_QL_810W
ip: 192.168.1.33
serial_port_pattern: /dev/cu.usbserial*Set to true to flash the firmware, otherwise firmware will not be modified.
Set to true to run the Alarm Panel Pro network check.
- enabled -
trueto enable label printing - type -
zplif using a Zebra printer, otherwisepdf - name - The CUPS name of the printer (use
lpstat -a) - ip - The IP address of the printer (only needed when using Zebra printers)
A file path pattern to scan for devices connected via USB/UART ports.
Run the program by executing it in Ruby:
bundle exec ruby cli_flash_tool.rbFollow on-screen prompts to select the product and download the firmware image. Once the flash tool starts, plug in your device to a USB hub and it will start flashing automatically!
Press CTRL-C to exit.