Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC2530 could not work in Coordinator mode #293

Closed
dzungpv opened this issue Aug 19, 2018 · 41 comments

Comments

Projects
None yet
10 participants
@dzungpv
Copy link
Contributor

commented Aug 19, 2018

I have exactly module list in the wiki https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices CC2530 from WEBEE, now the seller from aliexpress change to another model.
Image: https://camo.githubusercontent.com/9211fbb4c7f9c5c2298ed60e2e2d7fad60527eae/687474703a2f2f696d672e647863646e2e636f6d2f70726f64756374696d616765732f736b755f3432393437385f322e6a7067

I have try both firmware here https://github.com/kirovilya/files/blob/master/CC2530ZNP-Pro-Secure_LinkKeyJoin.hex and here https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/CC2530/bin/CC2530ZNP-Prod.hex

I also try 4 difference connection: Pi3B UART, CP2102 (include in Webee kit), FT232RL, CH341.

Wiring:
PI:

1 -> VCC
8 -> P02
9 -> Ground
10 -> P03
Connect P20 to GND and not to GND

USB2TTL:

VCC 3.3V ->Pin 4
RX -> P02
TX -> P03
Ground -> Pin 3
Connect P20 to GND and not to GND

Configuration:
Try both advance option: rtscts: false and rtscts: true

I also try to swap TX<->RX and 3 difference CC2530 module

Error logs:
https://hastebin.com/mubowexuxi.js

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2018

I try this firmware and it work: http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/
But wiring for Webee CC2530 must be:
P0.2(P2, pin 7)->RS232 TX
P0.3(P2, pin 8)->RS232 RX

So all the firmware ware list in wiki and from KoenKK not work with this module

@mark078

This comment has been minimized.

Copy link

commented Aug 19, 2018

I have the same problem with the cc2530: #270 (comment)

There is a problem with the firmware of ptvo. The Xiaomi Motion with lux Sensor do not work.

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2018

When install Z-Stack Home it also has ZTool. You can try to plug the cc2530 to PC and test woth ztool, if it could connected, nearly it could work with zigbee2mqtt too. Ptvo firmware is not very good. He fixed channel 11, and can not change, also there are some problem. I will try to build new firmware next week.

@pleasanthill17

This comment has been minimized.

Copy link

commented Aug 19, 2018

I want to flash CC2530 as coordinator using arduino. Do you have any suggestions on wiring ? (I had success with CC2531 with arduino as detailed in wiki for alternative flashing.)

@mark078

This comment has been minimized.

Copy link

commented Aug 19, 2018

@dzungpv thanks for the tip with Ztool, I was looking for something like that.

Because of Channel 11 with the ptvo firmware. I had the firmware running with Channel 11, I mean is the default channel setting. But the Xiaomi motion with lux didn't work with it.
The other sensors, like switch, cube, water leak sensor and the motion sensor without lux work well.

I still wonder why the other firmwares don't work for us.

let me know if you have a firmware that works. I'm starting to think about taking the cc2531 stick + cc2530 router.

@pleasanthill17 is the same as the cc2531, only you have more space. :)
https://github.com/Koenkk/zigbee2mqtt/wiki/Alternative-firmware-flashing-methods
and a STM32 flash methode: #239

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2018

@Koenkk

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

@mark078 does the firmware from @dzungpv solve the problems with the lux motion sensor?

@mark078

This comment has been minimized.

Copy link

commented Aug 20, 2018

@Koenkk I just flashed the FW of @dzungpv and paired a sensor (Xiaomi Motion with Lux). So far it looks good.
The sensor reacts regularly and often. I'll let this go on overnight.

@dzungpv good work, what did you change to make it work? :)

2018-8-20 21:45:53 DEBUG Recieved zigbee message with data {"cid":"genBasic","data":{"modelId":"lumi.sensor_motion.aq2"}}
2018-8-20 21:45:53 INFO New device with address 0x00158d0002006aa6 connected!
2018-8-20 21:45:53 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x00158d0002006aa6"}'
2018-8-20 21:45:53 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/bridge/config/devices' with data ''
2018-8-20 21:45:53 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"devices","message":[{"ieeeAddr":"0x00158d0002006aa6","type":"EndDevice","friendly_name":"0x00158d0002006aa6"}]}'
2018-8-20 21:46:00 DEBUG Recieved zigbee message with data {"cid":"msIlluminanceMeasurement","data":{"measuredValue":31}}
2018-8-20 21:46:00 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002006aa6', payload: '{"illuminance":31}'
...
2018-8-20 21:53:21 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002006aa6', payload: '{"illuminance":81,"occupancy":true}'
2018-8-20 21:53:21 DEBUG Recieved zigbee message with data {"cid":"msIlluminanceMeasurement","data":{"measuredValue":81}}
2018-8-20 21:53:21 DEBUG Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-8-20 21:53:21 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002006aa6', payload: '{"illuminance":81,"occupancy":true}'

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 21, 2018

@mark078

This comment has been minimized.

Copy link

commented Aug 21, 2018

@dzungpv ok thanks first, it's going very well! :) the motion sensor still reacts very reliably in my test environment.

I will flash the firmware on my main cc2530 on Wednesday and repair everything.

@1981nick1982

This comment has been minimized.

Copy link

commented Aug 22, 2018

The firmware from @dzungpv solved my problem #165 with the temperature sensors.

@hdo

This comment has been minimized.

Copy link

commented Aug 23, 2018

@dzungpv Do you mind building a router firmware (repeater) as well? Thanks ;-)

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

@hdo I will build it very soon

@Koenkk

This comment has been minimized.

Copy link
Owner

commented Aug 23, 2018

@dzungpv could you also build the router firmware with increased buffers? like for the CC2531.

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

@Koenkk Ok i will follow you guide

@hdo

This comment has been minimized.

Copy link

commented Aug 23, 2018

Great to hear ;-)

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

Off topic, i am testing CC2652R1. It could connect to zigbee2mqtt now. It is a very powerful chip, it could run Zigbee 3.0 , Bluetooth 5.0 and Thread. It use free CCS editor from TI both on Web and Desktop, if anyone want to play http://www.ti.com/tool/LAUNCHXL-CC26X2R1.

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

@Koenkk Following your guide it could not build because out of memory, what IAR version you use to build CC2531 firmware?

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

@Koenkk , i make it work now check git readme https://github.com/dzungpv/Z-Stack-firmware/blob/master/coordinator/CC2530/README.md.
@hdo Router firmware there is no special, you can use ptvo firmware.
@mark078 @1981nick1982 use new firmare for CC2530 with more buffer size here: https://raw.githubusercontent.com/dzungpv/Z-Stack-firmware/master/coordinator/CC2530/bin/CC2530ZNP-Prod.hex

@mark078

This comment has been minimized.

Copy link

commented Aug 23, 2018

@dzungpv Thanks for the improvement, I'll flash it this weekend. :)

What makes more buffer size? Are more Zigbee devices possible with your new firmware?

I know several reports from the Fhem forum, where from a certain number (20-40) devices no longer react and fail.

@kirovilya has written something about this, that the cc2530/cc2531 have too little memory:
#185 (comment)

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 23, 2018

@mark078 Yes, it could handle more devices. But this is all experiment. Include zigbee2mqtt itself. Let try it and make it better because each user is a tester.

@1981nick1982

This comment has been minimized.

Copy link

commented Aug 23, 2018

@dzungpv I will try it tomorrow.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

@dzungpv and @Koenkk this firmware https://github.com/dzungpv/Z-Stack-firmware/tree/master/coordinator/CC2530_CC2591 also contains @dzungpv fixes?
what must I add/change for make cc2591 enable?
how I can increase power when I use cc2591 (I know this must be set in the code) but don't know right numbers for cc2591
I read TI documentation about that, but not understood completely.

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 24, 2018

@faronov you can download it here #181 (comment) but it may not stable, i will publish to git repos soon

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

Thanks @dzungpv , did you try connect this to RPI3 serial ?
Also you found where to set power ? (I also see somewhere in znp that power signal can be setted from config)

@faronov

This comment has been minimized.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

I'l try use this boards
http://www.cdebyte.com/en/product-view-news.aspx?id=123
http://www.cdebyte.com/en/product-view-news.aspx?id=121
It have cc2592 amplifier , but as I understood , in code , no differences , this is just amplifier , and have same connection

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 24, 2018

@faronov
for PI:
1 -> VCC
8 -> P02
9 -> Ground
10 -> P03
The TX power set default by the firmware, I have test it, has better range compare to CC2530

@dzungpv

This comment has been minimized.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

@dzungpv Thanks, but what you add more to that project cc2530+cc2591 than described in this readme https://github.com/dzungpv/Z-Stack-firmware/tree/master/coordinator/CC2530 ?

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 24, 2018

@faronov just add 1 more line to build tag HAL_PA_LNA nothing more:

FEATURE_SYSTEM_STATS
ASSERT_RESET
xPOWER_SAVING
FAKE_CRC_SHDW
TC_LINKKEY_JOIN
ENABLE_MT_SYS_RESET_SHUTDOWN
SECURE=1
INTER_PAN
ZTOOL_P1
CC2530_MK
HAL_LCD=FALSE
HAL_ADC=FALSE
HAL_UART_DMA_RX_MAX=128
NWK_MAX_DEVICE_LIST=15
MAX_NEIGHBOR_ENTRIES=10
MAXMEMHEAP=3120
INCLUDE_REVISION_INFORMATION
HAL_PA_LNA
@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Aug 24, 2018

@faronov You can also check this post https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/t/465007 But make sure the CDEbyte module schematic like TI ref device, or you can ask them about CC2592 wiring

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

@dzungpv Thanks again, I found good info from your link
http://processors.wiki.ti.com/index.php/Enabling_the_Support_of_CC259x_PA/LNA_with_Z-Stack-Home-Automation-1.2.1
CDEbyte well documented and have pinout table.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

but I still confusing about ZMacSetTransmitPower(), what I definitely know if you set value more than board supported, it will use the mask, and set it lower than expected.

@dzungpv

This comment has been minimized.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

@dzungpv Thanks again, I will try to find the maximum for cc2592.

@faronov

This comment has been minimized.

Copy link

commented Aug 24, 2018

regarding this http://www.ti.com/product/cc2592 maximum is 22 for cc2592

@ciotlosm

This comment has been minimized.

Copy link
Collaborator

commented Sep 3, 2018

Was the firmware linked in the docs for CC2530 updated with the findings in this issue?

@dzungpv

This comment has been minimized.

Copy link
Contributor Author

commented Sep 3, 2018

@ciotlosm I have fixed the firmware, but forget to close this.

@dzungpv dzungpv closed this Sep 3, 2018

@RodBr

This comment has been minimized.

Copy link

commented Nov 5, 2018

Hi all, what's the difference between this firmware and the firmware referenced here: https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices
I can't get that to work with my CC2530 so I'm searching for alternatives.

@kiwijunglist

This comment has been minimized.

Copy link

commented Dec 5, 2018

Hi

I have cc2530 with external aerial. i want to use it as co-ordinator with zigbee2mqtt running in hass.io on an intel nuc connected via usb-ttl cable.

Which firmware do i install?

thanks
kiwi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.