CC2531 based router (firmware)

I’ve replaced my old coordinator hardware with CC2530 with an external antenna and therefore one of CC2531 was not used.

The guys on GitHub asked me to make a router firmware for СС2531 too. I’ve spent some time and prepared 3 variants:

  1. CC2531-router.hex – just a router, without diagnostics and a USB serial port.
  2. CC2531-router-diag.hex – a router with diagnostic reports and without a USB serial port.
  3. CC2531-router-diag-usb.hex – a router with diagnostic reports and a USB serial port. The firmware dumps diagnostic reports to the serial port too.

Note: This firmware is for simple CC2531 boards without an additional RF front-ends.


SW1 – Changes a virtual state of the router (the router sends it in a diagnostic report) and a state of the green light.

  1. Short single press – to re-send a binding request to a coordinator (it allows you to test a connection).
  2. Long single press (about 5 seconds) – to reset the router and initiate a joining process.


Green light – a short blink when the router connected to a network.

Red light:

  • short fast blinks (one per second) – the router is connecting to a network.
  • long blinks (one short flash per 4 seconds) – normal operations.
  • three short blinks – the router cannot send a report to a coordinator.

How to use

  1. Download and flash the firmware.
  2. Power off/on (restart) the router.
  3. Permit joining to a network on your coordinator.


UPDATE 2020-09-28

Added the “Aging” mode. The router forgets child devices that didn’t send any data for four hours. It helps when an end-device selects a new path to a coordinator.

UPDATE 2018-09-26

1. Allows a router to use all possible channels (the old firmware was used the channel #11). But now, the router will take more time to connect to a coordinator.
2. A router may report link quality for all connected neighbors.

UPDATE 2019-02-04

1. The previous version allowed to join for deleted devices.
2. СС2530 can be re-paired if you power on/power off  it three times (power on, wait 2 seconds, power off, repeat this cycle three times).

Harvey Specter
Posted at 18:01 April 30, 2021

Thanks for your reply, as to 2. Yes: I stated two possibilities, therefore a retry:

case b) If the device is paired to the coordinator and moved out of reach but within reach of a router with your firmware -> does the device still count as a connection in the limited list of the coordinator?

Answer 3. I am using Domoticz and a network map indeed shows the connections. I suppose that if there is no connection between coordinator and device, that means it does not count as a device in the (limited cc2531) coordinator list?

    Harvey Specter
    Posted at 06:25 May 1, 2021

    1. The device should select a new parent device. When it has done, it will free a slot on a coordinator.
    2. Yes, correct.

Harvey Specter
Posted at 22:26 April 28, 2021

Hi, thanks for your work, I am using it with success with Zigbee2Mqtt, although some practical issues are not clear to me:
I use one cc2531 as a coordinator and another one as router in an attempt to support more than 20 devices.
1. a) Do I need to pair devices at the location of the router, or b) can I pair at the coordinator and move them out of reach, but within reach of the router?
2. In case of b): does the device then take a space in the limited list of the coordinator or of the router?
3. Is it possible to find information on devices whether they count in the list for the coordinator or for a router?
4. I have Ledvance smart plugs in my network that also have router capabilities. There are other devices like that such as switches or dimmers with router properties. Do these operate similar to the cc2531 with router firmware? Or is the cc2531 router much more powerful?
Thanks for your help in my understanding.

    Harvey Specter
    Posted at 03:32 April 29, 2021

    Hi Gert!
    1. Both.
    2. Yes.
    3. For example, Z2M can show a device’s map, where you can see direct connections and count them.
    4. CC2531 may work better because it is outside a wall.

« Older Comments

Leave a Reply to Stefano
Cancel Reply