I've tried to test the ZigBee OTA example on the 4.1.0 SDK, but it does not work. I've gone through the exact steps of the procedure as described in the infocenter, but it just doesn't work. There are also some discrepancies between the documentation and the example, and its hard to know the real impact of thoose differences. But the fact remains, the example does not work.
This is the procedure that I have followed: Software Development Kit > nRF5 SDK for Thread and Zigbee v4.1.0 > Zigbee > Zigbee and Zigbee+BLE examples > Zigbee-only examples > Zigbee OTA Upgrade examples > OTA Upgrade Client Example
At one point in the description, you have this statement in the paragraph "OTA Upgrade Client setup":
| OTA_UPGRADE_TEST_FILE_VERSION | Version of the installed firmware. |
The problem is that the define OTA_UPGRADE_TEST_FILE_VERSION does not exist in the code.
In the section where you initiate the attributes, you have this statement for the fileversion:
m_dev_ctx.ota_attr.file_version = s_dfu_settings.app_version;
Then it is assumed that the OTA_UPGRADE_TEST_FILE_VERSION define is obsolete, hence not defined nor used, and that the procedure documentation is not updated.
Later in the the procedure, there is this statement paragraph 5 b.
Increase the version. For example, change the define OTA_UPGRADE_TEST_FILE_VERSION to 0x01020101.
Problem is, off course, is that the OTA_UPGRADE_TEST_FILE_VERSION still does not exist, and the code does not use it, but somehow it seems like a major point.
And doing procedure over and over again, checking for all possible errors, the example still does not work. So a clarification of the necessity of the OTA_UPGRADE_TEST_FILE_VERSION and and updated procedure specifikation would be highly appreciated.
Searching through the devzone, I discover that for SDK version 3.1.0, you'll find this statement:
m_dev_ctx.ota_attr.file_version = OTA_UPGRADE_TEST_FILE_VERSION ;
Which makes a lot more sense.
But why this discrepancy between the SDK versions and the procedures? In a so complicated procedure, you HAVE to assume the documentation is correct.
The doing som other tests, I discover that I can read the attributes for the basic cluster, but no the OTA cluster:
log dump:
> zdo match_desc 0xffff 0xffff 0x0104 1 0x0000 0x0019 1
Sending broadcast request.
>
src_addr=E4E1 ep=10
>
> zdo simple_desc_req 0xE4E1 10
>
src_addr=0xE4E1 ep=10 profile_id=0x0104 app_dev_id=0xFFF0 app_dev_ver=0x0 in_clu
sters=0x0000 out_clusters=0x0019
Done
>
> zcl attr read f4ce3616262af33a 10 0x0000 0x0104 0x0000
Done
>
ID: 0 Type: 20 Value: 2
Done
> zcl attr read f4ce3616262af33a 10 0x0000 0x0104 0x0007
>
ID: 7 Type: 30 Value: 0
Done
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0000
>
Error: Default Response received; Command: 0, Status: 195
>
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0001
>
Error: Default Response received; Command: 0, Status: 195
>
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0002
>
Error: Default Response received; Command: 0, Status: 195
>
As you can see, reading the attributes for the basic cluster works, but fails for the the OTA cluster.
Can you please look into this ASAP!!!!
>
> zdo match_desc 0xffff 0xffff 0x0104 1 0x0000 0
Sending broadcast request.
>
src_addr=E4E1 ep=10
>
> zdo ieee_addr 0xE4E1
> f4ce3616262af33a
Done
>
> zdo simple_desc_req 0xE4E1 10
>
src_addr=0xE4E1 ep=10 profile_id=0x0104 app_dev_id=0xFFF0 app_dev_ver=0x0 in_clu
sters=0x0000 out_clusters=0x0019
Done
>
> zcl attr read f4ce3616262af33a 10 0x0000 0x0104 0x0000
Done
>
ID: 0 Type: 20 Value: 2
Done
> zcl attr read f4ce3616262af33a 10 0x0000 0x0104 0x0007
>
ID: 7 Type: 30 Value: 0
Done
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0000
>
Error: Default Response received; Command: 0, Status: 195
>
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0001
>
Error: Default Response received; Command: 0, Status: 195
>
> zcl attr read f4ce3616262af33a 10 0x0019 0x0104 0x0002
>
Error: Default Response received; Command: 0, Status: 195
>
>