zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

flashing and wiring CC2530

Open 1981nick1982 opened this issue 8 years ago • 20 comments

I intend to buy a cc2530 . However, it is not clear in the wiki how it should be flashed and how it should be connected to, for example, an RPI.

I would have liked to know which parts I have to buy to flash the CC2530. I have read this page but this does not create an overall clarity in my opinion.

If I understand correctly, I should use the pinout of this diagram to connect the CC2530 to the CC debugger / CC2531 cable? http://ptvo.info/wp-content/uploads/2018/05/smartrf04eb-pinout.jpg

And use USB to TTL - Aliexpress for the link to the pi?

I connect this stick as follows:

TX = P0_3 RX = P0_2 RST = P0_5 GND =? 3V3 =? 5V =?

For the CC2531 there is a step by step wiki available, maybe that something similar has to be made for this solution with photos?

1981nick1982 avatar Jun 03 '18 07:06 1981nick1982

Maybe @ptvoinfo or @kirovilya can help with more information.

ciotlosm avatar Jun 03 '18 07:06 ciotlosm

@1981nick1982 For speedup you can buy dev-board like this https://www.aliexpress.com/item/ZigBee-CC2530-Sensor-Node-Baseboard-Functional-Module-Expansion-Board-USB-Port-24MHz-256KB/32767498002.html put CC2530 and connect CCDebugger to this board. Without board, you need connect CCDebugger to CC2530 as described http://ptvo.info/wp-content/uploads/2018/05/smartrf04eb-pinout.jpg

After flashing, for using you need USB-TTL cable and connection: TX = P0_3 RX = P0_2 GND = GND 3v3 = VCC and on CC2530 P20 to GND

kirovilya avatar Jun 03 '18 07:06 kirovilya

When you use the expansion board , is it still needed to use a USB-TTL cable. And which one do you recommend?

1981nick1982 avatar Jun 03 '18 08:06 1981nick1982

@1981nick1982 With expansion board you not need USB-TTL. You will have to try to hide this board - this is the only problem :) Hide the cc2530 with a TTL cable without a board much easier.

kirovilya avatar Jun 03 '18 08:06 kirovilya

@kirovilya Hiding is not a problem. Next to the distribution box, I would place a cabinet in which I place the pi with the Zigbee2MQTT, Z-wave stick and an RFLink connected to it. The antennae of the RFLink and CC2530, I extend with a small piece of cable so that these come on the outside of the box.

1981nick1982 avatar Jun 03 '18 08:06 1981nick1982

@1981nick1982 If you'll connect CC2530 to RPi you don't need a USB-TTL converter. You may connect the P0_2, P0_3, GND directly to the corresponding pins on the RPi header.

Uploading firmware: connect pins as showed http://ptvo.info/wp-content/uploads/2018/05/smartrf04eb-pinout.jpg

ptvoinfo avatar Jun 03 '18 13:06 ptvoinfo

@ptvoinfo So i can use pin 6 / 8 and 10 on my pi to connect? https://www.raspberrypi-spy.co.uk/wp-content/uploads/2012/06/Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png

should I not give the cc2530 power?

1981nick1982 avatar Jun 03 '18 14:06 1981nick1982

@1981nick1982

Pins: yes, you may use 6, 8 and 10 Power: you may connect 3.3V or 5V from the board to the corresponding pin on CC2530. If your CC2530 board does not have 5V pin you should connect 3.3V only (in this case the pin has the VCC label).

ptvoinfo avatar Jun 04 '18 04:06 ptvoinfo

@ptvoinfo Perfect, i will give it a try. Maybe someone can make a wiki page of this information?

1981nick1982 avatar Jun 04 '18 19:06 1981nick1982

@1981nick1982 if you could create something basic based on your understanding, I'm happy to pimp it out with formatting and stuff

ciotlosm avatar Jun 04 '18 19:06 ciotlosm

I've prepared a tutorial. http://ptvo.info/how-to-select-and-flash-cc2530-144/ Comments are welcome.

ptvoinfo avatar Jun 05 '18 13:06 ptvoinfo

@ptvoinfo great work!

kirovilya avatar Jun 05 '18 13:06 kirovilya

@ptvoinfo Looks great! Only things I can think of are: a wiring picture with a RPI and one of the boards

ciotlosm avatar Jun 05 '18 14:06 ciotlosm

@ptvoinfo Super!!! i have ordered the parts.

1981nick1982 avatar Jun 05 '18 19:06 1981nick1982

I've prepared a tutorial. http://ptvo.info/how-to-select-and-flash-cc2530-144/ Comments are welcome.

Great job! My USB CC2530 has arrived from China, but I am away with work this week. Looking forward to programming and testing this based on @kirovilya wiring advice.

BTW @ptvoinfo what is the use case for the CC2530 board with additional 8051?

james-fry avatar Jun 06 '18 05:06 james-fry

@james-fry The additional chip implements the USB interface and the CC debugger. This board can be programmed without the debugger. Therefore it holds small space on your work table :). It can be useful for developers. If you need only one CC2530 or CC2531 for a coordinator role you may save money.

ptvoinfo avatar Jun 06 '18 05:06 ptvoinfo

Thanks. I will update the repo wiki with link to your guide.

james-fry avatar Jun 06 '18 06:06 james-fry

So much good information developing, thanks. Received my CC2531 with download cable yesterday (they actually sent two of each - score!), my CC2530 "RF TO USB (CC2530 CC2591)" today but still waiting on the CC Debugger. Still super keen though.

Would have probably started out with the "dev-board" but I ordered exactly as per the Getting Started wiki page because I'm literal when reading instructions :) That was back in the 'old days' when the wiki was only 8 pages and there was no "Supported sniffer devices" page.

Another HA user in Perth (WA) has offered to lend me his CC Debugger so maybe get something going this weekend, fingers crossed, and report in.

ryanbeaton avatar Jun 08 '18 08:06 ryanbeaton

@1981nick1982 considering the documentation now exists (thanks @ptvoinfo ) can we close this issue?

ciotlosm avatar Jun 15 '18 05:06 ciotlosm

Yes, it can be closed. Thank you guys.

1981nick1982 avatar Jun 15 '18 10:06 1981nick1982