This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, i'm trying to build some java code to backup the dongle CC2531, in particular the state of the network. If a lose the key or it breaks, I want to restore it without making the pairing step of each device again.
I've spotted the library "com.zsmartsystems.zigbee", I want to try the console as explained in the doc of the library on github because it contains maybe the script to do what I want, but I'm not able to run it. When I start the console it breaks because the library sends some unknown packet to the dongle.
Here my logs
Initialising ZigBee console...
17:07:09.423 DEBUG Default: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=1, interTransactionDelay=50, maxRetries=2]
17:07:09.423 DEBUG Broadcast: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=2, interTransactionDelay=4000, maxRetries=0]
17:07:09.423 DEBUG Multicast: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=3, interTransactionDelay=1200, maxRetries=0]
17:07:09.566 DEBUG ZigBeeNetworkManager initialize: networkState=UNINITIALISED
17:07:09.566 DEBUG Network state is updated to INITIALISING
ZigBee network state updated to INITIALISING
17:07:09.569 DEBUG CC2531 transport initialize
17:07:09.569 DEBUG Opening port COM60 at 115200 baud with FLOWCONTROL_OUT_NONE.
17:07:10.078 DEBUG -> SYS_RESET (Packet: subsystem=null, length=1, apiId=41 00, data=FE 01 41 00 01 41, checksum=41, error=false)
17:07:10.084 DEBUG Discarded stream: expected start byte but received 00
17:07:11.654 DEBUG <-- SYS_RESET_RESPONSE (FE 06 41 80 00 02 01 02 07 01 C0)
17:07:11.654 DEBUG Received Async Cmd: Packet: subsystem=null, length=6, apiId=41 80, data=FE 06 41 80 00 02 01 02 07 01 C0, checksum=C0, error=false
17:07:11.655 DEBUG -> SYS_VERSION (Packet: subsystem=null, length=0, apiId=21 02, data=FE 00 21 02 23, checksum=23, error=false)
17:07:11.661 DEBUG <- SYS_VERSION_RESPONSE (FE 0A 61 02 02 01 02 07 01 14 64 34 01 00 2B)
17:07:11.661 DEBUG CC2531 version is Software=2.7 Product=1 Hardware=1 Transport=2
17:07:11.662 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 01 20, checksum=20, error=false)
17:07:11.667 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:12.666 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:12.666 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 1]
17:07:13.682 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 01 20, checksum=20, error=false)
17:07:13.686 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:14.698 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:14.698 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 2]
17:07:15.717 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 01 20, checksum=20, error=false)
17:07:15.722 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:16.726 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:16.726 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 3]
17:07:16.726 WARN Failed getDeviceInfo for 1 due to null value
networkManager.initialize returned SUCCESS
17:07:16.728 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 06 27, checksum=27, error=false)
17:07:16.733 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:17.729 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:17.729 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 1]
17:07:18.741 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 06 27, checksum=27, error=false)
17:07:18.746 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:19.751 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:19.751 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 2]
17:07:20.765 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 06 27, checksum=27, error=false)
17:07:20.770 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:21.765 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:21.765 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 3]
17:07:21.765 WARN Failed getDeviceInfo for 6 due to null value
PAN ID = 65535
17:07:21.765 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 07 26, checksum=26, error=false)
17:07:21.770 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:22.775 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:22.775 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 1]
17:07:23.777 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 07 26, checksum=26, error=false)
17:07:23.781 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:24.791 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:24.791 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 2]
17:07:25.804 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 07 26, checksum=26, error=false)
17:07:25.809 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:26.812 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:26.812 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 3]
17:07:26.812 WARN Failed getDeviceInfo for 7 due to null value
Extended PAN ID = 0000000000000000
17:07:26.815 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 05 24, checksum=24, error=false)
17:07:26.821 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:27.824 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:27.824 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 1]
17:07:28.841 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 05 24, checksum=24, error=false)
17:07:28.845 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:29.857 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:29.857 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 2]
17:07:30.868 DEBUG -> ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 05 24, checksum=24, error=false)
17:07:30.873 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 06 42)
17:07:31.872 DEBUG ZB_GET_DEVICE_INFO executed and timed out while waiting for response.
17:07:31.872 DEBUG Failed to send ZB_GET_DEVICE_INFO [attempt 3]
17:07:31.872 WARN Failed getDeviceInfo for 5 due to null value
Channel = UNKNOWN
17:07:31.874 DEBUG Default profile ID set to 0104 [ZIGBEE_HOME_AUTOMATION]
17:07:31.877 DEBUG Unsupported configuration option "TRUST_CENTRE_JOIN_MODE" in CC2531 dongle
17:07:31.877 DEBUG -> SYS_SET_TX_POWER (Packet: subsystem=null, length=1, apiId=21 14, data=FE 01 21 14 03 37, checksum=37, error=false)
17:07:31.882 DEBUG <- ZToolPacket (FE 01 61 14 00 74)
17:07:31.883 DEBUG Unsupported configuration option "TRUST_CENTRE_LINK_KEY" in CC2531 dongle
17:07:31.885 DEBUG Adding supported client cluster 0500
17:07:31.887 DEBUG ClusterMatcher starting for endpoint 1 with profile ID 0104 (ZIGBEE_HOME_AUTOMATION)
17:07:31.888 DEBUG ClusterMatcher adding client cluster 0500
17:07:31.889 DEBUG Adding supported server cluster 0019
17:07:31.889 DEBUG ClusterMatcher adding server cluster 0019
17:07:31.891 DEBUG Adding supported server cluster 0000
17:07:31.892 DEBUG ClusterMatcher adding server cluster 0000
17:07:31.946 DEBUG Adding supported client cluster 0000
17:07:31.947 DEBUG ClusterMatcher adding client cluster 0000
17:07:31.947 DEBUG Adding supported client cluster 0001
17:07:31.947 DEBUG ClusterMatcher adding client cluster 0001
17:07:31.947 DEBUG Adding supported client cluster 0003
17:07:31.947 DEBUG ClusterMatcher adding client cluster 0003
17:07:31.947 DEBUG Adding supported client cluster 0004
17:07:31.947 DEBUG ClusterMatcher adding client cluster 0004
17:07:31.947 DEBUG Adding supported client cluster 0005
17:07:31.947 DEBUG ClusterMatcher adding client cluster 0005
17:07:31.948 DEBUG Adding supported client cluster 0006
17:07:31.948 DEBUG ClusterMatcher adding client cluster 0006
17:07:31.948 DEBUG Adding supported client cluster 0008
17:07:31.948 DEBUG ClusterMatcher adding client cluster 0008
17:07:31.948 DEBUG Adding supported client cluster 000F
17:07:31.948 DEBUG ClusterMatcher adding client cluster 000F
17:07:31.948 DEBUG Adding supported client cluster 0019
17:07:31.948 DEBUG ClusterMatcher adding client cluster 0019
17:07:31.948 DEBUG Adding supported client cluster 0020
17:07:31.949 DEBUG ClusterMatcher adding client cluster 0020
17:07:31.949 DEBUG Adding supported client cluster 0102
17:07:31.949 DEBUG ClusterMatcher adding client cluster 0102
17:07:31.949 DEBUG Adding supported client cluster 0201
17:07:31.949 DEBUG ClusterMatcher adding client cluster 0201
17:07:31.949 DEBUG Adding supported client cluster 0300
17:07:31.949 DEBUG ClusterMatcher adding client cluster 0300
17:07:31.949 DEBUG Adding supported client cluster 0301
17:07:31.949 DEBUG ClusterMatcher adding client cluster 0301
17:07:31.949 DEBUG Adding supported client cluster 03E8
17:07:31.950 DEBUG ClusterMatcher adding client cluster 03E8
17:07:31.950 DEBUG Adding supported client cluster 0402
17:07:31.950 DEBUG ClusterMatcher adding client cluster 0402
17:07:31.950 DEBUG Adding supported client cluster 0403
17:07:31.950 DEBUG ClusterMatcher adding client cluster 0403
17:07:31.950 DEBUG Adding supported client cluster 0500
17:07:31.950 DEBUG ClusterMatcher adding client cluster 0500
17:07:31.951 DEBUG Adding supported client cluster 0702
17:07:31.951 DEBUG ClusterMatcher adding client cluster 0702
17:07:31.951 DEBUG Adding supported client cluster 0B04
17:07:31.951 DEBUG ClusterMatcher adding client cluster 0B04
17:07:31.951 DEBUG Adding supported client cluster 0B05
17:07:31.951 DEBUG ClusterMatcher adding client cluster 0B05
17:07:31.952 DEBUG Adding supported server cluster 0000
17:07:31.952 DEBUG ClusterMatcher adding server cluster 0000
17:07:31.952 DEBUG Adding supported server cluster 0001
17:07:31.952 DEBUG ClusterMatcher adding server cluster 0001
17:07:31.953 DEBUG Adding supported server cluster 0003
17:07:31.953 DEBUG ClusterMatcher adding server cluster 0003
17:07:31.953 DEBUG Adding supported server cluster 0004
17:07:31.953 DEBUG ClusterMatcher adding server cluster 0004
17:07:31.953 DEBUG Adding supported server cluster 0005
17:07:31.953 DEBUG ClusterMatcher adding server cluster 0005
17:07:31.953 DEBUG Adding supported server cluster 0006
17:07:31.954 DEBUG ClusterMatcher adding server cluster 0006
17:07:31.954 DEBUG Adding supported server cluster 0008
17:07:31.954 DEBUG ClusterMatcher adding server cluster 0008
17:07:31.954 DEBUG Adding supported server cluster 000F
17:07:31.954 DEBUG ClusterMatcher adding server cluster 000F
17:07:31.954 DEBUG Adding supported server cluster 0019
17:07:31.954 DEBUG ClusterMatcher adding server cluster 0019
17:07:31.954 DEBUG Adding supported server cluster 0020
17:07:31.955 DEBUG ClusterMatcher adding server cluster 0020
17:07:31.955 DEBUG Adding supported server cluster 0102
17:07:31.955 DEBUG ClusterMatcher adding server cluster 0102
17:07:31.955 DEBUG Adding supported server cluster 0300
17:07:31.955 DEBUG ClusterMatcher adding server cluster 0300
17:07:31.955 DEBUG Adding supported server cluster 0301
17:07:31.955 DEBUG ClusterMatcher adding server cluster 0301
17:07:31.955 DEBUG Adding supported server cluster 03E8
17:07:31.956 DEBUG ClusterMatcher adding server cluster 03E8
17:07:31.956 DEBUG Adding supported server cluster 0402
17:07:31.956 DEBUG ClusterMatcher adding server cluster 0402
17:07:31.956 DEBUG Adding supported server cluster 0403
17:07:31.956 DEBUG ClusterMatcher adding server cluster 0403
17:07:31.956 DEBUG Adding supported server cluster 0500
17:07:31.956 DEBUG ClusterMatcher adding server cluster 0500
17:07:31.956 DEBUG Adding supported server cluster 0702
17:07:31.956 DEBUG ClusterMatcher adding server cluster 0702
17:07:31.957 DEBUG Adding supported server cluster 0B04
17:07:31.957 DEBUG ClusterMatcher adding server cluster 0B04
17:07:31.957 DEBUG Adding supported server cluster 0B05
17:07:31.957 DEBUG ClusterMatcher adding server cluster 0B05
17:07:31.957 DEBUG ZigBeeNetworkManager startup: reinitialize=false, networkState=INITIALISING
17:07:31.957 DEBUG CC2531 transport startup
17:07:31.958 DEBUG Creating network as Coordinator
17:07:31.958 DEBUG -> ZDO_MSG_CB_REGISTER (Packet: subsystem=null, length=2, apiId=25 3E, data=FE 02 25 3E FF FF 19, checksum=19, error=false)
17:07:31.962 DEBUG <- ZDO_MSG_CB_REGISTER_SRSP (FE 01 65 3E 00 5A)
17:07:31.963 DEBUG -> ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 8F 01 01 AF, checksum=AF, error=false)
17:07:31.967 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 05 41)
17:07:32.973 DEBUG ZB_WRITE_CONFIGURATION executed and timed out while waiting for response.
17:07:32.973 DEBUG Failed to send ZB_WRITE_CONFIGURATION [attempt 1]
17:07:33.985 DEBUG -> ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 8F 01 01 AF, checksum=AF, error=false)
17:07:33.990 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 05 41)
17:07:34.991 DEBUG ZB_WRITE_CONFIGURATION executed and timed out while waiting for response.
17:07:34.991 DEBUG Failed to send ZB_WRITE_CONFIGURATION [attempt 2]
17:07:36.018 DEBUG -> ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 8F 01 01 AF, checksum=AF, error=false)
17:07:36.022 DEBUG <- SYS_RPC_ERROR (FE 03 60 00 01 26 05 41)
17:07:37.019 DEBUG ZB_WRITE_CONFIGURATION executed and timed out while waiting for response.
17:07:37.019 DEBUG Failed to send ZB_WRITE_CONFIGURATION [attempt 3]
17:07:37.019 ERROR Failed to start zigbee network.
17:07:37.020 INFO Serial port 'COM60' closed.
Could someone help me ?
Thanks
Which Z-Stack version do you run on CC2531? If you don’t use Z-Stack 3.0.2, I would suggest you to use it to test again.
Hi Morgan,
The CC2531 device seems to be in a faulty state given that every command after SYS_VERSION fails. Consider clearing all device memory and make sure you are using a valid ZNP image. Please contact the com.zsmartsystems.zigbee Github community as this is a third-party solution not developed or maintained by TI. You can further evaluate the ZNP using Z-Tool as provided in CC253X Z-Stack software package installations.
Regards,
Ryan
I'm not sure about the z-stack version i'm running, I've tried the dongle in "com.zsmartsystems.zigbee", first with the default firmware as per fabric and then with the firmware of tosmota CC1352P2_CC2652P_launchpad_coordinator_20230507.hex, because i've made also some test with zigbee2mqtt (other purposes). Now i've downloaded the 3.0.2 as you said, but i'm not able to flash the dongle with this firmware.
I've tried in two ways, first with the python script
C:> python cc2538-bsl.py -ewv -p COM22 --bootloader-sonoff-usb ./CC2531ZNP-with-SBL.hex
hello
sonoff
Opening port COM22, baud 500000
Reading data from ./CC2531ZNP-with-SBL.hex
Your firmware looks like an Intel Hex file
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:12:4B:00:2A:1A:FE:8F
Performing mass erase
Erasing all main bank flash sectors
Erase done
Writing 262129 bytes starting at address 0x00000000
ERROR: Invalid data size: 262129. Size must be a multiple of 4.
but there is this error due to memory space. Then i've tried with SMARTRF Flash programmer 2.
here instead, the program doesn't show the CC2531, I used CC2652P just to try, putting the key in boot mode manually as explained in the guide. The flash of the key goes well, but "com.zsmartsystems.zigbee" gives me this:
Initialising ZigBee console...
10:46:57.036 DEBUG Default: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=1, interTransactionDelay=50, maxRetries=2]
10:46:57.037 DEBUG Broadcast: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=2, interTransactionDelay=4000, maxRetries=0]
10:46:57.037 DEBUG Multicast: Set profile to ZigBeeTransactionProfile [maxOutstandingTransactions=3, interTransactionDelay=1200, maxRetries=0]
10:46:57.181 DEBUG ZigBeeNetworkManager initialize: networkState=UNINITIALISED
10:46:57.181 DEBUG Network state is updated to INITIALISING
ZigBee network state updated to INITIALISING
10:46:57.184 DEBUG CC2531 transport initialize
10:46:57.185 DEBUG Opening port COM22 at 115200 baud with FLOWCONTROL_OUT_NONE.
10:46:57.585 DEBUG -> SYS_RESET (Packet: subsystem=null, length=1, apiId=41 00, data=FE 01 41 00 01 41, checksum=41, error=false)
10:47:02.600 WARN Dongle reset failed. Assuming bootloader is running and sending magic byte 0xef.
10:47:07.605 WARN Attempt to get out from bootloader failed.
10:47:07.606 INFO Serial port 'COM22' closed.
Is there a standard way to correctly flash CC2531 ?
Thanks
Thanks Ryan for the suggestion, but I don't think the problem is the faulty state, just because the key is working in other environments correctly. I'll contact the com.zsmartsystems.zigbee Github community of course.
Thank you again
Morgan
Hi Morgan,
A CC2538/CC13XX/CC26XX bootloader solution cannot be used for a CC2531, and requires for the correct device to be selected in order to know the memory layout. A CC2531 image likewise cannot be programmed into a CC2652P device and operate as intended. Sonoff dongles use the CC2652P in case you were not aware. Since Flash Programmer 2 recognizes the CC2652P I recommend that you confirm the target device you are attempting to program.
Regards,
Ryan
Thanks Rian
Actually I just found that the dongle I've working on is the CC2652P, not the CC2531 (little error in my company) .
Also I didn't found any documentation on "com.zsmartsystems.zigbee" github about this key. Probably they didn't support it.
So my question is... is there a known way to backup the dongle and its state ? Maybe the list of z-stack commands to give to the key?
Morgan
Cloning Z-Stack Network Properties Using the SimpleLink Wireless MCU Family https://www.ti.com/lit/swra671
Regards,
Ryan