Riproedit the CC2531 USB dongle firmware via CC Debugger

4 minutes of reading
PURPOSES OF PROJET:
  • Riproedit the firmware of a CC2531 USB dongle (in the example we will use the version required for use with zigbee2mqtt)
  • Difficulty level: medium
CONCEPTS FACED:
  • Riprofirmware grammation
SOFTWARE COMPONENTS USED:
  • Various (depending on the operating system used on the support computer)
PHYSICAL DEVICES USED:
PROJET MOST INDICATED FOR:

All environments

Notes and disclaimer
  • qualsiasi eventuale modifica agli impianti domestici dev'essere progettata ed realizzata SOLO da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.
Driving review: 1.1

Abstract

Every electronic device contains broadly a small piece of softwareCalled firmware, which determines its functions and behavior. Our car is equipped with different firmware; it has one, the washing machine, our remote control, even a clock radio has a profirst firmware.

Il CC2531 USB dongle it's a small and inexpensive component which allows, combined with the software zigbee2mqtt, to define a BRIDGE/Gateway ZigBee↔︎MQTT useful for administering a network ZigBee in profirst personal home automation (and therefore accessories based on this standard); unfortunately, the component is not pronto use (as, differently, other similar components like the ConBee, which however cost more) but provides, upstream, for a reprogrammation of its firmware in order to make it operational.

This guide illustrates one of the ways of reprogrammation through a support computer (equipped with Microsoft Window 10 operating system, macOS or Linux) and of connection devices, or the CC Debugger and the download cable for CC2531.

CC Debugger
the Texas Instruments CC Debugger.

In case i don't have the necessary components to the riprogrammation (like, appgrease, the CC Debugger and the connection cables), another based only on the use of a Raspberry Pi è available.

This guide is obviously usable also with other firmware compatible with CC2531.

It starts

Windows

SMARTRF FLASH PROGRAMMER

First you need to download the 1 version (not the 2 or higher) of the software SmartRF Flash programmer of Texas Instruments. To do this you need to have an account on the Texas site, which you can get prior free registration.

DC DEBUGGER DRIVER

Once the software has been installed, connect the CC Debugger and install the driver needed to control it, taking care to check, later, that in the list of device connected to Windows appaia properly configured:

CC Debugger Windows driver

If the CC Debugger is not recognized correctly, you can install the driver manually by following the instructions in this short video:

FIRMWARE

Download the version of the firmware necessary for the reproming.

CONNECTIONS

At this point it is necessary to connect the CC Debugger al download cable and the latter to the CC2531 unit; at this point connect both the CC Debugger unit CC2531 to the USB ports of the computer.

CC Debugger CC2531 download cable
the connection between the components (image from zigbee2mqtt.io).

Commonly the CC Debugger status LED should be green; if it is not, press the reset button.
Nb Some models of CC Debugger, however, always remain with red LED light, so there is no need to worry.

RIPROming

At this point we are pronti for riproprogram the CC2531. Run theapplished here SmartRF previously installed and configure it as follows, taking care to choose, as firmware, the file with extension “HEX”Present in the package signed previously downloaded (attention to no choose the file with the extension “BIN"):

SmartRF - settings riproCC2531 grammation
SmartRF settings (image from zigbee2mqtt.io).

Finally, click on "Perform actions”To perform the reproprogramming.
At the end of the procedura, unplug everything: the CC2531 è pronto use.

macOS

On this operating system the procedura is done via the command line from the terminal.

PRE-REQUIREMENTS

First of all it is necessary to respect various pre-requisites, which provide for the presence on the operating system of some packages to support the re toolproprogramming; to install them we recommend using the package manager Homebrew which installs - always from the command line - through:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once Homebrew is installed, install the necessary packages using the command:

brew install autoconf automake libusb boost pkgconfig libtool

At this point it is necessary to build the CC Tool package using the following commands:

git clone https://github.com/dashesy/cc-tool.git
cd cc-tool
./bootstrap
./configure
make

at the end, progive over.

FIRMWARE

Download the version of the firmware necessary for the reproming.

CONNECTIONS

At this point it is necessary to connect the CC Debugger al download cable and the latter to the CC2531 unit; at this point connect both the CC Debugger unit CC2531 to the USB ports of the computer.

CC Debugger CC2531 download cable
the connection between the components (image from zigbee2mqtt.io).

Commonly the CC Debugger status LED should be green; if it is not, press the reset button.
Nb Some models of CC Debugger, however, always remain with red LED light, so there is no need to worry.

RIPROming

Finally, unzip the firmware and execute the command:

sudo ./cc-tool -e -w CC2531ZNP-Prod.hex

Nb Obviously the command assumes that you are inside the folder where the file is located CC2531ZNP-Prod.hex; otherwise, first reach the file with a change directory and then execute the command.

Linux

Also on these operating systems the procedura is done via the command line from the terminal.

PRE-REQUIREMENTS

First of all it is necessary to respect various pre-requisites, which provide for the presence on the operating system of some packages to support the re toolproprogramming. The commands to execute are:

on Raspbian
sudo npm install dh-autoreconf, libusb-1.0-0-dev, libboost-all-dev
on Ubuntu
sudo npm install dh-autoreconf, libusb-1.0, libboost-all-dev
on Fedora
sudo npm install dh-autoreconf, boost-devel, libusb1-devel, gcc-c++
on Archlinux
sudo npm install dh-autoreconf, libusb, boost

At this point it is necessary to build the CC Tool package using the following commands:

git clone https://github.com/dashesy/cc-tool.git
cd cc-tool
./bootstrap
./configure
make

at the end, progive over.

FIRMWARE

Download the version of the firmware necessary for the reproming.

CONNECTIONS

At this point it is necessary to connect the CC Debugger al download cable and the latter to the CC2531 unit; at this point connect both the CC Debugger unit CC2531 to the USB ports of the computer.

CC Debugger CC2531 download cable
the connection between the components (image from zigbee2mqtt.io).

Commonly the CC Debugger status LED should be green; if it is not, press the reset button.
Nb Some models of CC Debugger, however, always remain with red LED light, so there is no need to worry.

RIPROming

Finally, unzip the firmware and execute the command:

sudo ./cc-tool -e -w CC2531ZNP-Prod.hex

Nb Obviously the command assumes that you are inside the folder where the file is located CC2531ZNP-Prod.hex; otherwise, first reach the file with a change directory and then execute the command.

inDomus telegram channel