Koenkk/Z-Stack-firmware

CC2652P7-Chip support

Bosemani opened this issue · 9 comments

Hai @Koenkk
We designed a board having CC2652P7 chip and flashed CC1352P7_coordinator_20230507.zip Firmware.
I tested Zigbee2mqtt It worked well.

But Firmware have maximum TX power 10 dBm. but, We need 20 dBm Tx power.
I asked in TI form to build in 20 dBm for CC2652P7, Here is the solution Link

I build a code based on instruction like this link
Also I make changes recommended by TI for 20 dBm.

I flashed and tested the code.

Now I'm getting this error

Sep 26 14:14:42 glowfy npm[683]: Zigbee2MQTT:info  2023-09-26 14:14:42: Starting Zigbee2MQTT version 1.33.0 (commit #f224ef7)
Sep 26 14:14:42 glowfy npm[683]: Zigbee2MQTT:info  2023-09-26 14:14:42: Starting zigbee-herdsman (0.18.5)
Sep 26 14:14:43 glowfy npm[683]: Zigbee2MQTT:debug 2023-09-26 14:14:43: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"d
elay":null,"disableLED":false},"backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json","databaseBackupPath":"/opt/zigbee2mqtt/data/databa
se.db.backup","databasePath":"/opt/zigbee2mqtt/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,22
1],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"zstack","baudRate":115200,"path":"/dev/ttyS4"}}'
Sep 26 14:14:54 glowfy npm[683]: Zigbee2MQTT:error 2023-09-26 14:14:54: Error while starting zigbee-herdsman
Sep 26 14:14:54 glowfy npm[683]: Zigbee2MQTT:error 2023-09-26 14:14:54: Failed to start zigbee
Sep 26 14:14:54 glowfy npm[683]: Zigbee2MQTT:error 2023-09-26 14:14:54: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fai
ls-to-start.html for possible solutions
Sep 26 14:14:54 glowfy npm[683]: Zigbee2MQTT:error 2023-09-26 14:14:54: Exiting...
Sep 26 14:14:54 glowfy npm[683]: Zigbee2MQTT:error 2023-09-26 14:14:54: Error: SRSP - SAPI - readConfiguration after 6000ms
Sep 26 14:14:54 glowfy npm[683]:     at Timeout._onTimeout (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
Sep 26 14:14:54 glowfy npm[683]:     at listOnTimeout (node:internal/timers:559:17)
Sep 26 14:14:54 glowfy npm[683]:     at processTimers (node:internal/timers:502:7)
Sep 26 14:14:54 glowfy systemd[1]: zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 14:14:54 glowfy systemd[1]: zigbee2mqtt.service: Failed with result 'exit-code'.

I'm using simplelink_cc13xx_cc26xx_sdk_7_10_01_24 Is patch is requird?

why we need to do this In Code Composer Studio, expand the 5 projects and for each open znp.syscfg, expand Power Management and change Minimal Poll Period (ms) to 1000, change it back to 100 immediately and save the file. ?

Any other configuration required?

I went through many Issues in github. But I haven't got any clarity on this.

Koenkk commented

why we need to do this In Code Composer Studio, expand the 5 projects and for each open znp.syscfg, expand Power Management and change Minimal Poll Period (ms) to 1000, change it back to 100 immediately and save the file. ?

Otherwise my patch doesn't apply, this saving make the structure of the znp.syscfg files consistent.

It looks that the firmware crashes somehow, but why I have no clue (I haven't investigated 20dbm with the CC2652P7 yet)

why we need to do this In Code Composer Studio, expand the 5 projects and for each open znp.syscfg, expand Power Management and change Minimal Poll Period (ms) to 1000, change it back to 100 immediately and save the file. ?

Otherwise my patch doesn't apply, this saving make the structure of the znp.syscfg files consistent.

It looks that the firmware crashes somehow, but why I have no clue (I haven't investigated 20dbm with the CC2652P7 yet)

Hai @Koenkk
I tested compiled firmware with the TI Z-Tool. It's working without any crash.

Is patch is required to apply? I haven't applied, I'm using latest version of sdk.

Hai @Koenkk
For your reference I sniffed the Serial communication & here is the result.
TX_ZIGBEE2MQTT - Command from Zigbee2MQTT
RSP_OF_CC2652P7 - Response from CC2652P7

TX_ZIGBEE2MQTT : FE00210120
RSP_OF_CC2652P7 : FE02610159063D

TX_ZIGBEE2MQTT : FE00210120
RSP_OF_CC2652P7 : FE02610159063D

TX_ZIGBEE2MQTT : FE00210223
RSP_OF_CC2652P7 : FE0A6102020002070100000000006F

TX_ZIGBEE2MQTT : FE00210425
RSP_OF_CC2652P7 : FE086104F7CED429004B1200F0

TX_ZIGBEE2MQTT : FE0221138200B2
RSP_OF_CC2652P7 : FE026113180068

TX_ZIGBEE2MQTT : FE04211C82000000BB
RSP_OF_CC2652P7 : FE1A611C00180000000000000000000000000000000000000000000000007F

TX_ZIGBEE2MQTT : FE022113000F3F
RSP_OF_CC2652P7 : FE026113000070

TX_ZIGBEE2MQTT : FE022113210011
RSP_OF_CC2652P7 : FE026113000070

TX_ZIGBEE2MQTT : FE0126046241
RSP_OF_CC2652P7 : FE03600001260440

In this these 2 commands
TX_ZIGBEE2MQTT : FE022113000F3F
RSP_OF_CC2652P7 : FE026113000070

TX_ZIGBEE2MQTT : FE022113210011
RSP_OF_CC2652P7 : FE026113000070

By referring in Z-stack Monitor pdf
SYS_OSAL_NV_LENGTH
Description
This command is used by the tester to get the length of an item in non-volatile memory. A
returned length of zero indicates that the NV item does not exist.

From this i get to know,
Zigbee2mqtt is reading some nvs flash from cc2652p7, But that doesn't exist In the chip.

This causes Error in zigbee2mqtt.

Koenkk commented

Is patch is required to apply? I haven't applied, I'm using latest version of sdk.

Yes please try with the patch applied

Hai @Koenkk
After applying patch. Its working fine!
Thank you

Hi @Bosemani could You please share your fiemware for CC2652P7 chip?

skrue commented

I'd also be interested in the 20dBm-enabled firmware for the CC2652P7 @Bosemani

Hai @skrue @BrotherDen
I don't have that firmware with me.
I just evaluated the chip functions & tested zigbee2mqtt.
But anyway, you can compile firmware in code composer studio using the simple link SDK. Make sure In sys config of the project, Tx power is set to 20dbm.

Is there any firmware which work with CC2652P7 ? I'm asking as I cannot install the latest one.