# Firmware

The gripper has no firmware of its own: it runs the Spectral Micro driver's firmware with gripper mode turned on. This
site describes the firmware release named in the version box on the landing page, for the gripper release the
site is versioned by; a new firmware release for the same gripper updates these pages in place.

## Which release does my gripper run?

Over CAN, Send_Respond_Device_Info returns the firmware version as its third byte; over UART, `#Info` prints
`Software version: <number>`. The [compatibility table](https://docs.source-robotics.com/SSG48-gripper-docs/2/appendix/compatibility/) says which releases go with
which Python library and bootloader.

## Updating

A gripper shipped with firmware 105 or newer carries the driver's bootloader and updates over its CAN cable: the
host tells the driver to reset, the bootloader waits two seconds for a host, and the host streams the new image
into it. Nothing is opened. The image is `spectral-bldc-firmware-V<number>.bin` from the driver's
[GitHub releases](https://github.com/Source-Robotics/Spectral-Micro-BLDC-controller/releases), with a manifest
`firmware.json` and the release notes.

| From | How |
|---|---|
| a PC with the CANvas adapter | [Motor GUI](https://motorgui.com/) over CAN: choose the release, the GUI fetches the image and flashes it |
| a PC, scripted | `host_tools/bl_flash.py` from the [bootloader repository](https://github.com/Source-Robotics/stm32f103c-bootloader), over CAN (slcan or gs_usb adapters) or over the driver's UART port |
| a PAR6 control box | the box updates every device on its bus, the gripper included, from its dashboard or `tools/flash_motor_firmware.py` |

The procedure, the bootloader's protocol and what to do when a flash is interrupted are in the Spectral Micro
documentation: [Updating through the bootloader](https://docs.source-robotics.com/Spectral-BLDC-docs/latest/07-firmware/update/)
and [The bootloader](https://docs.source-robotics.com/Spectral-BLDC-docs/latest/07-firmware/the-bootloader/).

!!! warning "Before you update"
    - Open the gripper or take the object out: it loses its grip during the update and until it is calibrated
      and commanded again.
    - An update may clear the driver's configuration (the release notes say so when it does). A bought gripper's
      configuration is in [Driver configuration](https://docs.source-robotics.com/SSG48-gripper-docs/2/build/first-run/), so it can be restored; note
      what `#Info` prints before you start.
    - Give the gripper a node ID from 0 to 13: the bootloader cannot address 14 or 15.

!!! success "Check"
    After the update, `#Info` prints the new release as `Software version: <number>` (Send_Respond_Device_Info
    over CAN), and the gripper calibrates. If its configuration was cleared, restore it:
    [Driver configuration](https://docs.source-robotics.com/SSG48-gripper-docs/2/build/first-run/).

## Grippers shipped before 2026

Grippers shipped with firmware 104 or older, which is every SSG-48 before the bootloader releases of 2026, have
no bootloader. Their driver is updated once with a programming adapter on its JTAG pads, inside the body under
the coupler connector, as described in
[Installing the bootloader on an older board](https://docs.source-robotics.com/Spectral-BLDC-docs/latest/07-firmware/bootloader/).
From then on the gripper updates over CAN like any other. A gripper on firmware 101 or 104 works as this manual
describes, with the differences the [Spectral Micro site's version 101](https://docs.source-robotics.com/Spectral-BLDC-docs/101/)
documents: the calibration messages and a few commands.

## Release notes

The release notes of every Spectral release up to the one this site describes are in the appendix,
[Firmware release notes](https://docs.source-robotics.com/SSG48-gripper-docs/2/appendix/firmware-release-notes/).
