Skip to main content

Tool to flash firmware onto any Silicon Labs radio running EmberZNet, CPC multi-PAN, or just a bare Gecko Bootloader

Project description

Universal Silicon Labs Flasher

Automatically communicates with radios over CPC, EZSP, or Spinel to enter the bootloader and then flashes a firmware image with XMODEM.

Installation

$ pip install universal-silabs-flasher

Usage

Usage: universal-silabs-flasher [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --device PATH_OR_URL
  --bootloader-baudrate NUMBERS   [default: 115200]
  --cpc-baudrate NUMBERS          [default: 460800, 115200, 230400]
  --ezsp-baudrate NUMBERS         [default: 115200, 460800]
  --router-baudrate NUMBERS       [default: 115200]
  --spinel-baudrate NUMBERS       [default: 460800]
  --probe-method TEXT             [default: bootloader, cpc, ezsp, spinel,
                                  router]
  --bootloader-reset ENUM_WITH_SEPARATOR
                                  Reset methods to attempt when triggering
                                  bootloader mode. Multiple methods can be
                                  chained by separating them with a comma.
                                  Valid values:  yellow, ihost, slzb07,
                                  rts_dtr, baudrate
  --help                          Show this message and exit.

Commands:
  dump-gbl-metadata
  flash
  probe
  write-ieee

Flashing firmware

For safety, firmware GBL image files are validated and their checksums verified both before sending, and by the device bootloader itself.

In addition to validating the firmware image, the version number of the firmware image currently running on the device is read.

  • If the provided firmware image type does not match the running image type, the firmware will not be flashed. Cross-flashing can be enabled with --allow-cross-flashing.
  • If the provided firmware image is a lower version than the currently running image, the downgrade will not be allowed. Downgrades can be enabled with --allow-downgrades.
  • To always upgrade/downgrade firmware to a specific version (i.e. as the entry point for an addon bundling firmware), use --ensure-exact-version.
  • All of the above logic can be skipped with --force.

Yellow

The Yellow's bootloader can always be activated with the --bootloader-reset yellow option:

$ universal-silabs-flasher \
    --device /dev/ttyAMA1 \
    --bootloader-reset yellow \
    flash \
    --firmware NabuCasa_RCP_v4.1.3_rcp-uart-hw-802154_230400.gbl

SkyConnect

The SkyConnect will be rebooted into its bootloader from the running application: either EmberZNet or CPC.

$ universal-silabs-flasher \
    --device /dev/cu.SLAB_USBtoUART \
    flash \
    --firmware NabuCasa_SkyConnect_EZSP_v7.1.3.0_ncp-uart-hw_115200.gbl

Sonoff ZBDongle-E

The Sonoff dongles use the RTS/DTR bootloader reset method:

$ universal-silabs-flasher \
    --device /dev/ttyUSB0 \
    --bootloader-reset rts_dtr \
    flash \
    --firmware ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl

Writing IEEE address

Ensure a target device running EmberZNet firmware has the correct node IEEE address:

$ universal-silabs-flasher \
    --device /dev/cu.SLAB_USBtoUART \
    write-ieee \
    --ieee 00:3c:84:ff:fe:92:bb:2c

The IEEE address can also be specified without colons: --ieee 003c84fffe92bb2c.

If the current device's IEEE address already matches the provided one, the command will not write it unnecessarily. Depending on firmware version, writing the IEEE address can be a permanent operation. If this is the case, you will need to upgrade the firmware on your adapter to a more recent release of EmberZNet or perform the one-time write with --force.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universal_silabs_flasher-0.1.2.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universal_silabs_flasher-0.1.2-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file universal_silabs_flasher-0.1.2.tar.gz.

File metadata

  • Download URL: universal_silabs_flasher-0.1.2.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for universal_silabs_flasher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bef3b8b1258b5c04052ff5ccef7e4090c1d44d9805ec2ff05254928af8f53e2f
MD5 fe524d89bf54144f52f1cbf0c4a0994f
BLAKE2b-256 d7aa63d4e17139f7e537ad8ebc55d73294fd0bd5048b6b6f0507e01af29cebec

See more details on using hashes here.

File details

Details for the file universal_silabs_flasher-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for universal_silabs_flasher-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b096a709aaf5145790d212c00d352021b151818649c8d24b6a98238854de8e9
MD5 4cc583f9eb63e97911daed253aba5ac6
BLAKE2b-256 0b783e85804b6ca2c2b5446c98199e78689835d51e460c4095169e8d118e4e52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page