What is CC2531?

George Shuklin
Loyal home
Published in
3 min readSep 5, 2019

--

I saw few things out there about how to start an automation. The consensus (as I saw it) is that Zigbee protocol is good. Somewhere there I found that CC2531 is a good device to be a Zigbee controller.

CC2531 at it’s useless glory without firmware
CC2531 plugged and useless without proper firmware.

I got one (€3.26), and, of cause, I haven’t ordered “CC debugger and wires”. Therefore, all I got is the controller only, and after I plug it, nothing happens.

I realised my mistake and place an order for additional stuff. While it is on the way from China, I would like to slow down a bit and do some reading about the stuff I already have, e.g. CC2531.

I found that internet is incredibly ‘androidy’ about it. I see instructions on how to do it, I see some blobs of code, but I haven’t found yet a good description of what’s going on.

I found this userguide for the chip (but not for device itself): http://www.ti.com/lit/ug/swru221a/swru221a.pdf

I’ve read it few times, and few things become clear.

What is CC2531?

CC2531 is a mini-computer with a radio periphery for Zigbee protocol, produced by Texas Instruments. It’s universal computer, but is shipped preprogrammed as ‘protocol sniffer’ (and nothing more). There is an alternative firmware to flash, I don’t know if this is patched official firmware or is it made from scratches (I’ll investigate this later). The repository for firmware is here https://github.com/Koenkk/Z-Stack-firmware.

How to use it?

Without reprogramming (uploading new firmware) CC2531 can be used only as sniffer (packet logger). Originally it was intended to be used with other TI’s hardware for ‘developing purposes’. CC2531 is very small and cheap, so people prefer to use only this part of TI’s hardware set.

To use it as sniffer one can use this program: https://github.com/mitshell/CC2531, but it’s not that fun.

How to reprogram it?

There are some guides on the net, but basic idea is that you need an external connection to the device (to the pins on the upper part). It called ‘CC debugger programmer’ and the set of programmer and cables cost about €8.

What is inside of alternative firmware?

Something from Z-stack. And Z-stack, as I found, is, actually, the TI’s brand name for their own software. Therefore I start to suspect that all those firmwares are coming from TI.

CC debugger programmer

This stuff is still on the way. What I found on TI site was disappointing (windows, windows, windows), but I saw something called ‘cc-tool’. And it is in my distro!

support for Texas Instruments CC DebuggerThis software provides support of Texas Instruments CC Debugger and several evaluation boards to program TI 8051-based System-On-Chip devices.
Homepage: https://github.com/dashesy/cc-tool

Cool! Except for origin coming from sourceforge. Meh.

But their description is really informative:

cc-tool provides support for Texas Instruments CC Debugger for Linux OS  in order to program 8051-based System-On-Chip devices: CC254x CC253x  CC243x CC251x CC111x

Good. … I’m a bit curious, may be, just may be, can I flash device via it’s own USB interface? No, I can’t.

Supported targets:
CC2530 CC2531 CC2533 CC2540 CC2541 CC2543 CC2544 CC2545 CC2510 CC2511 CC1111 CC1110 CC2430 CC2431
Supported programmers:
VID: 0x0451 PID: 0x16a2 Description: CC Debugger
VID: 0x11a0 PID: 0xdb20 Description: SmartRF04 Evaluation Board
VID: 0x11a0 PID: 0xeb20 Description: SmartRF04 Evaluation Board (Chinese)
VID: 0x0451 PID: 0x16a0 Description: SmartRF05 Evaluation Board

Learn those words:

  • target — thing we flash.
  • programmer — thing we use to flash.

As you can see, cc-tool does, indeed, support for CC2531, but only as target. It need ‘CC debugger’, so I didn’t waste €8 on that debugger.

Conclusion: I learned a bit about the way controller is created. I still don’t know what is exactly that ‘hex’ I need to flash, but at least, I knew the provenance of the stuff and the beginning of the roadmap become clear.

--

--

George Shuklin
Loyal home

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.