-
Notifications
You must be signed in to change notification settings - Fork 6
/
OTAUpgrade.xml
198 lines (198 loc) · 9.73 KB
/
OTAUpgrade.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0"?>
<!--
Connectivity Standards Alliance owns the copyright to the text and content displayed or
included in this document (including in PDF, XML files and other formats) in
all forms of media, which copyright is protected by the copyright laws of the
United States and by international treaties. Full text of licensing terms
applicable to this document can be found in the LICENSE.md file.
-->
<zcl:cluster xmlns:zcl="http://zigbee.org/zcl/clusters"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:type="http://zigbee.org/zcl/types"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="http://zigbee.org/zcl/clusters cluster.xsd http://zigbee.org/zcl/types type.xsd"
id="0019" revision="4" name="OTAUpgrade">
<classification role="utility" picsCode="OTA" />
<type:type short="OTAImageType" name="Image Type Id" id="21" inheritsFrom="uint16">
<restriction>
<type:maxInclusive value="65471"/>
<type:special name="Wildcard" value="65535"/>
</restriction>
</type:type>
<type:type short="OTADeviceSpecificImageType" name="Image Type Id (Device Specific)" id="21" inheritsFrom="uint16">
<restriction>
<type:minInclusive value="65472" />
<type:maxInclusive value="65534"/>
<type:enumeration name="ClientSecurityCredentials" value="ffc0"/>
<type:enumeration name="ClientConfiguration" value="ffc1" />
<type:enumeration name="ServerLog" value="ffc2" />
<type:enumeration name="Picture" value="ffc3" />
<type:special name="Wildcard" value="65535"/>
</restriction>
</type:type>
<server>
<commands>
<command id="01" name="QueryNextImageRequest" required="true">
<fields>
<field name="FieldControl" type="map8">
<bitmap>
<element name="HardwareVersionPresent" type="bool" mask="01" />
</bitmap>
</field>
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTAImageType" />
<field name="CurrentFileVersion" type="uint32" />
<field name="HardwareVersion" type="uint16" presentIf="FieldControl.HardwareVersionPresent" />
</fields>
</command>
<command id="03" name="ImageBlockRequest" required="true">
<fields>
<field name="FieldControl" type="map8">
<bitmap>
<element name="RequestNodeIEEEAddressPresent" type="bool" mask="01" />
<element name="MinimumBlockPeriodPresent" type="bool" mask="02" shiftRight="1" />
</bitmap>
</field>
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTAImageType" />
<field name="FileVersion" type="uint32" />
<field name="FileOffset" type="uint32" />
<field name="MaximumDataSize" type="uint8" />
<field name="RequestNodeAddress" type="EUI64" presentIf="FieldControl.RequestNodeIEEEAddressPresent" />
<field name="MinimumBlockPeriod" type="uint16" presentIf="FieldControl.MinimumBlockPeriodPresent" />
</fields>
</command>
<command id="04" name="ImagePageRequest">
<fields>
<field name="FieldControl" type="map8">
<bitmap>
<element name="RequestNodeIEEEAddressPresent" type="bool" mask="01" />
</bitmap>
</field>
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTAImageType" />
<field name="FileVersion" type="uint32" />
<field name="FileOffset" type="uint32" />
<field name="MaximumDataSize" type="uint8" />
<field name="PageSize" type="uint16" />
<field name="ResponseSpacing" type="uint16" />
<field name="RequestNodeAddress" type="EUI64" presentIf="FieldControl.RequestNodeIEEEAddressPresent" />
</fields>
</command>
<command id="06" name="UpgradeEndRequest" required="true">
<fields>
<field name="Status" type="zclStatus" />
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTAImageType" />
<field name="FileVersion" type="uint32" />
</fields>
</command>
<command id="08" name="QueryDeviceSpecificFileRequest">
<fields>
<field name="RequestNodeAddress" type="EUI64" />
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTADeviceSpecificImageType" />
<field name="FileVersion" type="uint32" />
<field name="CurrentZigbeeStackVersion" type="uint16" />
</fields>
</command>
</commands>
</server>
<client>
<attributes>
<attribute id="0000" name="UpgradeServerID" type="EUI64" required="true" default="18446744073709551615" />
<attribute id="0001" name="FileOffset" type="uint32" default="4294967294" />
<attribute id="0002" name="CurrentFileVersion" type="uint32" default="4294967294" />
<attribute id="0003" name="CurrentZigBeeStackVersion" type="uint16" default="65535" />
<attribute id="0004" name="DownloadedFileVersion" type="uint32" default="4294967294" />
<attribute id="0005" name="DownloadedZigBeeStackVersion" type="uint16" default="65535" />
<attribute id="0006" name="ImageUpgradeStatus" type="enum8" default="0" required="true">
<restriction>
<type:enumeration value="00" name="Normal" />
<type:enumeration value="01" name="DownloadInProgress" />
<type:enumeration value="02" name="DownloadComplete" />
<type:enumeration value="03" name="WaitingToUpgrade" />
<type:enumeration value="04" name="CountDown" />
<type:enumeration value="05" name="WaitForMore" />
<type:enumeration value="06" name="WaitingToUpgradeViaExternalEvent" />
</restriction>
</attribute>
<attribute id="0007" name="ManufacturerID" type="uint16" />
<attribute id="0008" name="ImageTypeID" type="uint16" />
<attribute id="0009" name="MinimumBlockPeriod" type="uint16" default="0" />
<attribute id="000A" name="ImageStamp" type="uint32" />
<attribute id="000B" name="UpgradeActivationPolicy" type="enum8" default="0">
<restriction>
<type:enumeration value="00" name="OTAServerActivationAllowed" />
<type:enumeration value="01" name="OutOfBandActivationOnly" />
</restriction>
</attribute>
<attribute id="000C" name="UpgradeTimeoutPolicy" type="enum8" default="0">
<restriction>
<type:enumeration value="00" name="ApplyUpgradeAfterTimeout" />
<type:enumeration value="01" name="DoNotApplyUpgradeAfterTimeout" />
</restriction>
</attribute>
</attributes>
<commands>
<command id="00" name="ImageNotify">
<fields>
<field name="PayloadType" type="enum8">
<restriction>
<type:enumeration value="00" name="QueryJitter" />
<type:enumeration value="01" name="QueryJitterAndManufacturerCode" />
<type:enumeration value="02" name="QueryJitterManufacturerCodeAndImageType" />
<type:enumeration value="03" name="QueryJitterManufacturerCodeImageTypeAndNewFileVersion" />
</restriction>
</field>
<field name="QueryJitter" type="uint8" />
<field name="ManufacturerCode" type="uint16" presentIf="PayloadType >= 1" />
<field name="ImageType" type="uint16" presentIf="PayloadType >= 2" />
<field name="NewFileVersion" type="uint32" presentIf="PayloadType >= 3" />
</fields>
</command>
<command id="02" name="QueryNextImageResponse" required="true">
<fields>
<field name="Status" type="zclStatus" />
<field name="ManufacturerCode" type="uint16" presentIf="Status=0"/>
<field name="ImageType" type="OTAImageType" presentIf="Status=0" />
<field name="FileVersion" type="uint32" presentIf="Status=0" />
<field name="ImageSize" type="uint32" presentIf="Status=0" />
</fields>
</command>
<command id="05" name="ImageBlockResponse" required="true">
<fields>
<field name="Status" type="zclStatus" />
<!-- Success Fields -->
<field name="ManufacturerCode" type="uint16" presentIf="Status=0"/>
<field name="ImageType" type="OTAImageType" presentIf="Status=0" />
<field name="FileVersion" type="uint32" presentIf="Status=0" />
<field name="FileOffset" type="uint32" presentIf="Status=0" />
<field name="ImageData" type="octstr" presentIf="Status=0" />
<!-- Wait For Data (0x97) Fields -->
<field name="CurrentTime" type="uint32" presentIf="Status=151" />
<field name="RequestTime" type="uint32" presentIf="Status=151" />
<field name="MinimumBlockPeriod" type="uint16" presentIf="Status=151" />
</fields>
</command>
<command id="07" name="UpgradeEndResponse" required="true">
<fields>
<field name="ManufacturerCode" type="uint16" />
<field name="ImageType" type="OTAImageType" />
<field name="FileVersion" type="uint32" />
<field name="CurrentTime" type="UTC" />
<field name="UpgradeTime" type="UTC" />
</fields>
</command>
<command id="09" name="QueryDeviceSpecificFileResponse">
<fields>
<field name="Status" type="zclStatus" />
<field name="ManufacturerCode" type="uint16" presentIf="Status=0"/>
<field name="ImageType" type="OTADeviceSpecificImageType" presentIf="Status=0" />
<field name="FileVersion" type="uint32" presentIf="Status=0" />
<field name="ImageSize" type="uint32" presentIf="Status=0" />
</fields>
</command>
</commands>
</client>
</zcl:cluster>