2 * Dissector routines for the SolarEdge monitoring protocol
3 * By Erik de Jong <erikdejong@gmail.com>
4 * Copyright 2017 Erik de Jong
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/conversation.h>
15 #include <epan/expert.h>
16 #include <epan/packet.h>
17 #include <epan/prefs.h>
18 #include <epan/strutil.h>
20 #include <epan/unit_strings.h>
22 #include <wsutil/array.h>
23 #include <wsutil/crc16-plain.h>
24 #include <wsutil/wsgcrypt.h>
26 #define SOLAREDGE_MAGIC_NUMBER 0x79563412
27 #define SOLAREDGE_ENCRYPTION_KEY_LENGTH 16
28 #define SOLAREDGE_HEADER_LENGTH 20
29 #define SOLAREDGE_POST_HEADER_LENGTH 8
31 #define SOLAREDGE_COMMAND_PARAMS_RESET 0x0010
32 #define SOLAREDGE_COMMAND_PARAMS_SET_SINGLE 0x0011
33 #define SOLAREDGE_COMMAND_PARAMS_GET_SINGLE 0x0012
34 #define SOLAREDGE_COMMAND_PARAMS_GET_INFO 0x0013
35 #define SOLAREDGE_COMMAND_PARAMS_GET_NAME 0x0014
36 #define SOLAREDGE_COMMAND_PARAMS_GET_NUM 0x0015
37 #define SOLAREDGE_COMMAND_PARAMS_GET_ALL 0x0016
38 #define SOLAREDGE_COMMAND_PARAMS_SET_ALL 0x0017
39 #define SOLAREDGE_COMMAND_PARAMS_SET_SINGLE_NOSAVE 0x0018
40 #define SOLAREDGE_COMMAND_PARAMS_SAVE 0x0019
41 #define SOLAREDGE_COMMAND_PARAMS_POLICY_ENABLE 0x001a
42 #define SOLAREDGE_COMMAND_PARAMS_POLICY_DISABLE 0x001b
43 #define SOLAREDGE_COMMAND_PARAMS_POLICY_DISABLE_VOLATILE 0x001c
44 #define SOLAREDGE_COMMAND_PARAMS_SET_POLICY_PASSWORD 0x001d
45 #define SOLAREDGE_COMMAND_PARAMS_GET_VOLATILE 0x001e
46 #define SOLAREDGE_COMMAND_PARAMS_SET_VOLATILE 0x001f
47 #define SOLAREDGE_COMMAND_UPGRADE_START 0x0020
48 #define SOLAREDGE_COMMAND_UPGRADE_WRITE 0x0021
49 #define SOLAREDGE_COMMAND_UPGRADE_FINISH 0x0022
50 #define SOLAREDGE_COMMAND_UPGRADE_READ_DATA 0x0023
51 #define SOLAREDGE_COMMAND_UPGRADE_READ_SIZE 0x0024
52 #define SOLAREDGE_COMMAND_MISC_RESET 0x0030
53 #define SOLAREDGE_COMMAND_MISC_STOP 0x0031
54 #define SOLAREDGE_COMMAND_MISC_DUMMY 0x0032
55 #define SOLAREDGE_COMMAND_MISC_GET_VER 0x0033
56 #define SOLAREDGE_COMMAND_MISC_GET_TYPE 0x0034
57 #define SOLAREDGE_COMMAND_MISC_PAYLOAD 0x0035
58 #define SOLAREDGE_COMMAND_MISC_SET_ID 0x0036
59 #define SOLAREDGE_COMMAND_MISC_READ_MEMORY 0x0037
60 #define SOLAREDGE_COMMAND_MISC_PARAMS_PARTIAL_RESET 0x0038
61 #define SOLAREDGE_COMMAND_MISC_GET_MAX_PACKET_SIZE 0x0039
62 #define SOLAREDGE_COMMAND_MISC_ENCRYPTED 0x003d
63 #define SOLAREDGE_COMMAND_PARAMS_SMART_LOAD_PARAMS 0x0040
64 #define SOLAREDGE_COMMAND_MISC_PARAMS_PARTIAL_RESET2 0x0041
65 #define SOLAREDGE_COMMAND_PARAMS_IGNORE_PARAMS_LIST 0x0042
66 #define SOLAREDGE_COMMAND_PARAMS_PARTIAL_RESET_AS_LEVEL 0x0043
67 #define SOLAREDGE_COMMAND_PARAMS_PARTIAL_RESET_PCB_LEVEL 0x0044
68 #define SOLAREDGE_COMMAND_RESP_ACK 0x0080
69 #define SOLAREDGE_COMMAND_RESP_NACK 0x0081
70 #define SOLAREDGE_COMMAND_RESP_PARAMS_SINGLE 0x0090
71 #define SOLAREDGE_COMMAND_RESP_PARAMS_INFO 0x0091
72 #define SOLAREDGE_COMMAND_RESP_PARAMS_NAME 0x0092
73 #define SOLAREDGE_COMMAND_RESP_PARAMS_NUM 0x0093
74 #define SOLAREDGE_COMMAND_RESP_PARAMS_ALL 0x0094
75 #define SOLAREDGE_COMMAND_RESP_PARAMS_INCORRECT_PASSWORD 0x0095
76 #define SOLAREDGE_COMMAND_RESP_UPGRADE_DATA 0x00a0
77 #define SOLAREDGE_COMMAND_RESP_UPGRADE_SIZE 0x00a1
78 #define SOLAREDGE_COMMAND_RESP_MISC_GET_VER 0x00b0
79 #define SOLAREDGE_COMMAND_RESP_MISC_GET_TYPE 0x00b1
80 #define SOLAREDGE_COMMAND_RESP_MISC_PAYLOAD 0x00b2
81 #define SOLAREDGE_COMMAND_RESP_MISC_READ_MEMORY 0x00b3
82 #define SOLAREDGE_COMMAND_RESP_MISC_GET_MAX_PACKET_SIZE 0x00b4
83 #define SOLAREDGE_COMMAND_MERCURY_PWM_SET 0x0100
84 #define SOLAREDGE_COMMAND_MERCURY_PWM_ENABLE 0x0101
85 #define SOLAREDGE_COMMAND_MERCURY_A2D_SAMPLE 0x0102
86 #define SOLAREDGE_COMMAND_MERCURY_KA 0x0103
87 #define SOLAREDGE_COMMAND_MERCURY_SET_VIREF 0x0104
88 #define SOLAREDGE_COMMAND_MERCURY_SET_VOMAXREF 0x0105
89 #define SOLAREDGE_COMMAND_MERCURY_SET_VOMINREF 0x0106
90 #define SOLAREDGE_COMMAND_MERCURY_READ_MEAS 0x0107
91 #define SOLAREDGE_COMMAND_MERCURY_CLOSED_LOOP_START 0x0108
92 #define SOLAREDGE_COMMAND_MERCURY_OPEN_LOOP_START 0x0109
93 #define SOLAREDGE_COMMAND_MERCURY_OPEN_LOOP_SET 0x010a
94 #define SOLAREDGE_COMMAND_MERCURY_SET_12V_10V 0x010b
95 #define SOLAREDGE_COMMAND_MERCURY_SET_5V_35V 0x010c
96 #define SOLAREDGE_COMMAND_MERCURY_SET_VO_RANGE 0x010d
97 #define SOLAREDGE_COMMAND_MERCURY_START_MPPT 0x010e
98 #define SOLAREDGE_COMMAND_MERCURY_TX_ENABLE 0x010f
99 #define SOLAREDGE_COMMAND_MERCURY_TX_TEST 0x0110
100 #define SOLAREDGE_COMMAND_MERCURY_RX_TEST 0x0111
101 #define SOLAREDGE_COMMAND_MERCURY_FORCE_TELEM 0x0112
102 #define SOLAREDGE_COMMAND_MERCURY_READ_SAMPLES_DIRECT 0x0113
103 #define SOLAREDGE_COMMAND_MERCURY_SET_OTP_BLOCK 0x0114
104 #define SOLAREDGE_COMMAND_MERCURY_SET_CAL_MODE 0x0115
105 #define SOLAREDGE_COMMAND_MERCURY_SET_VI_RANGE 0x0116
106 #define SOLAREDGE_COMMAND_MERCURY_AVG_SAMPLE 0x0117
107 #define SOLAREDGE_COMMAND_MERCURY_GET_TELEM 0x0118
108 #define SOLAREDGE_COMMAND_MERCURY_DISABLE_PROTECTION 0x0119
109 #define SOLAREDGE_COMMAND_MERCURY_BYPASS_MODE 0x011a
110 #define SOLAREDGE_COMMAND_MERCURY_SET_TEMP_CAL_PIN 0x011b
111 #define SOLAREDGE_COMMAND_MERCURY_SAVE_VOLATILE 0x011c
112 #define SOLAREDGE_COMMAND_MERCURY_BBB_MODE 0x011d
113 #define SOLAREDGE_COMMAND_MERCURY_GET_REG 0x011e
114 #define SOLAREDGE_COMMAND_MERCURY_SET_RES_CIRC_GPIOS 0x011f
115 #define SOLAREDGE_COMMAND_MERCURY_GET_SNR 0x0120
116 #define SOLAREDGE_COMMAND_MERCURY_GET_LOOP_MODE 0x0121
117 #define SOLAREDGE_COMMAND_MERCURY_SET_REG 0x0122
118 #define SOLAREDGE_COMMAND_MERCURY_DFT 0x0123
119 #define SOLAREDGE_COMMAND_MERCURY_SET_COMM_SW 0x0124
120 #define SOLAREDGE_COMMAND_MERCURY_GET_SPI_SAMPLES 0x0125
121 #define SOLAREDGE_COMMAND_MERCURY_SET_DT 0x0126
122 #define SOLAREDGE_COMMAND_MERCURY_GET_DFT_AVG 0x0127
123 #define SOLAREDGE_COMMAND_MERCURY_CONTROL_TEST 0x0128
124 #define SOLAREDGE_COMMAND_MERCURY_GET_STATUS_REG 0x0129
125 #define SOLAREDGE_COMMAND_MERCURY_RESET_STATUS_REG 0x012a
126 #define SOLAREDGE_COMMAND_MERCURY_SET_DPWM_FREQ 0x012b
127 #define SOLAREDGE_COMMAND_RESP_MERCURY_SAMPLES 0x0180
128 #define SOLAREDGE_COMMAND_RESP_MERCURY_MON 0x0181
129 #define SOLAREDGE_COMMAND_RESP_MERCURY_TELEM 0x0182
130 #define SOLAREDGE_COMMAND_RESP_MERCURY_MEAS 0x0183
131 #define SOLAREDGE_COMMAND_RESP_MERCURY_RX_TEST_RES 0x0184
132 #define SOLAREDGE_COMMAND_RESP_MERCURY_SAMPLES_DIRECT 0x0185
133 #define SOLAREDGE_COMMAND_RESP_MERCURY_AVG_SAMPLE 0x0186
134 #define SOLAREDGE_COMMAND_RESP_MERCURY_GET_TELEM 0x0187
135 #define SOLAREDGE_COMMAND_RESP_MERCURY_CONTROL_TEST 0x0188
136 #define SOLAREDGE_COMMAND_VENUSMNGR_READ_ISE_MEAS1 0x0200
137 #define SOLAREDGE_COMMAND_VENUSMNGR_READ_ISE_MEAS2 0x0201
138 #define SOLAREDGE_COMMAND_VENUSMNGR_READ_SE_MEAS 0x0202
139 #define SOLAREDGE_COMMAND_VENUSMNGR_START_INVERTER 0x0203
140 #define SOLAREDGE_COMMAND_VENUSMNGR_ISE_DUTY_CYCLE 0x0204
141 #define SOLAREDGE_COMMAND_VENUSMNGR_GET_SYS_STATUS 0x0205
142 #define SOLAREDGE_COMMAND_VENUSMNGR_GET_TELEM 0x0206
143 #define SOLAREDGE_COMMAND_VENUSMNGR_RX_TEST_INIT 0x0207
144 #define SOLAREDGE_COMMAND_VENUSMNGR_RX_TEST 0x0208
145 #define SOLAREDGE_COMMAND_VENUSMNGR_TX_TEST_START 0x0209
146 #define SOLAREDGE_COMMAND_VENUSMNGR_TX_TEST_STOP 0x020a
147 #define SOLAREDGE_COMMAND_VENUSMNGR_SET_TX_ENABLE 0x020b
148 #define SOLAREDGE_COMMAND_VENUSMNGR_ENABLE_ISE_WD 0x020c
149 #define SOLAREDGE_COMMAND_VENUSMNGR_DISABLE_ISE_WD 0x020d
150 #define SOLAREDGE_COMMAND_VENUSMNGR_GET_COUNTRY_CODE 0x020e
151 #define SOLAREDGE_COMMAND_VENUSMNGR_SET_COUNTRY 0x020f
152 #define SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_MODE 0x0210
153 #define SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_SET_PARAM 0x0211
154 #define SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_GET_EVENT 0x0212
155 #define SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_GET_STATUS 0x0213
156 #define SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_START 0x0214
157 #define SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_SEND 0x0215
158 #define SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_SEND_PAIRING 0x0216
159 #define SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_GET_STATUS 0x0217
160 #define SOLAREDGE_COMMAND_VENUSMNGR_KA_DATA_SEND 0x0218
161 #define SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_END_PAIRING 0x0219
162 #define SOLAREDGE_COMMAND_VENUSMNGR_FORCE_GRID_MON 0x021a
163 #define SOLAREDGE_COMMAND_VENUSMNGR_FORCE_SKIP_GRID_MON 0x021b
164 #define SOLAREDGE_COMMAND_VENUSMNGR_START_SUPERVISE 0x021c
165 #define SOLAREDGE_COMMAND_VENUSMNGR_READ_A2D_MEAS 0x021d
166 #define SOLAREDGE_COMMAND_VENUSMNGR_GET_COUNTRY_DEFAULTS 0x021e
167 #define SOLAREDGE_COMMAND_VENUSMNGR_SET_PRODUCT_MODEL 0x021f
168 #define SOLAREDGE_COMMAND_VENUSMNGR_GET_PRODUCT_MODEL 0x0220
169 #define SOLAREDGE_COMMAND_VENUSMNGR_SET_DYNAMIC_INVPWR_PARAM 0x0221
170 #define SOLAREDGE_COMMAND_INVERTER_ENTER_BURN_INVPWR_MODE 0x0222
171 #define SOLAREDGE_COMMAND_VENUSMNGR_MPPT_TRAVEL 0x0223
172 #define SOLAREDGE_COMMAND_VENUSMNGR_SET_PWR_PARAM 0x0224
173 #define SOLAREDGE_COMMAND_INVERTER_CURRENT_MODEM_SET_DATA_BIT 0x0225
174 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_ISE_MEAS1 0x0280
175 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_ISE_MEAS2 0x0281
176 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_SE_MEAS 0x0282
177 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_SYS_STATUS 0x0283
178 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_TELEM 0x0284
179 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_RX_TEST 0x0285
180 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_COUNTRY_CODE 0x0286
181 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_PRIVILEGED_GET_EVENT 0x0287
182 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_PRIVILEGED_GET_STATUS 0x0288
183 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_CURRENT_MODEM_GET_STATUS 0x0289
184 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_A2D_MEAS 0x028a
185 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_COUNTRY_DEFAULTS 0x028b
186 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_PRODUCT_MODEL 0x028c
187 #define SOLAREDGE_COMMAND_RESP_VENUSMNGR_SET_DYNAMIC_ISE_PARAM 0x028d
188 #define SOLAREDGE_COMMAND_POLESTAR_TELEMS_START 0x0300
189 #define SOLAREDGE_COMMAND_POLESTAR_TELEMS_STOP 0x0301
190 #define SOLAREDGE_COMMAND_POLESTAR_MASTER_GRANT 0x0302
191 #define SOLAREDGE_COMMAND_POLESTAR_RTC_SET 0x0303
192 #define SOLAREDGE_COMMAND_POLESTAR_TEST_RAM 0x0304
193 #define SOLAREDGE_COMMAND_POLESTAR_TEST_FLASH 0x0305
194 #define SOLAREDGE_COMMAND_POLESTAR_MAC_ADDR_GET 0x0306
195 #define SOLAREDGE_COMMAND_POLESTAR_IP_ADDR_GET 0x0307
196 #define SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_INIT 0x0308
197 #define SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_GET_ID 0x0309
198 #define SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_STOP 0x030a
199 #define SOLAREDGE_COMMAND_POLESTAR_UART_ZB_BRIDGE 0x030b
200 #define SOLAREDGE_COMMAND_POLESTAR_SEND_PING 0x030c
201 #define SOLAREDGE_COMMAND_POLESTAR_LCD_TEST_MODE 0x030d
202 #define SOLAREDGE_COMMAND_POLESTAR_CONFTOOL_START 0x030e
203 #define SOLAREDGE_COMMAND_POLESTAR_ETHERNET_STAT 0x030f
204 #define SOLAREDGE_COMMAND_POLESTAR_GET_FIFO_FLASH_INFO 0x0310
205 #define SOLAREDGE_COMMAND_POLESTAR_RESET_FIFO_FLASH 0x0311
206 #define SOLAREDGE_COMMAND_POLESTAR_RESET_FLASH 0x0312
207 #define SOLAREDGE_COMMAND_POLESTAR_RS485_MSTR_SLV_DET_START 0x0313
208 #define SOLAREDGE_COMMAND_POLESTAR_RS485_MSTR_SLV_DET_STATUS 0x0314
209 #define SOLAREDGE_COMMAND_POLESTAR_UART_ZB_SET 0x0315
210 #define SOLAREDGE_COMMAND_POLESTAR_TCP_TEST 0x0316
211 #define SOLAREDGE_COMMAND_POLESTAR_TIMER_ADVANCE 0x0317
212 #define SOLAREDGE_COMMAND_POLESTAR_ERASE_FLASH_FIFO_FAST 0x0318
213 #define SOLAREDGE_COMMAND_POLESTAR_SELF_KA 0x0319
214 #define SOLAREDGE_COMMAND_POLESTAR_ISE_BRIDGE 0x031a
215 #define SOLAREDGE_COMMAND_POLESTAR_ERASE_STATISTICS 0x031b
216 #define SOLAREDGE_COMMAND_POLESTAR_GET_POK_STATUS 0x031c
217 #define SOLAREDGE_COMMAND_POLESTAR_INVERTER_HW_RESET 0x031d
218 #define SOLAREDGE_COMMAND_POLESTAR_ZB_PRESENT_STATUS 0x031e
219 #define SOLAREDGE_COMMAND_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES 0x031f
220 #define SOLAREDGE_COMMAND_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES 0x0320
221 #define SOLAREDGE_COMMAND_POLESTAR_GET_S_OK_STATUS 0x0321
222 #define SOLAREDGE_COMMAND_POLESTAR_GET_ENERGY_STATISTICS_STATUS 0x0322
223 #define SOLAREDGE_COMMAND_POLESTAR_GET_GSM_PRESENT_STATUS 0x0323
224 #define SOLAREDGE_COMMAND_POLESTAR_SET_STATISTICS_ELEMENT 0x0324
225 #define SOLAREDGE_COMMAND_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_START 0x0325
226 #define SOLAREDGE_COMMAND_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS 0x0326
227 #define SOLAREDGE_COMMAND_POLESTAR_GET_GEMINI_GFD_STATUS 0x0327
228 #define SOLAREDGE_COMMAND_POLESTAR_GET_ERROR_LOG 0x0328
229 #define SOLAREDGE_COMMAND_POLESTAR_BLOCK_SERVER_CONTROL 0x0329
230 #define SOLAREDGE_COMMAND_POLESTAR_GET_SERVER_CONTROL_STATUS 0x032a
231 #define SOLAREDGE_COMMAND_POLESTAR_TEST_SD_FLASH 0x032b
232 #define SOLAREDGE_COMMAND_POLESTAR_GET_WARNING_LOG 0x032c
233 #define SOLAREDGE_COMMAND_POLESTAR_RESET_MODBUS_DEVICE_DATA 0x032d
234 #define SOLAREDGE_COMMAND_POLESTAR_TURN_OFF_INTERNAL_SRAM_BATTERY_BACKUP 0x032e
235 #define SOLAREDGE_COMMAND_POLESTAR_WRITE_LCD 0x032f
236 #define SOLAREDGE_COMMAND_POLESTAR_READ_LAST_BUTTONS 0x0330
237 #define SOLAREDGE_COMMAND_POLESTAR_GET_STATISTICS_ELEMENT 0x0331
238 #define SOLAREDGE_COMMAND_POLESTAR_SEND_POWER_REDUCER_SLAVE_PACKET 0x0332
239 #define SOLAREDGE_COMMAND_POLESTAR_SEND_POWER_REDUCER_MASTER_PACKET 0x0333
240 #define SOLAREDGE_COMMAND_POLESTAR_GET_WIFI_PRESENT_STATUS 0x0334
241 #define SOLAREDGE_COMMAND_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA 0x0335
242 #define SOLAREDGE_COMMAND_POLESTAR_SET_PORT_EXPANDER_GPIO_DATA 0x0336
243 #define SOLAREDGE_COMMAND_POLESTAR_READ_LCD 0x0337
244 #define SOLAREDGE_COMMAND_POLESTAR_SIMULATE_BUTTON_PRESSING 0x0338
245 #define SOLAREDGE_COMMAND_POLESTAR_INV_ACTIVATE 0x0339
246 #define SOLAREDGE_COMMAND_POLESTAR_MODBUS_SLAVE_PACKET 0x033a
247 #define SOLAREDGE_COMMAND_POLESTAR_GET_BUTTON_STATE 0x033b
248 #define SOLAREDGE_COMMAND_POLESTAR_GET_A2D_VALS 0x033c
249 #define SOLAREDGE_COMMAND_POLESTAR_GET_OPMODE 0x033d
250 #define SOLAREDGE_COMMAND_POLESTAR_SET_BACKLIGHT 0x033e
251 #define SOLAREDGE_COMMAND_POLESTAR_READ_FIFO_PAGE 0x033f
252 #define SOLAREDGE_COMMAND_POLESTAR_GET_CURRENT_SCREEN_INDEX 0x0340
253 #define SOLAREDGE_COMMAND_POLESTAR_GET_IDENTITY 0x0341
254 #define SOLAREDGE_COMMAND_POLESTAR_GET_SUPPORTED_COMMANDS 0x0342
255 #define SOLAREDGE_COMMAND_POLESTAR_PAIRING_START 0x0343
256 #define SOLAREDGE_COMMAND_POLESTAR_PAIRING_STATUS 0x0344
257 #define SOLAREDGE_COMMAND_POLESTAR_PRODUCT_RESET 0x0345
258 #define SOLAREDGE_COMMAND_POLESTAR_PLC_CMD_EXECUTE 0x0346
259 #define SOLAREDGE_COMMAND_POLESTAR_GET_STATUS 0x0347
260 #define SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_LOCK_MASTER 0x0348
261 #define SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_LOCK_SLAVE 0x0349
262 #define SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_REPORT 0x034a
263 #define SOLAREDGE_COMMAND_POLESTAR_UART_BRIDGE_INIT 0x034b
264 #define SOLAREDGE_COMMAND_POLESTAR_SEND_UART_DATA 0x034c
265 #define SOLAREDGE_COMMAND_POLESTAR_LED_TEST 0x034d
266 #define SOLAREDGE_COMMAND_POLESTAR_SEND_FAKE_TELEMS 0x034e
267 #define SOLAREDGE_COMMAND_RESP_POLESTAR_RTC_SET 0x0380
268 #define SOLAREDGE_COMMAND_RESP_POLESTAR_MAC_ADDR_GET 0x0381
269 #define SOLAREDGE_COMMAND_RESP_POLESTAR_IP_ADDR_GET 0x0382
270 #define SOLAREDGE_COMMAND_RESP_POLESTAR_SEND_PING 0x0383
271 #define SOLAREDGE_COMMAND_RESP_POLESTAR_ETHERNET_STAT 0x0384
272 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_FIFO_FLASH_INFO 0x0385
273 #define SOLAREDGE_COMMAND_RESP_POLESTAR_RS485_MSTR_SLV_DET_STATUS 0x0386
274 #define SOLAREDGE_COMMAND_RESP_POLESTAR_TCP_TEST_RESP 0x0387
275 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_POK_STATUS 0x0388
276 #define SOLAREDGE_COMMAND_RESP_POLESTAR_INVERTER_HW_RESET 0x0389
277 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES 0x038a
278 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES 0x038b
279 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_S_OK_STATUS 0x038c
280 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ENERGY_STATISTICS_STATUS 0x038d
281 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_GSM_PRESENT_STATUS 0x038e
282 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS 0x038f
283 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_GEMINI_GFD_STATUS 0x0390
284 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ERROR_LOG 0x0391
285 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_SERVER_CONTROL_STATUS 0x0392
286 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_WARNING_LOG 0x0393
287 #define SOLAREDGE_COMMAND_RESP_POLESTAR_READ_LAST_BUTTONS 0x0394
288 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_STATISTICS_ELEMENT 0x0395
289 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_WIFI_PRESENT_STATUS 0x0396
290 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA 0x0397
291 #define SOLAREDGE_COMMAND_RESP_POLESTAR_READ_LCD 0x0398
292 #define SOLAREDGE_COMMAND_RESP_POLESTAR_MODBUS_SLAVE_PACKET 0x0399
293 #define SOLAREDGE_COMMAND_RESP_POLESTAR_MASTER_GRANT_ACK 0x039a
294 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_IDENTITY 0x039b
295 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_SUPPORTED_COMMANDS 0x039c
296 #define SOLAREDGE_COMMAND_RESP_POLESTAR_PAIRING_START 0x039d
297 #define SOLAREDGE_COMMAND_RESP_POLESTAR_PAIRING_STATUS 0x039e
298 #define SOLAREDGE_COMMAND_RESP_POLESTAR_GET_STATUS 0x039f
299 #define SOLAREDGE_COMMAND_RESP_POLESTAR_FIRE_SAFETY_REPORT 0x03a0
300 #define SOLAREDGE_COMMAND_RESP_POLESTAR_SEND_UART_DATA 0x03a1
301 #define SOLAREDGE_COMMAND_SUNTRACER_READ_FLASH 0x0400
302 #define SOLAREDGE_COMMAND_SUNTRACER_START 0x0401
303 #define SOLAREDGE_COMMAND_SUNTRACER_SET_RTC 0x0402
304 #define SOLAREDGE_COMMAND_SUNTRACER_DEL_FLASH 0x0403
305 #define SOLAREDGE_COMMAND_SUNTRACER_DEL_FLASH_SECTOR 0x0404
306 #define SOLAREDGE_COMMAND_RESP_SUNTRACER_TRACE 0x0480
307 #define SOLAREDGE_COMMAND_RESP_SUNTRACER_FLASH 0x0481
308 #define SOLAREDGE_COMMAND_SERVER_POST_DATA 0x0500
309 #define SOLAREDGE_COMMAND_SERVER_GET_GMT 0x0501
310 #define SOLAREDGE_COMMAND_SERVER_GET_NAME 0x0502
311 #define SOLAREDGE_COMMAND_SERVER_SET_KEY 0x0503
312 #define SOLAREDGE_COMMAND_RESP_SERVER_GMT 0x0580
313 #define SOLAREDGE_COMMAND_RESP_SERVER_NAME 0x0581
314 #define SOLAREDGE_COMMAND_RESP_CONFTOOL_PLC_DATA 0x0680
315 #define SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS1 0x0800
316 #define SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS2 0x0801
317 #define SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS3 0x0802
318 #define SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS4 0x0803
319 #define SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS5 0x0804
320 #define SOLAREDGE_COMMAND_JUPMNGR_READ_MEAS 0x0805
321 #define SOLAREDGE_COMMAND_JUPMNGR_GET_SYS_STATUS 0x0806
322 #define SOLAREDGE_COMMAND_JUPMNGR_GET_TELEM 0x0807
323 #define SOLAREDGE_COMMAND_JUPMNGR_GET_COUNTRY_CODE 0x0808
324 #define SOLAREDGE_COMMAND_JUPMNGR_SET_COUNTRY 0x0809
325 #define SOLAREDGE_COMMAND_JUPMNGR_GET_COUNTRY_DEFAULTS 0x080a
326 #define SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_MODE 0x080b
327 #define SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_SET_PARAM 0x080c
328 #define SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_GET_EVENT 0x080d
329 #define SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_GET_STATUS 0x080e
330 #define SOLAREDGE_COMMAND_JUPMNGR_SET_PRODUCT_MODEL 0x080f
331 #define SOLAREDGE_COMMAND_JUPMNGR_GET_PRODUCT_MODEL 0x0810
332 #define SOLAREDGE_COMMAND_JUPMNGR_DYNAMIC_SET_INVPWR_PARAM 0x0811
333 #define SOLAREDGE_COMMAND_JUPMNGR_GET_INVPWR_PARAM_TYPE 0x0812
334 #define SOLAREDGE_COMMAND_JUPMNGR_GET_FANS_STATUS 0x0813
335 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS1 0x0880
336 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS2 0x0881
337 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS3 0x0882
338 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS4 0x0883
339 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS5 0x0884
340 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_MEAS 0x0885
341 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_SYS_STATUS 0x0886
342 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_TELEM 0x0887
343 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_COUNTRY_CODE 0x0888
344 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_COUNTRY_DEFAULTS 0x0889
345 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_PRIVILEGED_GET_EVENT 0x088a
346 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_PRIVILEGED_GET_STATUS 0x088b
347 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_PRODUCT_MODEL 0x088c
348 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_INVPWR_PARAM_TYPE 0x088d
349 #define SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_FANS_STATUS 0x088e
350 #define SOLAREDGE_COMMAND_INVERTER_TURN_15V_ON 0x0900
351 #define SOLAREDGE_COMMAND_INVERTER_TURN_15V_OFF 0x0901
352 #define SOLAREDGE_COMMAND_INVERTER_ENABLE_RELAYS 0x0902
353 #define SOLAREDGE_COMMAND_INVERTER_DISABLE_RELAYS 0x0903
354 #define SOLAREDGE_COMMAND_INVERTER_DYNAMIC_POWER_LIMIT 0x0904
355 #define SOLAREDGE_COMMAND_INVERTER_IVTRACE_START 0x0905
356 #define SOLAREDGE_COMMAND_INVERTER_GRID_TRIP_TEST 0x0906
357 #define SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS1 0x0907
358 #define SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS1 0x0908
359 #define SOLAREDGE_COMMAND_INVERTER_SET_PWR_GAIN_PARAMS 0x0909
360 #define SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS2 0x090a
361 #define SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS2 0x090b
362 #define SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS3 0x090c
363 #define SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS3 0x090d
364 #define SOLAREDGE_COMMAND_INVERTER_LOCK_IN 0x090e
365 #define SOLAREDGE_COMMAND_INVERTER_LOCK_OUT 0x090f
366 #define SOLAREDGE_COMMAND_INVERTER_GET_VDC 0x0910
367 #define SOLAREDGE_COMMAND_INVERTER_PAIRING_DO_NOTHING 0x0911
368 #define SOLAREDGE_COMMAND_INVERTER_PAIRING_DO_SAFETY 0x0912
369 #define SOLAREDGE_COMMAND_RESP_INVERTER_DYNAMIC_POWER_LIMIT 0x0980
370 #define SOLAREDGE_COMMAND_RESP_INVERTER_GET_LMVGC_PARAMS 0x0981
371 #define SOLAREDGE_COMMAND_VEGA_READ_MEAS 0x0a00
372 #define SOLAREDGE_COMMAND_VEGA_GET_SYS_STATUS 0x0a01
373 #define SOLAREDGE_COMMAND_VEGA_GET_TELEM 0x0a02
374 #define SOLAREDGE_COMMAND_VEGA_GET_MAX_VDC_VALUE 0x0a03
375 #define SOLAREDGE_COMMAND_VEGA_SET_MAX_VDC_VALUE 0x0a04
376 #define SOLAREDGE_COMMAND_VEGA_RELAY_SET 0x0a05
377 #define SOLAREDGE_COMMAND_VEGA_SET_OPMODE 0x0a06
378 #define SOLAREDGE_COMMAND_VEGA_GET_OPMODE 0x0a07
379 #define SOLAREDGE_COMMAND_VEGA_SET_RANGE 0x0a08
380 #define SOLAREDGE_COMMAND_RESP_VEGA_READ_MEAS 0x0a80
381 #define SOLAREDGE_COMMAND_RESP_VEGA_GET_SYS_STATUS 0x0a81
382 #define SOLAREDGE_COMMAND_RESP_VEGA_GET_TELEM 0x0a82
383 #define SOLAREDGE_COMMAND_RESP_VEGA_GET_MAX_VDC_VALUE 0x0a83
384 #define SOLAREDGE_COMMAND_COMBI_PAUSE_MONITORING 0x0b00
385 #define SOLAREDGE_COMMAND_COMBI_SET_TIME_STAMP 0x0b01
386 #define SOLAREDGE_COMMAND_COMBI_RCD_CALIBRATION 0x0b02
387 #define SOLAREDGE_COMMAND_COMBI_GET_TELEM 0x0b03
388 #define SOLAREDGE_COMMAND_COMBI_FORCE_TELEM 0x0b04
389 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT 0x0b05
390 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT 0x0b06
391 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT_ALL 0x0b07
392 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT_ALL 0x0b08
393 #define SOLAREDGE_COMMAND_COMBI_RCD_TEST_EXECUTE 0x0b09
394 #define SOLAREDGE_COMMAND_COMBI_RELAYS_TEST_EXECUTE 0x0b0a
395 #define SOLAREDGE_COMMAND_COMBI_GET_COMBISTRING_PARAM 0x0b0b
396 #define SOLAREDGE_COMMAND_COMBI_SET_COMBISTRING_PARAM 0x0b0c
397 #define SOLAREDGE_COMMAND_COMBI_GET_ALL_COMBISTRING_PARAMS 0x0b0d
398 #define SOLAREDGE_COMMAND_COMBI_GET_ALL_COMBI_PARAMS 0x0b0e
399 #define SOLAREDGE_COMMAND_COMBI_READ_MEASUREMENTS 0x0b0f
400 #define SOLAREDGE_COMMAND_COMBI_GET_STRING_STATUS 0x0b10
401 #define SOLAREDGE_COMMAND_COMBI_GET_COMBI_STATUS 0x0b11
402 #define SOLAREDGE_COMMAND_COMBI_GET_ACTIVE_STRINGS 0x0b12
403 #define SOLAREDGE_COMMAND_COMBI_FWD_STRING_TELEM 0x0b13
404 #define SOLAREDGE_COMMAND_COMBI_FWD_COMBI_TELEM 0x0b14
405 #define SOLAREDGE_COMMAND_COMBI_GET_UNIFIED_STRING_STATUS 0x0b15
406 #define SOLAREDGE_COMMAND_COMBI_GET_UNIFIED_COMBI_STATUS 0x0b16
407 #define SOLAREDGE_COMMAND_COMBI_CHECK_INNER_PROTOCOL 0x0b17
408 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT_RELAY 0x0b18
409 #define SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT_RELAY 0x0b19
410 #define SOLAREDGE_COMMAND_COMBI_GET_GEMINI_STRING_IDS 0x0b1a
411 #define SOLAREDGE_COMMAND_COMBI_GET_ALL_SWITCHES_STATUS 0x0b1b
412 #define SOLAREDGE_COMMAND_COMBI_SET_RCD_TEST_PIN 0x0b1c
413 #define SOLAREDGE_COMMAND_COMBI_RELAYS_TEST_CHECK_CONDS 0x0b1d
414 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_TELEM 0x0b80
415 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_STRING_STATUS 0x0b81
416 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_COMBI_STATUS 0x0b82
417 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_ACTIVE_STRINGS 0x0b83
418 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_UNIFIED_STRING_STATUS 0x0b84
419 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_UNIFIED_COMBI_STATUS 0x0b85
420 #define SOLAREDGE_COMMAND_RESP_COMBI_GET_GEMINI_STRING_IDS 0x0b86
421 #define SOLAREDGE_COMMAND_INVPWR_GET_ERROR_STATUS 0x0c00
422 #define SOLAREDGE_COMMAND_INVPWR_GET_STATUS 0x0c01
423 #define SOLAREDGE_COMMAND_INVPWR_GO 0x0c02
424 #define SOLAREDGE_COMMAND_INVPWR_HALT 0x0c03
425 #define SOLAREDGE_COMMAND_INVPWR_CONST_DUTY_CYCLE 0x0c04
426 #define SOLAREDGE_COMMAND_INVPWR_DUMY_ERROR 0x0c05
427 #define SOLAREDGE_COMMAND_INVPWR_PAIRING_SET_STATE 0x0c06
428 #define SOLAREDGE_COMMAND_INVPWR_TEST_IAC_CONTROL 0x0c07
429 #define SOLAREDGE_COMMAND_RESP_INVPWR_GET_ERROR_STATUS 0x0c80
430 #define SOLAREDGE_COMMAND_RESP_INVPWR_GET_STATUS 0x0c81
431 #define SOLAREDGE_COMMAND_RESP_INVPWR_GO 0x0c82
432 #define SOLAREDGE_COMMAND_RESP_INVPWR_HALT 0x0c83
433 #define SOLAREDGE_COMMAND_RESP_INVPWR_CONST_DUTY_CYCLE 0x0c84
434 #define SOLAREDGE_COMMAND_RESP_INVPWR_DUMY_ERROR 0x0c85
435 #define SOLAREDGE_COMMAND_BOOTLOADER_SECURE 0x1400
436 #define SOLAREDGE_COMMAND_BOOTLOADER_UNSECURE 0x1401
437 #define SOLAREDGE_COMMAND_ACTIVATOR_ACTIVATE 0x1500
438 #define SOLAREDGE_COMMAND_ACTIVATOR_GET_ADC_SAMPLES 0x1501
439 #define SOLAREDGE_COMMAND_ACTIVATOR_SET_VO_RANGE 0x1502
440 #define SOLAREDGE_COMMAND_ACTIVATOR_GET_AVG_SAMPLES 0x1503
441 #define SOLAREDGE_COMMAND_ACTIVATOR_TX_TEST 0x1504
442 #define SOLAREDGE_COMMAND_ACTIVATOR_LCD_TEST 0x1505
443 #define SOLAREDGE_COMMAND_ACTIVATOR_BUTTONS_TEST 0x1506
444 #define SOLAREDGE_COMMAND_FANCONTROL_SET_PWM 0x1600
445 #define SOLAREDGE_COMMAND_FANCONTROL_GET_PWM 0x1601
446 #define SOLAREDGE_COMMAND_FANCONTROL_GET_ALL_PWM 0x1602
447 #define SOLAREDGE_COMMAND_FANCONTROL_SHUT_ALL_PWM 0x1603
448 #define SOLAREDGE_COMMAND_FANCONTROL_RES 0x1680
449 #define SOLAREDGE_COMMAND_DISPLAY_BOARD_LCD_WRITE 0x1700
450 #define SOLAREDGE_COMMAND_DISPLAY_BOARD_LED_SET 0x1701
452 #define SOLAREDGE_DEVICETYPE_OPTIMIZER 0x0000
453 #define SOLAREDGE_DEVICETYPE_INVERTER_1PHASE 0x0010
454 #define SOLAREDGE_DEVICETYPE_INVERTER_3PHASE 0x0011
455 #define SOLAREDGE_DEVICETYPE_OPTIMIZER2 0x0080
456 #define SOLAREDGE_DEVICETYPE_EVENT 0x0300
458 typedef struct solaredge_packet_header
{
460 uint16_t length_inverse
;
461 uint16_t sequence_number
;
462 uint32_t source_address
;
463 uint32_t destination_address
;
464 uint16_t command_type
;
465 } t_solaredge_packet_header
;
467 typedef struct solaredge_device_header
{
470 uint16_t device_length
;
471 } t_solaredge_device_header
;
473 typedef struct solaredge_conversion_data
{
474 bool session_key_found
;
475 gcry_cipher_hd_t cipher_hd_session
;
476 uint16_t expected_sequence_number
;
477 } t_solaredge_conversion_data
;
479 void proto_reg_handoff_solaredge(void);
480 void proto_register_solaredge(void);
482 static dissector_handle_t solaredge_handle
;
484 static bool global_show_unknown_fields
= true;
486 static expert_field ei_solaredge_invalid_length
;
487 static expert_field ei_solaredge_invalid_crc
;
489 static int proto_solaredge
;
491 static int hf_solaredge_length_type
;
492 static int hf_solaredge_length_inverse_type
;
493 static int hf_solaredge_sequence_number_type
;
494 static int hf_solaredge_source_address_type
;
495 static int hf_solaredge_destination_address_type
;
496 static int hf_solaredge_command_type
;
497 static int hf_solaredge_crc_type
;
498 static int hf_solaredge_crc_status_type
;
500 static int hf_solaredge_payload_type
;
502 static int hf_solaredge_session_key_type
;
504 static int hf_solaredge_post_type
;
505 static int hf_solaredge_post_device_type
;
506 static int hf_solaredge_post_device_type_type
;
507 static int hf_solaredge_post_device_id_type
;
508 static int hf_solaredge_post_length_type
;
510 static int hf_solaredge_post_padding_uint32_type
;
511 static int hf_solaredge_post_padding_float_type
;
513 static int hf_solaredge_post_singlephase_inverter_timestamp_type
;
514 static int hf_solaredge_post_singlephase_inverter_uptime_type
;
515 static int hf_solaredge_post_singlephase_inverter_interval_type
;
516 static int hf_solaredge_post_singlephase_inverter_temperature_type
;
517 static int hf_solaredge_post_singlephase_inverter_energy_day_type
;
518 static int hf_solaredge_post_singlephase_inverter_energy_interval_type
;
519 static int hf_solaredge_post_singlephase_inverter_ac_voltage_type
;
520 static int hf_solaredge_post_singlephase_inverter_ac_current_type
;
521 static int hf_solaredge_post_singlephase_inverter_ac_frequency_type
;
522 static int hf_solaredge_post_singlephase_inverter_dc_voltage_type
;
523 static int hf_solaredge_post_singlephase_inverter_energy_total_type
;
524 static int hf_solaredge_post_singlephase_inverter_power_max_type
;
525 static int hf_solaredge_post_singlephase_inverter_ac_power_type
;
527 static int hf_solaredge_post_optimizer_inverter_type
;
528 static int hf_solaredge_post_optimizer_uptime_type
;
529 static int hf_solaredge_post_optimizer_dc_current_panel_type
;
530 static int hf_solaredge_post_optimizer_timestamp_type
;
531 static int hf_solaredge_post_optimizer_uptime_short_type
;
532 static int hf_solaredge_post_optimizer_dc_voltage_panel_type
;
533 static int hf_solaredge_post_optimizer_dc_voltage_optimzer_type
;
534 static int hf_solaredge_post_optimizer_dc_current_optimzer_type
;
535 static int hf_solaredge_post_optimizer_energy_day_type
;
536 static int hf_solaredge_post_optimizer_temperature_type
;
538 static int hf_solaredge_post_event_timestamp_type
;
539 static int hf_solaredge_post_event_type_type
;
540 static int hf_solaredge_post_event_event_start_timestamp_type
;
541 static int hf_solaredge_post_event_event_timezone_offset_type
;
542 static int hf_solaredge_post_event_event_end_timestamp_type
;
544 static int ett_solaredge_packet
;
545 static int ett_solaredge_packet_decrypted
;
546 static int ett_solaredge_packet_post
;
547 static int ett_solaredge_packet_post_device
;
549 static const value_string solaredge_packet_commandtypes
[] = {
550 { SOLAREDGE_COMMAND_PARAMS_RESET
, "PARAMS_RESET" },
551 { SOLAREDGE_COMMAND_PARAMS_SET_SINGLE
, "PARAMS_SET_SINGLE" },
552 { SOLAREDGE_COMMAND_PARAMS_GET_SINGLE
, "PARAMS_GET_SINGLE" },
553 { SOLAREDGE_COMMAND_PARAMS_GET_INFO
, "PARAMS_GET_INFO" },
554 { SOLAREDGE_COMMAND_PARAMS_GET_NAME
, "PARAMS_GET_NAME" },
555 { SOLAREDGE_COMMAND_PARAMS_GET_NUM
, "PARAMS_GET_NUM" },
556 { SOLAREDGE_COMMAND_PARAMS_GET_ALL
, "PARAMS_GET_ALL" },
557 { SOLAREDGE_COMMAND_PARAMS_SET_ALL
, "PARAMS_SET_ALL" },
558 { SOLAREDGE_COMMAND_PARAMS_SET_SINGLE_NOSAVE
, "PARAMS_SET_SINGLE_NOSAVE" },
559 { SOLAREDGE_COMMAND_PARAMS_SAVE
, "PARAMS_SAVE" },
560 { SOLAREDGE_COMMAND_PARAMS_POLICY_ENABLE
, "PARAMS_POLICY_ENABLE" },
561 { SOLAREDGE_COMMAND_PARAMS_POLICY_DISABLE
, "PARAMS_POLICY_DISABLE" },
562 { SOLAREDGE_COMMAND_PARAMS_POLICY_DISABLE_VOLATILE
, "PARAMS_POLICY_DISABLE_VOLATILE" },
563 { SOLAREDGE_COMMAND_PARAMS_SET_POLICY_PASSWORD
, "PARAMS_SET_POLICY_PASSWORD" },
564 { SOLAREDGE_COMMAND_PARAMS_GET_VOLATILE
, "PARAMS_GET_VOLATILE" },
565 { SOLAREDGE_COMMAND_PARAMS_SET_VOLATILE
, "PARAMS_SET_VOLATILE" },
566 { SOLAREDGE_COMMAND_UPGRADE_START
, "UPGRADE_START" },
567 { SOLAREDGE_COMMAND_UPGRADE_WRITE
, "UPGRADE_WRITE" },
568 { SOLAREDGE_COMMAND_UPGRADE_FINISH
, "UPGRADE_FINISH" },
569 { SOLAREDGE_COMMAND_UPGRADE_READ_DATA
, "UPGRADE_READ_DATA" },
570 { SOLAREDGE_COMMAND_UPGRADE_READ_SIZE
, "UPGRADE_READ_SIZE" },
571 { SOLAREDGE_COMMAND_MISC_RESET
, "MISC_RESET" },
572 { SOLAREDGE_COMMAND_MISC_STOP
, "MISC_STOP" },
573 { SOLAREDGE_COMMAND_MISC_DUMMY
, "MISC_DUMMY" },
574 { SOLAREDGE_COMMAND_MISC_GET_VER
, "MISC_GET_VER" },
575 { SOLAREDGE_COMMAND_MISC_GET_TYPE
, "MISC_GET_TYPE" },
576 { SOLAREDGE_COMMAND_MISC_PAYLOAD
, "MISC_PAYLOAD" },
577 { SOLAREDGE_COMMAND_MISC_SET_ID
, "MISC_SET_ID" },
578 { SOLAREDGE_COMMAND_MISC_READ_MEMORY
, "MISC_READ_MEMORY" },
579 { SOLAREDGE_COMMAND_MISC_PARAMS_PARTIAL_RESET
, "MISC_PARAMS_PARTIAL_RESET" },
580 { SOLAREDGE_COMMAND_MISC_GET_MAX_PACKET_SIZE
, "MISC_GET_MAX_PACKET_SIZE" },
581 { SOLAREDGE_COMMAND_MISC_ENCRYPTED
, "MISC_ENCRYPTED" },
582 { SOLAREDGE_COMMAND_PARAMS_SMART_LOAD_PARAMS
, "PARAMS_SMART_LOAD_PARAMS" },
583 { SOLAREDGE_COMMAND_MISC_PARAMS_PARTIAL_RESET2
, "MISC_PARAMS_PARTIAL_RESET2" },
584 { SOLAREDGE_COMMAND_PARAMS_IGNORE_PARAMS_LIST
, "PARAMS_IGNORE_PARAMS_LIST" },
585 { SOLAREDGE_COMMAND_PARAMS_PARTIAL_RESET_AS_LEVEL
, "PARAMS_PARTIAL_RESET_AS_LEVEL" },
586 { SOLAREDGE_COMMAND_PARAMS_PARTIAL_RESET_PCB_LEVEL
, "PARAMS_PARTIAL_RESET_PCB_LEVEL" },
587 { SOLAREDGE_COMMAND_RESP_ACK
, "RESP_ACK" },
588 { SOLAREDGE_COMMAND_RESP_NACK
, "RESP_NACK" },
589 { SOLAREDGE_COMMAND_RESP_PARAMS_SINGLE
, "RESP_PARAMS_SINGLE" },
590 { SOLAREDGE_COMMAND_RESP_PARAMS_INFO
, "RESP_PARAMS_INFO" },
591 { SOLAREDGE_COMMAND_RESP_PARAMS_NAME
, "RESP_PARAMS_NAME" },
592 { SOLAREDGE_COMMAND_RESP_PARAMS_NUM
, "RESP_PARAMS_NUM" },
593 { SOLAREDGE_COMMAND_RESP_PARAMS_ALL
, "RESP_PARAMS_ALL" },
594 { SOLAREDGE_COMMAND_RESP_PARAMS_INCORRECT_PASSWORD
, "RESP_PARAMS_INCORRECT_PASSWORD" },
595 { SOLAREDGE_COMMAND_RESP_UPGRADE_DATA
, "RESP_UPGRADE_DATA" },
596 { SOLAREDGE_COMMAND_RESP_UPGRADE_SIZE
, "RESP_UPGRADE_SIZE" },
597 { SOLAREDGE_COMMAND_RESP_MISC_GET_VER
, "RESP_MISC_GET_VER" },
598 { SOLAREDGE_COMMAND_RESP_MISC_GET_TYPE
, "RESP_MISC_GET_TYPE" },
599 { SOLAREDGE_COMMAND_RESP_MISC_PAYLOAD
, "RESP_MISC_PAYLOAD" },
600 { SOLAREDGE_COMMAND_RESP_MISC_READ_MEMORY
, "RESP_MISC_READ_MEMORY" },
601 { SOLAREDGE_COMMAND_RESP_MISC_GET_MAX_PACKET_SIZE
, "RESP_MISC_GET_MAX_PACKET_SIZE" },
602 { SOLAREDGE_COMMAND_MERCURY_PWM_SET
, "MERCURY_PWM_SET" },
603 { SOLAREDGE_COMMAND_MERCURY_PWM_ENABLE
, "MERCURY_PWM_ENABLE" },
604 { SOLAREDGE_COMMAND_MERCURY_A2D_SAMPLE
, "MERCURY_A2D_SAMPLE" },
605 { SOLAREDGE_COMMAND_MERCURY_KA
, "MERCURY_KA" },
606 { SOLAREDGE_COMMAND_MERCURY_SET_VIREF
, "MERCURY_SET_VIREF" },
607 { SOLAREDGE_COMMAND_MERCURY_SET_VOMAXREF
, "MERCURY_SET_VOMAXREF" },
608 { SOLAREDGE_COMMAND_MERCURY_SET_VOMINREF
, "MERCURY_SET_VOMINREF" },
609 { SOLAREDGE_COMMAND_MERCURY_READ_MEAS
, "MERCURY_READ_MEAS" },
610 { SOLAREDGE_COMMAND_MERCURY_CLOSED_LOOP_START
, "MERCURY_CLOSED_LOOP_START" },
611 { SOLAREDGE_COMMAND_MERCURY_OPEN_LOOP_START
, "MERCURY_OPEN_LOOP_START" },
612 { SOLAREDGE_COMMAND_MERCURY_OPEN_LOOP_SET
, "MERCURY_OPEN_LOOP_SET" },
613 { SOLAREDGE_COMMAND_MERCURY_SET_12V_10V
, "MERCURY_SET_12V_10V" },
614 { SOLAREDGE_COMMAND_MERCURY_SET_5V_35V
, "MERCURY_SET_5V_35V" },
615 { SOLAREDGE_COMMAND_MERCURY_SET_VO_RANGE
, "MERCURY_SET_VO_RANGE" },
616 { SOLAREDGE_COMMAND_MERCURY_START_MPPT
, "MERCURY_START_MPPT" },
617 { SOLAREDGE_COMMAND_MERCURY_TX_ENABLE
, "MERCURY_TX_ENABLE" },
618 { SOLAREDGE_COMMAND_MERCURY_TX_TEST
, "MERCURY_TX_TEST" },
619 { SOLAREDGE_COMMAND_MERCURY_RX_TEST
, "MERCURY_RX_TEST" },
620 { SOLAREDGE_COMMAND_MERCURY_FORCE_TELEM
, "MERCURY_FORCE_TELEM" },
621 { SOLAREDGE_COMMAND_MERCURY_READ_SAMPLES_DIRECT
, "MERCURY_READ_SAMPLES_DIRECT" },
622 { SOLAREDGE_COMMAND_MERCURY_SET_OTP_BLOCK
, "MERCURY_SET_OTP_BLOCK" },
623 { SOLAREDGE_COMMAND_MERCURY_SET_CAL_MODE
, "MERCURY_SET_CAL_MODE" },
624 { SOLAREDGE_COMMAND_MERCURY_SET_VI_RANGE
, "MERCURY_SET_VI_RANGE" },
625 { SOLAREDGE_COMMAND_MERCURY_AVG_SAMPLE
, "MERCURY_AVG_SAMPLE" },
626 { SOLAREDGE_COMMAND_MERCURY_GET_TELEM
, "MERCURY_GET_TELEM" },
627 { SOLAREDGE_COMMAND_MERCURY_DISABLE_PROTECTION
, "MERCURY_DISABLE_PROTECTION" },
628 { SOLAREDGE_COMMAND_MERCURY_BYPASS_MODE
, "MERCURY_BYPASS_MODE" },
629 { SOLAREDGE_COMMAND_MERCURY_SET_TEMP_CAL_PIN
, "MERCURY_SET_TEMP_CAL_PIN" },
630 { SOLAREDGE_COMMAND_MERCURY_SAVE_VOLATILE
, "MERCURY_SAVE_VOLATILE" },
631 { SOLAREDGE_COMMAND_MERCURY_BBB_MODE
, "MERCURY_BBB_MODE" },
632 { SOLAREDGE_COMMAND_MERCURY_GET_REG
, "MERCURY_GET_REG" },
633 { SOLAREDGE_COMMAND_MERCURY_SET_RES_CIRC_GPIOS
, "MERCURY_SET_RES_CIRC_GPIOS" },
634 { SOLAREDGE_COMMAND_MERCURY_GET_SNR
, "MERCURY_GET_SNR" },
635 { SOLAREDGE_COMMAND_MERCURY_GET_LOOP_MODE
, "MERCURY_GET_LOOP_MODE" },
636 { SOLAREDGE_COMMAND_MERCURY_SET_REG
, "MERCURY_SET_REG" },
637 { SOLAREDGE_COMMAND_MERCURY_DFT
, "MERCURY_DFT" },
638 { SOLAREDGE_COMMAND_MERCURY_SET_COMM_SW
, "MERCURY_SET_COMM_SW" },
639 { SOLAREDGE_COMMAND_MERCURY_GET_SPI_SAMPLES
, "MERCURY_GET_SPI_SAMPLES" },
640 { SOLAREDGE_COMMAND_MERCURY_SET_DT
, "MERCURY_SET_DT" },
641 { SOLAREDGE_COMMAND_MERCURY_GET_DFT_AVG
, "MERCURY_GET_DFT_AVG" },
642 { SOLAREDGE_COMMAND_MERCURY_CONTROL_TEST
, "MERCURY_CONTROL_TEST" },
643 { SOLAREDGE_COMMAND_MERCURY_GET_STATUS_REG
, "MERCURY_GET_STATUS_REG" },
644 { SOLAREDGE_COMMAND_MERCURY_RESET_STATUS_REG
, "MERCURY_RESET_STATUS_REG" },
645 { SOLAREDGE_COMMAND_MERCURY_SET_DPWM_FREQ
, "MERCURY_SET_DPWM_FREQ" },
646 { SOLAREDGE_COMMAND_RESP_MERCURY_SAMPLES
, "RESP_MERCURY_SAMPLES" },
647 { SOLAREDGE_COMMAND_RESP_MERCURY_MON
, "RESP_MERCURY_MON" },
648 { SOLAREDGE_COMMAND_RESP_MERCURY_TELEM
, "RESP_MERCURY_TELEM" },
649 { SOLAREDGE_COMMAND_RESP_MERCURY_MEAS
, "RESP_MERCURY_MEAS" },
650 { SOLAREDGE_COMMAND_RESP_MERCURY_RX_TEST_RES
, "RESP_MERCURY_RX_TEST_RES" },
651 { SOLAREDGE_COMMAND_RESP_MERCURY_SAMPLES_DIRECT
, "RESP_MERCURY_SAMPLES_DIRECT" },
652 { SOLAREDGE_COMMAND_RESP_MERCURY_AVG_SAMPLE
, "RESP_MERCURY_AVG_SAMPLE" },
653 { SOLAREDGE_COMMAND_RESP_MERCURY_GET_TELEM
, "RESP_MERCURY_GET_TELEM" },
654 { SOLAREDGE_COMMAND_RESP_MERCURY_CONTROL_TEST
, "RESP_MERCURY_CONTROL_TEST" },
655 { SOLAREDGE_COMMAND_VENUSMNGR_READ_ISE_MEAS1
, "VENUSMNGR_READ_ISE_MEAS1" },
656 { SOLAREDGE_COMMAND_VENUSMNGR_READ_ISE_MEAS2
, "VENUSMNGR_READ_ISE_MEAS2" },
657 { SOLAREDGE_COMMAND_VENUSMNGR_READ_SE_MEAS
, "VENUSMNGR_READ_SE_MEAS" },
658 { SOLAREDGE_COMMAND_VENUSMNGR_START_INVERTER
, "VENUSMNGR_START_INVERTER" },
659 { SOLAREDGE_COMMAND_VENUSMNGR_ISE_DUTY_CYCLE
, "VENUSMNGR_ISE_DUTY_CYCLE" },
660 { SOLAREDGE_COMMAND_VENUSMNGR_GET_SYS_STATUS
, "VENUSMNGR_GET_SYS_STATUS" },
661 { SOLAREDGE_COMMAND_VENUSMNGR_GET_TELEM
, "VENUSMNGR_GET_TELEM" },
662 { SOLAREDGE_COMMAND_VENUSMNGR_RX_TEST_INIT
, "VENUSMNGR_RX_TEST_INIT" },
663 { SOLAREDGE_COMMAND_VENUSMNGR_RX_TEST
, "VENUSMNGR_RX_TEST" },
664 { SOLAREDGE_COMMAND_VENUSMNGR_TX_TEST_START
, "VENUSMNGR_TX_TEST_START" },
665 { SOLAREDGE_COMMAND_VENUSMNGR_TX_TEST_STOP
, "VENUSMNGR_TX_TEST_STOP" },
666 { SOLAREDGE_COMMAND_VENUSMNGR_SET_TX_ENABLE
, "VENUSMNGR_SET_TX_ENABLE" },
667 { SOLAREDGE_COMMAND_VENUSMNGR_ENABLE_ISE_WD
, "VENUSMNGR_ENABLE_ISE_WD" },
668 { SOLAREDGE_COMMAND_VENUSMNGR_DISABLE_ISE_WD
, "VENUSMNGR_DISABLE_ISE_WD" },
669 { SOLAREDGE_COMMAND_VENUSMNGR_GET_COUNTRY_CODE
, "VENUSMNGR_GET_COUNTRY_CODE" },
670 { SOLAREDGE_COMMAND_VENUSMNGR_SET_COUNTRY
, "VENUSMNGR_SET_COUNTRY" },
671 { SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_MODE
, "VENUSMNGR_PRIVILEGED_MODE" },
672 { SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_SET_PARAM
, "VENUSMNGR_PRIVILEGED_SET_PARAM" },
673 { SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_GET_EVENT
, "VENUSMNGR_PRIVILEGED_GET_EVENT" },
674 { SOLAREDGE_COMMAND_VENUSMNGR_PRIVILEGED_GET_STATUS
, "VENUSMNGR_PRIVILEGED_GET_STATUS" },
675 { SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_START
, "VENUSMNGR_CURRENT_MODEM_START" },
676 { SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_SEND
, "VENUSMNGR_CURRENT_MODEM_SEND" },
677 { SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_SEND_PAIRING
, "VENUSMNGR_CURRENT_MODEM_SEND_PAIRING" },
678 { SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_GET_STATUS
, "VENUSMNGR_CURRENT_MODEM_GET_STATUS" },
679 { SOLAREDGE_COMMAND_VENUSMNGR_KA_DATA_SEND
, "VENUSMNGR_KA_DATA_SEND" },
680 { SOLAREDGE_COMMAND_VENUSMNGR_CURRENT_MODEM_END_PAIRING
, "VENUSMNGR_CURRENT_MODEM_END_PAIRING" },
681 { SOLAREDGE_COMMAND_VENUSMNGR_FORCE_GRID_MON
, "VENUSMNGR_FORCE_GRID_MON" },
682 { SOLAREDGE_COMMAND_VENUSMNGR_FORCE_SKIP_GRID_MON
, "VENUSMNGR_FORCE_SKIP_GRID_MON" },
683 { SOLAREDGE_COMMAND_VENUSMNGR_START_SUPERVISE
, "VENUSMNGR_START_SUPERVISE" },
684 { SOLAREDGE_COMMAND_VENUSMNGR_READ_A2D_MEAS
, "VENUSMNGR_READ_A2D_MEAS" },
685 { SOLAREDGE_COMMAND_VENUSMNGR_GET_COUNTRY_DEFAULTS
, "VENUSMNGR_GET_COUNTRY_DEFAULTS" },
686 { SOLAREDGE_COMMAND_VENUSMNGR_SET_PRODUCT_MODEL
, "VENUSMNGR_SET_PRODUCT_MODEL" },
687 { SOLAREDGE_COMMAND_VENUSMNGR_GET_PRODUCT_MODEL
, "VENUSMNGR_GET_PRODUCT_MODEL" },
688 { SOLAREDGE_COMMAND_VENUSMNGR_SET_DYNAMIC_INVPWR_PARAM
, "VENUSMNGR_SET_DYNAMIC_INVPWR_PARAM" },
689 { SOLAREDGE_COMMAND_INVERTER_ENTER_BURN_INVPWR_MODE
, "INVERTER_ENTER_BURN_INVPWR_MODE" },
690 { SOLAREDGE_COMMAND_VENUSMNGR_MPPT_TRAVEL
, "VENUSMNGR_MPPT_TRAVEL" },
691 { SOLAREDGE_COMMAND_VENUSMNGR_SET_PWR_PARAM
, "VENUSMNGR_SET_PWR_PARAM" },
692 { SOLAREDGE_COMMAND_INVERTER_CURRENT_MODEM_SET_DATA_BIT
, "INVERTER_CURRENT_MODEM_SET_DATA_BIT" },
693 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_ISE_MEAS1
, "RESP_VENUSMNGR_READ_ISE_MEAS1" },
694 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_ISE_MEAS2
, "RESP_VENUSMNGR_READ_ISE_MEAS2" },
695 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_SE_MEAS
, "RESP_VENUSMNGR_READ_SE_MEAS" },
696 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_SYS_STATUS
, "RESP_VENUSMNGR_GET_SYS_STATUS" },
697 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_TELEM
, "RESP_VENUSMNGR_GET_TELEM" },
698 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_RX_TEST
, "RESP_VENUSMNGR_RX_TEST" },
699 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_COUNTRY_CODE
, "RESP_VENUSMNGR_GET_COUNTRY_CODE" },
700 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_PRIVILEGED_GET_EVENT
, "RESP_VENUSMNGR_PRIVILEGED_GET_EVENT" },
701 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_PRIVILEGED_GET_STATUS
, "RESP_VENUSMNGR_PRIVILEGED_GET_STATUS" },
702 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_CURRENT_MODEM_GET_STATUS
, "RESP_VENUSMNGR_CURRENT_MODEM_GET_STATUS" },
703 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_READ_A2D_MEAS
, "RESP_VENUSMNGR_READ_A2D_MEAS" },
704 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_COUNTRY_DEFAULTS
, "RESP_VENUSMNGR_GET_COUNTRY_DEFAULTS" },
705 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_GET_PRODUCT_MODEL
, "RESP_VENUSMNGR_GET_PRODUCT_MODEL" },
706 { SOLAREDGE_COMMAND_RESP_VENUSMNGR_SET_DYNAMIC_ISE_PARAM
, "RESP_VENUSMNGR_SET_DYNAMIC_ISE_PARAM" },
707 { SOLAREDGE_COMMAND_POLESTAR_TELEMS_START
, "POLESTAR_TELEMS_START" },
708 { SOLAREDGE_COMMAND_POLESTAR_TELEMS_STOP
, "POLESTAR_TELEMS_STOP" },
709 { SOLAREDGE_COMMAND_POLESTAR_MASTER_GRANT
, "POLESTAR_MASTER_GRANT" },
710 { SOLAREDGE_COMMAND_POLESTAR_RTC_SET
, "POLESTAR_RTC_SET" },
711 { SOLAREDGE_COMMAND_POLESTAR_TEST_RAM
, "POLESTAR_TEST_RAM" },
712 { SOLAREDGE_COMMAND_POLESTAR_TEST_FLASH
, "POLESTAR_TEST_FLASH" },
713 { SOLAREDGE_COMMAND_POLESTAR_MAC_ADDR_GET
, "POLESTAR_MAC_ADDR_GET" },
714 { SOLAREDGE_COMMAND_POLESTAR_IP_ADDR_GET
, "POLESTAR_IP_ADDR_GET" },
715 { SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_INIT
, "POLESTAR_SLAVE_ID_DETECT_INIT" },
716 { SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_GET_ID
, "POLESTAR_SLAVE_ID_DETECT_GET_ID" },
717 { SOLAREDGE_COMMAND_POLESTAR_SLAVE_ID_DETECT_STOP
, "POLESTAR_SLAVE_ID_DETECT_STOP" },
718 { SOLAREDGE_COMMAND_POLESTAR_UART_ZB_BRIDGE
, "POLESTAR_UART_ZB_BRIDGE" },
719 { SOLAREDGE_COMMAND_POLESTAR_SEND_PING
, "POLESTAR_SEND_PING" },
720 { SOLAREDGE_COMMAND_POLESTAR_LCD_TEST_MODE
, "POLESTAR_LCD_TEST_MODE" },
721 { SOLAREDGE_COMMAND_POLESTAR_CONFTOOL_START
, "POLESTAR_CONFTOOL_START" },
722 { SOLAREDGE_COMMAND_POLESTAR_ETHERNET_STAT
, "POLESTAR_ETHERNET_STAT" },
723 { SOLAREDGE_COMMAND_POLESTAR_GET_FIFO_FLASH_INFO
, "POLESTAR_GET_FIFO_FLASH_INFO" },
724 { SOLAREDGE_COMMAND_POLESTAR_RESET_FIFO_FLASH
, "POLESTAR_RESET_FIFO_FLASH" },
725 { SOLAREDGE_COMMAND_POLESTAR_RESET_FLASH
, "POLESTAR_RESET_FLASH" },
726 { SOLAREDGE_COMMAND_POLESTAR_RS485_MSTR_SLV_DET_START
, "POLESTAR_RS485_MSTR_SLV_DET_START" },
727 { SOLAREDGE_COMMAND_POLESTAR_RS485_MSTR_SLV_DET_STATUS
, "POLESTAR_RS485_MSTR_SLV_DET_STATUS" },
728 { SOLAREDGE_COMMAND_POLESTAR_UART_ZB_SET
, "POLESTAR_UART_ZB_SET" },
729 { SOLAREDGE_COMMAND_POLESTAR_TCP_TEST
, "POLESTAR_TCP_TEST" },
730 { SOLAREDGE_COMMAND_POLESTAR_TIMER_ADVANCE
, "POLESTAR_TIMER_ADVANCE" },
731 { SOLAREDGE_COMMAND_POLESTAR_ERASE_FLASH_FIFO_FAST
, "POLESTAR_ERASE_FLASH_FIFO_FAST" },
732 { SOLAREDGE_COMMAND_POLESTAR_SELF_KA
, "POLESTAR_SELF_KA" },
733 { SOLAREDGE_COMMAND_POLESTAR_ISE_BRIDGE
, "POLESTAR_ISE_BRIDGE" },
734 { SOLAREDGE_COMMAND_POLESTAR_ERASE_STATISTICS
, "POLESTAR_ERASE_STATISTICS" },
735 { SOLAREDGE_COMMAND_POLESTAR_GET_POK_STATUS
, "POLESTAR_GET_POK_STATUS" },
736 { SOLAREDGE_COMMAND_POLESTAR_INVERTER_HW_RESET
, "POLESTAR_INVERTER_HW_RESET" },
737 { SOLAREDGE_COMMAND_POLESTAR_ZB_PRESENT_STATUS
, "POLESTAR_ZB_PRESENT_STATUS" },
738 { SOLAREDGE_COMMAND_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES
, "POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES" },
739 { SOLAREDGE_COMMAND_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES
, "POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES" },
740 { SOLAREDGE_COMMAND_POLESTAR_GET_S_OK_STATUS
, "POLESTAR_GET_S_OK_STATUS" },
741 { SOLAREDGE_COMMAND_POLESTAR_GET_ENERGY_STATISTICS_STATUS
, "POLESTAR_GET_ENERGY_STATISTICS_STATUS" },
742 { SOLAREDGE_COMMAND_POLESTAR_GET_GSM_PRESENT_STATUS
, "POLESTAR_GET_GSM_PRESENT_STATUS" },
743 { SOLAREDGE_COMMAND_POLESTAR_SET_STATISTICS_ELEMENT
, "POLESTAR_SET_STATISTICS_ELEMENT" },
744 { SOLAREDGE_COMMAND_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_START
, "POLESTAR_GEMINI_RS485_MSTR_SLV_DET_START" },
745 { SOLAREDGE_COMMAND_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS
, "POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS" },
746 { SOLAREDGE_COMMAND_POLESTAR_GET_GEMINI_GFD_STATUS
, "POLESTAR_GET_GEMINI_GFD_STATUS" },
747 { SOLAREDGE_COMMAND_POLESTAR_GET_ERROR_LOG
, "POLESTAR_GET_ERROR_LOG" },
748 { SOLAREDGE_COMMAND_POLESTAR_BLOCK_SERVER_CONTROL
, "POLESTAR_BLOCK_SERVER_CONTROL" },
749 { SOLAREDGE_COMMAND_POLESTAR_GET_SERVER_CONTROL_STATUS
, "POLESTAR_GET_SERVER_CONTROL_STATUS" },
750 { SOLAREDGE_COMMAND_POLESTAR_TEST_SD_FLASH
, "POLESTAR_TEST_SD_FLASH" },
751 { SOLAREDGE_COMMAND_POLESTAR_GET_WARNING_LOG
, "POLESTAR_GET_WARNING_LOG" },
752 { SOLAREDGE_COMMAND_POLESTAR_RESET_MODBUS_DEVICE_DATA
, "POLESTAR_RESET_MODBUS_DEVICE_DATA" },
753 { SOLAREDGE_COMMAND_POLESTAR_TURN_OFF_INTERNAL_SRAM_BATTERY_BACKUP
, "POLESTAR_TURN_OFF_INTERNAL_SRAM_BATTERY_BACKUP" },
754 { SOLAREDGE_COMMAND_POLESTAR_WRITE_LCD
, "POLESTAR_WRITE_LCD" },
755 { SOLAREDGE_COMMAND_POLESTAR_READ_LAST_BUTTONS
, "POLESTAR_READ_LAST_BUTTONS" },
756 { SOLAREDGE_COMMAND_POLESTAR_GET_STATISTICS_ELEMENT
, "POLESTAR_GET_STATISTICS_ELEMENT" },
757 { SOLAREDGE_COMMAND_POLESTAR_SEND_POWER_REDUCER_SLAVE_PACKET
, "POLESTAR_SEND_POWER_REDUCER_SLAVE_PACKET" },
758 { SOLAREDGE_COMMAND_POLESTAR_SEND_POWER_REDUCER_MASTER_PACKET
, "POLESTAR_SEND_POWER_REDUCER_MASTER_PACKET" },
759 { SOLAREDGE_COMMAND_POLESTAR_GET_WIFI_PRESENT_STATUS
, "POLESTAR_GET_WIFI_PRESENT_STATUS" },
760 { SOLAREDGE_COMMAND_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA
, "POLESTAR_GET_PORT_EXPANDER_GPIO_DATA" },
761 { SOLAREDGE_COMMAND_POLESTAR_SET_PORT_EXPANDER_GPIO_DATA
, "POLESTAR_SET_PORT_EXPANDER_GPIO_DATA" },
762 { SOLAREDGE_COMMAND_POLESTAR_READ_LCD
, "POLESTAR_READ_LCD" },
763 { SOLAREDGE_COMMAND_POLESTAR_SIMULATE_BUTTON_PRESSING
, "POLESTAR_SIMULATE_BUTTON_PRESSING" },
764 { SOLAREDGE_COMMAND_POLESTAR_INV_ACTIVATE
, "POLESTAR_INV_ACTIVATE" },
765 { SOLAREDGE_COMMAND_POLESTAR_MODBUS_SLAVE_PACKET
, "POLESTAR_MODBUS_SLAVE_PACKET" },
766 { SOLAREDGE_COMMAND_POLESTAR_GET_BUTTON_STATE
, "POLESTAR_GET_BUTTON_STATE" },
767 { SOLAREDGE_COMMAND_POLESTAR_GET_A2D_VALS
, "POLESTAR_GET_A2D_VALS" },
768 { SOLAREDGE_COMMAND_POLESTAR_GET_OPMODE
, "POLESTAR_GET_OPMODE" },
769 { SOLAREDGE_COMMAND_POLESTAR_SET_BACKLIGHT
, "POLESTAR_SET_BACKLIGHT" },
770 { SOLAREDGE_COMMAND_POLESTAR_READ_FIFO_PAGE
, "POLESTAR_READ_FIFO_PAGE" },
771 { SOLAREDGE_COMMAND_POLESTAR_GET_CURRENT_SCREEN_INDEX
, "POLESTAR_GET_CURRENT_SCREEN_INDEX" },
772 { SOLAREDGE_COMMAND_POLESTAR_GET_IDENTITY
, "POLESTAR_GET_IDENTITY" },
773 { SOLAREDGE_COMMAND_POLESTAR_GET_SUPPORTED_COMMANDS
, "POLESTAR_GET_SUPPORTED_COMMANDS" },
774 { SOLAREDGE_COMMAND_POLESTAR_PAIRING_START
, "POLESTAR_PAIRING_START" },
775 { SOLAREDGE_COMMAND_POLESTAR_PAIRING_STATUS
, "POLESTAR_PAIRING_STATUS" },
776 { SOLAREDGE_COMMAND_POLESTAR_PRODUCT_RESET
, "POLESTAR_PRODUCT_RESET" },
777 { SOLAREDGE_COMMAND_POLESTAR_PLC_CMD_EXECUTE
, "POLESTAR_PLC_CMD_EXECUTE" },
778 { SOLAREDGE_COMMAND_POLESTAR_GET_STATUS
, "POLESTAR_GET_STATUS" },
779 { SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_LOCK_MASTER
, "POLESTAR_FIRE_SAFETY_LOCK_MASTER" },
780 { SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_LOCK_SLAVE
, "POLESTAR_FIRE_SAFETY_LOCK_SLAVE" },
781 { SOLAREDGE_COMMAND_POLESTAR_FIRE_SAFETY_REPORT
, "POLESTAR_FIRE_SAFETY_REPORT" },
782 { SOLAREDGE_COMMAND_POLESTAR_UART_BRIDGE_INIT
, "POLESTAR_UART_BRIDGE_INIT" },
783 { SOLAREDGE_COMMAND_POLESTAR_SEND_UART_DATA
, "POLESTAR_SEND_UART_DATA" },
784 { SOLAREDGE_COMMAND_POLESTAR_LED_TEST
, "POLESTAR_LED_TEST" },
785 { SOLAREDGE_COMMAND_POLESTAR_SEND_FAKE_TELEMS
, "POLESTAR_SEND_FAKE_TELEMS" },
786 { SOLAREDGE_COMMAND_RESP_POLESTAR_RTC_SET
, "RESP_POLESTAR_RTC_SET" },
787 { SOLAREDGE_COMMAND_RESP_POLESTAR_MAC_ADDR_GET
, "RESP_POLESTAR_MAC_ADDR_GET" },
788 { SOLAREDGE_COMMAND_RESP_POLESTAR_IP_ADDR_GET
, "RESP_POLESTAR_IP_ADDR_GET" },
789 { SOLAREDGE_COMMAND_RESP_POLESTAR_SEND_PING
, "RESP_POLESTAR_SEND_PING" },
790 { SOLAREDGE_COMMAND_RESP_POLESTAR_ETHERNET_STAT
, "RESP_POLESTAR_ETHERNET_STAT" },
791 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_FIFO_FLASH_INFO
, "RESP_POLESTAR_GET_FIFO_FLASH_INFO" },
792 { SOLAREDGE_COMMAND_RESP_POLESTAR_RS485_MSTR_SLV_DET_STATUS
, "RESP_POLESTAR_RS485_MSTR_SLV_DET_STATUS" },
793 { SOLAREDGE_COMMAND_RESP_POLESTAR_TCP_TEST_RESP
, "RESP_POLESTAR_TCP_TEST_RESP" },
794 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_POK_STATUS
, "RESP_POLESTAR_GET_POK_STATUS" },
795 { SOLAREDGE_COMMAND_RESP_POLESTAR_INVERTER_HW_RESET
, "RESP_POLESTAR_INVERTER_HW_RESET" },
796 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES
, "RESP_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES" },
797 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES
, "RESP_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES" },
798 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_S_OK_STATUS
, "RESP_POLESTAR_GET_S_OK_STATUS" },
799 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ENERGY_STATISTICS_STATUS
, "RESP_POLESTAR_GET_ENERGY_STATISTICS_STATUS" },
800 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_GSM_PRESENT_STATUS
, "RESP_POLESTAR_GET_GSM_PRESENT_STATUS" },
801 { SOLAREDGE_COMMAND_RESP_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS
, "RESP_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS" },
802 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_GEMINI_GFD_STATUS
, "RESP_POLESTAR_GET_GEMINI_GFD_STATUS" },
803 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_ERROR_LOG
, "RESP_POLESTAR_GET_ERROR_LOG" },
804 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_SERVER_CONTROL_STATUS
, "RESP_POLESTAR_GET_SERVER_CONTROL_STATUS" },
805 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_WARNING_LOG
, "RESP_POLESTAR_GET_WARNING_LOG" },
806 { SOLAREDGE_COMMAND_RESP_POLESTAR_READ_LAST_BUTTONS
, "RESP_POLESTAR_READ_LAST_BUTTONS" },
807 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_STATISTICS_ELEMENT
, "RESP_POLESTAR_GET_STATISTICS_ELEMENT" },
808 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_WIFI_PRESENT_STATUS
, "RESP_POLESTAR_GET_WIFI_PRESENT_STATUS" },
809 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA
, "RESP_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA" },
810 { SOLAREDGE_COMMAND_RESP_POLESTAR_READ_LCD
, "RESP_POLESTAR_READ_LCD" },
811 { SOLAREDGE_COMMAND_RESP_POLESTAR_MODBUS_SLAVE_PACKET
, "RESP_POLESTAR_MODBUS_SLAVE_PACKET" },
812 { SOLAREDGE_COMMAND_RESP_POLESTAR_MASTER_GRANT_ACK
, "RESP_POLESTAR_MASTER_GRANT_ACK" },
813 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_IDENTITY
, "RESP_POLESTAR_GET_IDENTITY" },
814 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_SUPPORTED_COMMANDS
, "RESP_POLESTAR_GET_SUPPORTED_COMMANDS" },
815 { SOLAREDGE_COMMAND_RESP_POLESTAR_PAIRING_START
, "RESP_POLESTAR_PAIRING_START" },
816 { SOLAREDGE_COMMAND_RESP_POLESTAR_PAIRING_STATUS
, "RESP_POLESTAR_PAIRING_STATUS" },
817 { SOLAREDGE_COMMAND_RESP_POLESTAR_GET_STATUS
, "RESP_POLESTAR_GET_STATUS" },
818 { SOLAREDGE_COMMAND_RESP_POLESTAR_FIRE_SAFETY_REPORT
, "RESP_POLESTAR_FIRE_SAFETY_REPORT" },
819 { SOLAREDGE_COMMAND_RESP_POLESTAR_SEND_UART_DATA
, "RESP_POLESTAR_SEND_UART_DATA" },
820 { SOLAREDGE_COMMAND_SUNTRACER_READ_FLASH
, "SUNTRACER_READ_FLASH" },
821 { SOLAREDGE_COMMAND_SUNTRACER_START
, "SUNTRACER_START" },
822 { SOLAREDGE_COMMAND_SUNTRACER_SET_RTC
, "SUNTRACER_SET_RTC" },
823 { SOLAREDGE_COMMAND_SUNTRACER_DEL_FLASH
, "SUNTRACER_DEL_FLASH" },
824 { SOLAREDGE_COMMAND_SUNTRACER_DEL_FLASH_SECTOR
, "SUNTRACER_DEL_FLASH_SECTOR" },
825 { SOLAREDGE_COMMAND_RESP_SUNTRACER_TRACE
, "RESP_SUNTRACER_TRACE" },
826 { SOLAREDGE_COMMAND_RESP_SUNTRACER_FLASH
, "RESP_SUNTRACER_FLASH" },
827 { SOLAREDGE_COMMAND_SERVER_POST_DATA
, "SERVER_POST_DATA" },
828 { SOLAREDGE_COMMAND_SERVER_GET_GMT
, "SERVER_GET_GMT" },
829 { SOLAREDGE_COMMAND_SERVER_GET_NAME
, "SERVER_GET_NAME" },
830 { SOLAREDGE_COMMAND_SERVER_SET_KEY
, "SERVER_SET_KEY" },
831 { SOLAREDGE_COMMAND_RESP_SERVER_GMT
, "RESP_SERVER_GMT" },
832 { SOLAREDGE_COMMAND_RESP_SERVER_NAME
, "RESP_SERVER_NAME" },
833 { SOLAREDGE_COMMAND_RESP_CONFTOOL_PLC_DATA
, "RESP_CONFTOOL_PLC_DATA" },
834 { SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS1
, "JUPMNGR_READ_JUPPWR_MEAS1" },
835 { SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS2
, "JUPMNGR_READ_JUPPWR_MEAS2" },
836 { SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS3
, "JUPMNGR_READ_JUPPWR_MEAS3" },
837 { SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS4
, "JUPMNGR_READ_JUPPWR_MEAS4" },
838 { SOLAREDGE_COMMAND_JUPMNGR_READ_JUPPWR_MEAS5
, "JUPMNGR_READ_JUPPWR_MEAS5" },
839 { SOLAREDGE_COMMAND_JUPMNGR_READ_MEAS
, "JUPMNGR_READ_MEAS" },
840 { SOLAREDGE_COMMAND_JUPMNGR_GET_SYS_STATUS
, "JUPMNGR_GET_SYS_STATUS" },
841 { SOLAREDGE_COMMAND_JUPMNGR_GET_TELEM
, "JUPMNGR_GET_TELEM" },
842 { SOLAREDGE_COMMAND_JUPMNGR_GET_COUNTRY_CODE
, "JUPMNGR_GET_COUNTRY_CODE" },
843 { SOLAREDGE_COMMAND_JUPMNGR_SET_COUNTRY
, "JUPMNGR_SET_COUNTRY" },
844 { SOLAREDGE_COMMAND_JUPMNGR_GET_COUNTRY_DEFAULTS
, "JUPMNGR_GET_COUNTRY_DEFAULTS" },
845 { SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_MODE
, "JUPMNGR_PRIVILEGED_MODE" },
846 { SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_SET_PARAM
, "JUPMNGR_PRIVILEGED_SET_PARAM" },
847 { SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_GET_EVENT
, "JUPMNGR_PRIVILEGED_GET_EVENT" },
848 { SOLAREDGE_COMMAND_JUPMNGR_PRIVILEGED_GET_STATUS
, "JUPMNGR_PRIVILEGED_GET_STATUS" },
849 { SOLAREDGE_COMMAND_JUPMNGR_SET_PRODUCT_MODEL
, "JUPMNGR_SET_PRODUCT_MODEL" },
850 { SOLAREDGE_COMMAND_JUPMNGR_GET_PRODUCT_MODEL
, "JUPMNGR_GET_PRODUCT_MODEL" },
851 { SOLAREDGE_COMMAND_JUPMNGR_DYNAMIC_SET_INVPWR_PARAM
, "JUPMNGR_DYNAMIC_SET_INVPWR_PARAM" },
852 { SOLAREDGE_COMMAND_JUPMNGR_GET_INVPWR_PARAM_TYPE
, "JUPMNGR_GET_INVPWR_PARAM_TYPE" },
853 { SOLAREDGE_COMMAND_JUPMNGR_GET_FANS_STATUS
, "JUPMNGR_GET_FANS_STATUS" },
854 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS1
, "RESP_JUPMNGR_READ_JUPPWR_MEAS1" },
855 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS2
, "RESP_JUPMNGR_READ_JUPPWR_MEAS2" },
856 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS3
, "RESP_JUPMNGR_READ_JUPPWR_MEAS3" },
857 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS4
, "RESP_JUPMNGR_READ_JUPPWR_MEAS4" },
858 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_JUPPWR_MEAS5
, "RESP_JUPMNGR_READ_JUPPWR_MEAS5" },
859 { SOLAREDGE_COMMAND_RESP_JUPMNGR_READ_MEAS
, "RESP_JUPMNGR_READ_MEAS" },
860 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_SYS_STATUS
, "RESP_JUPMNGR_GET_SYS_STATUS" },
861 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_TELEM
, "RESP_JUPMNGR_GET_TELEM" },
862 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_COUNTRY_CODE
, "RESP_JUPMNGR_GET_COUNTRY_CODE" },
863 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_COUNTRY_DEFAULTS
, "RESP_JUPMNGR_GET_COUNTRY_DEFAULTS" },
864 { SOLAREDGE_COMMAND_RESP_JUPMNGR_PRIVILEGED_GET_EVENT
, "RESP_JUPMNGR_PRIVILEGED_GET_EVENT" },
865 { SOLAREDGE_COMMAND_RESP_JUPMNGR_PRIVILEGED_GET_STATUS
, "RESP_JUPMNGR_PRIVILEGED_GET_STATUS" },
866 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_PRODUCT_MODEL
, "RESP_JUPMNGR_GET_PRODUCT_MODEL" },
867 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_INVPWR_PARAM_TYPE
, "RESP_JUPMNGR_GET_INVPWR_PARAM_TYPE" },
868 { SOLAREDGE_COMMAND_RESP_JUPMNGR_GET_FANS_STATUS
, "RESP_JUPMNGR_GET_FANS_STATUS" },
869 { SOLAREDGE_COMMAND_INVERTER_TURN_15V_ON
, "INVERTER_TURN_15V_ON" },
870 { SOLAREDGE_COMMAND_INVERTER_TURN_15V_OFF
, "INVERTER_TURN_15V_OFF" },
871 { SOLAREDGE_COMMAND_INVERTER_ENABLE_RELAYS
, "INVERTER_ENABLE_RELAYS" },
872 { SOLAREDGE_COMMAND_INVERTER_DISABLE_RELAYS
, "INVERTER_DISABLE_RELAYS" },
873 { SOLAREDGE_COMMAND_INVERTER_DYNAMIC_POWER_LIMIT
, "INVERTER_DYNAMIC_POWER_LIMIT" },
874 { SOLAREDGE_COMMAND_INVERTER_IVTRACE_START
, "INVERTER_IVTRACE_START" },
875 { SOLAREDGE_COMMAND_INVERTER_GRID_TRIP_TEST
, "INVERTER_GRID_TRIP_TEST" },
876 { SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS1
, "INVERTER_SET_LMVGC_PARAMS1" },
877 { SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS1
, "INVERTER_GET_LMVGC_PARAMS1" },
878 { SOLAREDGE_COMMAND_INVERTER_SET_PWR_GAIN_PARAMS
, "INVERTER_SET_PWR_GAIN_PARAMS" },
879 { SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS2
, "INVERTER_SET_LMVGC_PARAMS2" },
880 { SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS2
, "INVERTER_GET_LMVGC_PARAMS2" },
881 { SOLAREDGE_COMMAND_INVERTER_SET_LMVGC_PARAMS3
, "INVERTER_SET_LMVGC_PARAMS3" },
882 { SOLAREDGE_COMMAND_INVERTER_GET_LMVGC_PARAMS3
, "INVERTER_GET_LMVGC_PARAMS3" },
883 { SOLAREDGE_COMMAND_INVERTER_LOCK_IN
, "INVERTER_LOCK_IN" },
884 { SOLAREDGE_COMMAND_INVERTER_LOCK_OUT
, "INVERTER_LOCK_OUT" },
885 { SOLAREDGE_COMMAND_INVERTER_GET_VDC
, "INVERTER_GET_VDC" },
886 { SOLAREDGE_COMMAND_INVERTER_PAIRING_DO_NOTHING
, "INVERTER_PAIRING_DO_NOTHING" },
887 { SOLAREDGE_COMMAND_INVERTER_PAIRING_DO_SAFETY
, "INVERTER_PAIRING_DO_SAFETY" },
888 { SOLAREDGE_COMMAND_RESP_INVERTER_DYNAMIC_POWER_LIMIT
, "RESP_INVERTER_DYNAMIC_POWER_LIMIT" },
889 { SOLAREDGE_COMMAND_RESP_INVERTER_GET_LMVGC_PARAMS
, "RESP_INVERTER_GET_LMVGC_PARAMS" },
890 { SOLAREDGE_COMMAND_VEGA_READ_MEAS
, "VEGA_READ_MEAS" },
891 { SOLAREDGE_COMMAND_VEGA_GET_SYS_STATUS
, "VEGA_GET_SYS_STATUS" },
892 { SOLAREDGE_COMMAND_VEGA_GET_TELEM
, "VEGA_GET_TELEM" },
893 { SOLAREDGE_COMMAND_VEGA_GET_MAX_VDC_VALUE
, "VEGA_GET_MAX_VDC_VALUE" },
894 { SOLAREDGE_COMMAND_VEGA_SET_MAX_VDC_VALUE
, "VEGA_SET_MAX_VDC_VALUE" },
895 { SOLAREDGE_COMMAND_VEGA_RELAY_SET
, "VEGA_RELAY_SET" },
896 { SOLAREDGE_COMMAND_VEGA_SET_OPMODE
, "VEGA_SET_OPMODE" },
897 { SOLAREDGE_COMMAND_VEGA_GET_OPMODE
, "VEGA_GET_OPMODE" },
898 { SOLAREDGE_COMMAND_VEGA_SET_RANGE
, "VEGA_SET_RANGE" },
899 { SOLAREDGE_COMMAND_RESP_VEGA_READ_MEAS
, "RESP_VEGA_READ_MEAS" },
900 { SOLAREDGE_COMMAND_RESP_VEGA_GET_SYS_STATUS
, "RESP_VEGA_GET_SYS_STATUS" },
901 { SOLAREDGE_COMMAND_RESP_VEGA_GET_TELEM
, "RESP_VEGA_GET_TELEM" },
902 { SOLAREDGE_COMMAND_RESP_VEGA_GET_MAX_VDC_VALUE
, "RESP_VEGA_GET_MAX_VDC_VALUE" },
903 { SOLAREDGE_COMMAND_COMBI_PAUSE_MONITORING
, "COMBI_PAUSE_MONITORING" },
904 { SOLAREDGE_COMMAND_COMBI_SET_TIME_STAMP
, "COMBI_SET_TIME_STAMP" },
905 { SOLAREDGE_COMMAND_COMBI_RCD_CALIBRATION
, "COMBI_RCD_CALIBRATION" },
906 { SOLAREDGE_COMMAND_COMBI_GET_TELEM
, "COMBI_GET_TELEM" },
907 { SOLAREDGE_COMMAND_COMBI_FORCE_TELEM
, "COMBI_FORCE_TELEM" },
908 { SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT
, "COMBI_SWITCHES_CONNECT" },
909 { SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT
, "COMBI_SWITCHES_DISCONNECT" },
910 { SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT_ALL
, "COMBI_SWITCHES_CONNECT_ALL" },
911 { SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT_ALL
, "COMBI_SWITCHES_DISCONNECT_ALL" },
912 { SOLAREDGE_COMMAND_COMBI_RCD_TEST_EXECUTE
, "COMBI_RCD_TEST_EXECUTE" },
913 { SOLAREDGE_COMMAND_COMBI_RELAYS_TEST_EXECUTE
, "COMBI_RELAYS_TEST_EXECUTE" },
914 { SOLAREDGE_COMMAND_COMBI_GET_COMBISTRING_PARAM
, "COMBI_GET_COMBISTRING_PARAM" },
915 { SOLAREDGE_COMMAND_COMBI_SET_COMBISTRING_PARAM
, "COMBI_SET_COMBISTRING_PARAM" },
916 { SOLAREDGE_COMMAND_COMBI_GET_ALL_COMBISTRING_PARAMS
, "COMBI_GET_ALL_COMBISTRING_PARAMS" },
917 { SOLAREDGE_COMMAND_COMBI_GET_ALL_COMBI_PARAMS
, "COMBI_GET_ALL_COMBI_PARAMS" },
918 { SOLAREDGE_COMMAND_COMBI_READ_MEASUREMENTS
, "COMBI_READ_MEASUREMENTS" },
919 { SOLAREDGE_COMMAND_COMBI_GET_STRING_STATUS
, "COMBI_GET_STRING_STATUS" },
920 { SOLAREDGE_COMMAND_COMBI_GET_COMBI_STATUS
, "COMBI_GET_COMBI_STATUS" },
921 { SOLAREDGE_COMMAND_COMBI_GET_ACTIVE_STRINGS
, "COMBI_GET_ACTIVE_STRINGS" },
922 { SOLAREDGE_COMMAND_COMBI_FWD_STRING_TELEM
, "COMBI_FWD_STRING_TELEM" },
923 { SOLAREDGE_COMMAND_COMBI_FWD_COMBI_TELEM
, "COMBI_FWD_COMBI_TELEM" },
924 { SOLAREDGE_COMMAND_COMBI_GET_UNIFIED_STRING_STATUS
, "COMBI_GET_UNIFIED_STRING_STATUS" },
925 { SOLAREDGE_COMMAND_COMBI_GET_UNIFIED_COMBI_STATUS
, "COMBI_GET_UNIFIED_COMBI_STATUS" },
926 { SOLAREDGE_COMMAND_COMBI_CHECK_INNER_PROTOCOL
, "COMBI_CHECK_INNER_PROTOCOL" },
927 { SOLAREDGE_COMMAND_COMBI_SWITCHES_CONNECT_RELAY
, "COMBI_SWITCHES_CONNECT_RELAY" },
928 { SOLAREDGE_COMMAND_COMBI_SWITCHES_DISCONNECT_RELAY
, "COMBI_SWITCHES_DISCONNECT_RELAY" },
929 { SOLAREDGE_COMMAND_COMBI_GET_GEMINI_STRING_IDS
, "COMBI_GET_GEMINI_STRING_IDS" },
930 { SOLAREDGE_COMMAND_COMBI_GET_ALL_SWITCHES_STATUS
, "COMBI_GET_ALL_SWITCHES_STATUS" },
931 { SOLAREDGE_COMMAND_COMBI_SET_RCD_TEST_PIN
, "COMBI_SET_RCD_TEST_PIN" },
932 { SOLAREDGE_COMMAND_COMBI_RELAYS_TEST_CHECK_CONDS
, "COMBI_RELAYS_TEST_CHECK_CONDS" },
933 { SOLAREDGE_COMMAND_RESP_COMBI_GET_TELEM
, "RESP_COMBI_GET_TELEM" },
934 { SOLAREDGE_COMMAND_RESP_COMBI_GET_STRING_STATUS
, "RESP_COMBI_GET_STRING_STATUS" },
935 { SOLAREDGE_COMMAND_RESP_COMBI_GET_COMBI_STATUS
, "RESP_COMBI_GET_COMBI_STATUS" },
936 { SOLAREDGE_COMMAND_RESP_COMBI_GET_ACTIVE_STRINGS
, "RESP_COMBI_GET_ACTIVE_STRINGS" },
937 { SOLAREDGE_COMMAND_RESP_COMBI_GET_UNIFIED_STRING_STATUS
, "RESP_COMBI_GET_UNIFIED_STRING_STATUS" },
938 { SOLAREDGE_COMMAND_RESP_COMBI_GET_UNIFIED_COMBI_STATUS
, "RESP_COMBI_GET_UNIFIED_COMBI_STATUS" },
939 { SOLAREDGE_COMMAND_RESP_COMBI_GET_GEMINI_STRING_IDS
, "RESP_COMBI_GET_GEMINI_STRING_IDS" },
940 { SOLAREDGE_COMMAND_INVPWR_GET_ERROR_STATUS
, "INVPWR_GET_ERROR_STATUS" },
941 { SOLAREDGE_COMMAND_INVPWR_GET_STATUS
, "INVPWR_GET_STATUS" },
942 { SOLAREDGE_COMMAND_INVPWR_GO
, "INVPWR_GO" },
943 { SOLAREDGE_COMMAND_INVPWR_HALT
, "INVPWR_HALT" },
944 { SOLAREDGE_COMMAND_INVPWR_CONST_DUTY_CYCLE
, "INVPWR_CONST_DUTY_CYCLE" },
945 { SOLAREDGE_COMMAND_INVPWR_DUMY_ERROR
, "INVPWR_DUMY_ERROR" },
946 { SOLAREDGE_COMMAND_INVPWR_PAIRING_SET_STATE
, "INVPWR_PAIRING_SET_STATE" },
947 { SOLAREDGE_COMMAND_INVPWR_TEST_IAC_CONTROL
, "INVPWR_TEST_IAC_CONTROL" },
948 { SOLAREDGE_COMMAND_RESP_INVPWR_GET_ERROR_STATUS
, "RESP_INVPWR_GET_ERROR_STATUS" },
949 { SOLAREDGE_COMMAND_RESP_INVPWR_GET_STATUS
, "RESP_INVPWR_GET_STATUS" },
950 { SOLAREDGE_COMMAND_RESP_INVPWR_GO
, "RESP_INVPWR_GO" },
951 { SOLAREDGE_COMMAND_RESP_INVPWR_HALT
, "RESP_INVPWR_HALT" },
952 { SOLAREDGE_COMMAND_RESP_INVPWR_CONST_DUTY_CYCLE
, "RESP_INVPWR_CONST_DUTY_CYCLE" },
953 { SOLAREDGE_COMMAND_RESP_INVPWR_DUMY_ERROR
, "RESP_INVPWR_DUMY_ERROR" },
954 { SOLAREDGE_COMMAND_BOOTLOADER_SECURE
, "BOOTLOADER_SECURE" },
955 { SOLAREDGE_COMMAND_BOOTLOADER_UNSECURE
, "BOOTLOADER_UNSECURE" },
956 { SOLAREDGE_COMMAND_ACTIVATOR_ACTIVATE
, "ACTIVATOR_ACTIVATE" },
957 { SOLAREDGE_COMMAND_ACTIVATOR_GET_ADC_SAMPLES
, "ACTIVATOR_GET_ADC_SAMPLES" },
958 { SOLAREDGE_COMMAND_ACTIVATOR_SET_VO_RANGE
, "ACTIVATOR_SET_VO_RANGE" },
959 { SOLAREDGE_COMMAND_ACTIVATOR_GET_AVG_SAMPLES
, "ACTIVATOR_GET_AVG_SAMPLES" },
960 { SOLAREDGE_COMMAND_ACTIVATOR_TX_TEST
, "ACTIVATOR_TX_TEST" },
961 { SOLAREDGE_COMMAND_ACTIVATOR_LCD_TEST
, "ACTIVATOR_LCD_TEST" },
962 { SOLAREDGE_COMMAND_ACTIVATOR_BUTTONS_TEST
, "ACTIVATOR_BUTTONS_TEST" },
963 { SOLAREDGE_COMMAND_FANCONTROL_SET_PWM
, "FANCONTROL_SET_PWM" },
964 { SOLAREDGE_COMMAND_FANCONTROL_GET_PWM
, "FANCONTROL_GET_PWM" },
965 { SOLAREDGE_COMMAND_FANCONTROL_GET_ALL_PWM
, "FANCONTROL_GET_ALL_PWM" },
966 { SOLAREDGE_COMMAND_FANCONTROL_SHUT_ALL_PWM
, "FANCONTROL_SHUT_ALL_PWM" },
967 { SOLAREDGE_COMMAND_FANCONTROL_RES
, "FANCONTROL_RES" },
968 { SOLAREDGE_COMMAND_DISPLAY_BOARD_LCD_WRITE
, "DISPLAY_BOARD_LCD_WRITE" },
969 { SOLAREDGE_COMMAND_DISPLAY_BOARD_LED_SET
, "DISPLAY_BOARD_LED_SET" },
973 static const value_string solaredge_data_devicetypes
[] = {
974 { SOLAREDGE_DEVICETYPE_OPTIMIZER
, "Optimizer" },
975 { SOLAREDGE_DEVICETYPE_INVERTER_1PHASE
, "Single phase inverter"},
976 { SOLAREDGE_DEVICETYPE_INVERTER_3PHASE
, "Three phase inverter"},
977 { SOLAREDGE_DEVICETYPE_OPTIMIZER2
, "Optimizer" },
978 { SOLAREDGE_DEVICETYPE_EVENT
, "Wake/sleep event" },
982 static gcry_cipher_hd_t cipher_hd_system
;
983 static const char *global_system_encryption_key
;
986 uint16_t calculate_crc(t_solaredge_packet_header
*header
, const uint8_t *data
, int length
)
988 /* Concatenate in network endianness header items followed by unmodified data */
989 uint16_t crc
= 0x5a5a;
990 uint16_t sequence_number
= g_htons(header
->sequence_number
);
991 uint32_t source_address
= g_htonl(header
->source_address
);
992 uint32_t destination_address
= g_htonl(header
->destination_address
);
993 uint16_t command_type
= g_htons(header
->command_type
);
994 crc
= crc16_plain_update(crc
, (unsigned char *)&sequence_number
, 2);
995 crc
= crc16_plain_update(crc
, (unsigned char *)&source_address
, 4);
996 crc
= crc16_plain_update(crc
, (unsigned char *)&destination_address
, 4);
997 crc
= crc16_plain_update(crc
, (unsigned char *)&command_type
, 2);
998 return crc16_plain_update(crc
, data
, length
);
1002 void solaredge_decrypt(wmem_allocator_t
*scratch
, const uint8_t *in
, int length
, uint8_t *out
, gcry_cipher_hd_t cipher
)
1004 uint8_t rand1
[SOLAREDGE_ENCRYPTION_KEY_LENGTH
];
1005 uint8_t rand2
[SOLAREDGE_ENCRYPTION_KEY_LENGTH
];
1006 int payload_length
= length
- SOLAREDGE_ENCRYPTION_KEY_LENGTH
;
1007 uint8_t *payload
= (uint8_t *) wmem_alloc(scratch
, payload_length
);
1008 uint8_t *intermediate_decrypted_payload
= (uint8_t *) wmem_alloc(scratch
, payload_length
);
1009 int i
= 0, posa
= 0, posb
= 0, posc
= 0;
1010 memcpy(rand2
, in
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1011 memcpy(payload
, in
+ SOLAREDGE_ENCRYPTION_KEY_LENGTH
, payload_length
);
1012 gcry_cipher_encrypt(cipher
, rand1
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
, rand2
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1014 for (posb
= 0; posb
< payload_length
; posb
++) {
1015 intermediate_decrypted_payload
[posb
] = payload
[posb
] ^ rand1
[posa
++];
1018 for (posc
= 15; posc
>= 0; posc
--) {
1019 rand2
[posc
] = (rand2
[posc
] + 1) & 0xFF;
1024 gcry_cipher_encrypt(cipher
, rand1
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
, rand2
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1028 for (i
= 0; i
< payload_length
; i
++) {
1029 out
[i
] = intermediate_decrypted_payload
[i
+ 6] ^ intermediate_decrypted_payload
[2+(i
&3)];
1034 // NOLINTNEXTLINE(misc-no-recursion)
1035 dissect_solaredge_devicedata(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
, int length
)
1038 t_solaredge_device_header device_header
;
1039 proto_item
*post_item
;
1040 proto_tree
*post_tree
;
1041 const uint8_t *optimizer_data
;
1042 float dc_voltage_panel
;
1043 float dc_voltage_optimizer
;
1044 float dc_current_optimizer
;
1045 float energy_day_optimizer
;
1046 float temperature_optimizer
;
1047 uint32_t event_type
;
1049 device_header
.type
= tvb_get_letohs(tvb
, offset
);
1050 device_header
.id
= tvb_get_letohl(tvb
, offset
+ 2);
1051 device_header
.device_length
= tvb_get_letohs(tvb
, offset
+ 6);
1052 post_item
= proto_tree_add_item(tree
, hf_solaredge_post_device_type
, tvb
, offset
, device_header
.device_length
+ SOLAREDGE_POST_HEADER_LENGTH
, ENC_NA
);
1053 post_tree
= proto_item_add_subtree(post_item
, ett_solaredge_packet_post_device
);
1054 proto_tree_add_item(post_tree
, hf_solaredge_post_device_type_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1055 proto_tree_add_item(post_tree
, hf_solaredge_post_device_id_type
, tvb
, offset
+ 2, 4, ENC_LITTLE_ENDIAN
);
1056 proto_tree_add_item(post_tree
, hf_solaredge_post_length_type
, tvb
, offset
+ 6, 2, ENC_LITTLE_ENDIAN
);
1057 current_offset
= offset
+ SOLAREDGE_POST_HEADER_LENGTH
;
1058 col_append_str(pinfo
->cinfo
, COL_INFO
, " ");
1060 increment_dissection_depth(pinfo
);
1061 switch(device_header
.type
) {
1062 case SOLAREDGE_DEVICETYPE_OPTIMIZER
:
1063 col_append_str(pinfo
->cinfo
, COL_INFO
, "Optimizer");
1064 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1065 current_offset
+= 4;
1066 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_inverter_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1067 current_offset
+= 4;
1068 if (global_show_unknown_fields
== true) {
1069 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1071 current_offset
+= 4;
1072 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_uptime_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1073 current_offset
+= 4;
1074 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_dc_voltage_panel_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1075 current_offset
+= 4;
1076 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_dc_voltage_optimzer_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1077 current_offset
+= 4;
1078 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_dc_current_panel_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1079 current_offset
+= 4;
1080 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_energy_day_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1081 current_offset
+= 4;
1082 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_temperature_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1083 current_offset
+= 4;
1085 case SOLAREDGE_DEVICETYPE_INVERTER_1PHASE
:
1086 col_append_str(pinfo
->cinfo
, COL_INFO
, "Single phase inverter");
1087 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1088 current_offset
+= 4;
1089 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_uptime_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1090 current_offset
+= 4;
1091 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_interval_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1092 current_offset
+= 4;
1093 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_temperature_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1094 current_offset
+= 4;
1095 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_energy_day_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1096 current_offset
+= 4;
1097 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_energy_interval_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1098 current_offset
+= 4;
1099 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_ac_voltage_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1100 current_offset
+= 4;
1101 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_ac_current_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1102 current_offset
+= 4;
1103 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_ac_frequency_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1104 current_offset
+= 4;
1105 if (global_show_unknown_fields
== true) {
1106 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1108 current_offset
+= 4;
1109 if (global_show_unknown_fields
== true) {
1110 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1112 current_offset
+= 4;
1113 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_dc_voltage_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1114 current_offset
+= 4;
1115 if (global_show_unknown_fields
== true) {
1116 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1118 current_offset
+= 4;
1119 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_energy_total_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1120 current_offset
+= 4;
1121 if (global_show_unknown_fields
== true) {
1122 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1124 current_offset
+= 4;
1125 if (global_show_unknown_fields
== true) {
1126 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1128 current_offset
+= 4;
1129 if (global_show_unknown_fields
== true) {
1130 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1132 current_offset
+= 4;
1133 if (global_show_unknown_fields
== true) {
1134 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1136 current_offset
+= 4;
1137 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_power_max_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1138 current_offset
+= 4;
1139 if (global_show_unknown_fields
== true) {
1140 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1142 current_offset
+= 4;
1143 if (global_show_unknown_fields
== true) {
1144 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1146 current_offset
+= 4;
1147 if (global_show_unknown_fields
== true) {
1148 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1150 current_offset
+= 4;
1151 if (global_show_unknown_fields
== true) {
1152 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1154 current_offset
+= 4;
1155 proto_tree_add_item(post_tree
, hf_solaredge_post_singlephase_inverter_ac_power_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1156 current_offset
+= 4;
1157 if (global_show_unknown_fields
== true) {
1158 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_float_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1160 current_offset
+= 4;
1161 if (global_show_unknown_fields
== true) {
1162 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1164 current_offset
+= 4;
1166 case SOLAREDGE_DEVICETYPE_INVERTER_3PHASE
:
1167 col_append_str(pinfo
->cinfo
, COL_INFO
, "Three phase inverter");
1168 current_offset
+= device_header
.device_length
;
1169 // Not implemented yet
1171 case SOLAREDGE_DEVICETYPE_OPTIMIZER2
:
1172 col_append_str(pinfo
->cinfo
, COL_INFO
, "Optimizer");
1173 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1174 current_offset
+= 4;
1175 proto_tree_add_item(post_tree
, hf_solaredge_post_optimizer_uptime_short_type
, tvb
, current_offset
, 2, ENC_LITTLE_ENDIAN
);
1176 current_offset
+= 2;
1177 optimizer_data
= tvb_get_ptr(tvb
, current_offset
, 6);
1178 dc_voltage_panel
= (float)(0.125 * (float)(optimizer_data
[0] | (optimizer_data
[1] << 8 & 0x300)));
1179 proto_tree_add_float_format_value(post_tree
, hf_solaredge_post_optimizer_dc_voltage_panel_type
, tvb
, current_offset
, 6, dc_voltage_panel
, "%.2f", dc_voltage_panel
);
1180 dc_voltage_optimizer
= (float)(0.125 * (float)(optimizer_data
[1] >> 2 | (optimizer_data
[2] << 6 & 0x3c0)));
1181 proto_tree_add_float_format_value(post_tree
, hf_solaredge_post_optimizer_dc_voltage_optimzer_type
, tvb
, current_offset
, 6, dc_voltage_optimizer
, "%.2f", dc_voltage_optimizer
);
1182 dc_current_optimizer
= (float)(0.00625 * (float)(optimizer_data
[3] <<4 | (optimizer_data
[2] >>4 & 0xf)));
1183 proto_tree_add_float_format_value(post_tree
, hf_solaredge_post_optimizer_dc_current_optimzer_type
, tvb
, current_offset
, 6, dc_current_optimizer
, "%.2f", dc_current_optimizer
);
1184 energy_day_optimizer
= (float)(0.25 * (float)(optimizer_data
[6] <<8 | optimizer_data
[5]));
1185 proto_tree_add_float_format_value(post_tree
, hf_solaredge_post_optimizer_energy_day_type
, tvb
, current_offset
, 6, energy_day_optimizer
, "%.2f", energy_day_optimizer
);
1186 current_offset
+= 6;
1187 temperature_optimizer
= (float)(2.0 * (float)tvb_get_uint8(tvb
, current_offset
));
1188 proto_tree_add_float_format_value(post_tree
, hf_solaredge_post_optimizer_temperature_type
, tvb
, current_offset
, 2, temperature_optimizer
, "%.2f", temperature_optimizer
);
1191 case SOLAREDGE_DEVICETYPE_EVENT
:
1192 col_append_str(pinfo
->cinfo
, COL_INFO
, "Wake/sleep event");
1193 proto_tree_add_item(post_tree
, hf_solaredge_post_event_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1194 current_offset
+= 4;
1195 event_type
= tvb_get_uint32(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1196 proto_tree_add_item(post_tree
, hf_solaredge_post_event_type_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1197 current_offset
+= 4;
1198 proto_tree_add_item(post_tree
, hf_solaredge_post_event_event_start_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1199 current_offset
+= 4;
1200 if (event_type
== 1) {
1201 /* Timezone offset, then end time*/
1202 proto_tree_add_item(post_tree
, hf_solaredge_post_event_event_timezone_offset_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1203 current_offset
+= 4;
1204 proto_tree_add_item(post_tree
, hf_solaredge_post_event_event_end_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1205 current_offset
+= 4;
1207 /* End time, then unused */
1208 proto_tree_add_item(post_tree
, hf_solaredge_post_event_event_end_timestamp_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1209 current_offset
+= 8;
1211 if (global_show_unknown_fields
== true) {
1212 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1214 current_offset
+= 4;
1215 if (global_show_unknown_fields
== true) {
1216 proto_tree_add_item(post_tree
, hf_solaredge_post_padding_uint32_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1218 current_offset
+= 4;
1221 col_append_str(pinfo
->cinfo
, COL_INFO
, "Unknown device");
1222 current_offset
+= device_header
.device_length
;
1225 decrement_dissection_depth(pinfo
);
1227 if (current_offset
< length
) {
1228 col_append_str(pinfo
->cinfo
, COL_INFO
, ", ");
1229 dissect_solaredge_devicedata(tvb
, pinfo
, tree
, current_offset
, length
);
1231 return current_offset
;
1235 // NOLINTNEXTLINE(misc-no-recursion)
1236 dissect_solaredge_recursive(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree _U_
, void *data _U_
, int ett
, conversation_t
*conv
)
1239 proto_tree
*solaredge_header_tree
;
1240 proto_item
*solaredge_payload_item
;
1241 proto_tree
*solaredge_payload_tree
;
1242 int32_t current_offset
= 0;
1243 t_solaredge_packet_header header
;
1244 GByteArray
*system_key
;
1245 uint8_t session_key_message_part1
[SOLAREDGE_ENCRYPTION_KEY_LENGTH
];
1246 uint8_t session_key_message_part2
[SOLAREDGE_ENCRYPTION_KEY_LENGTH
];
1247 uint8_t session_key_intermediate
[SOLAREDGE_ENCRYPTION_KEY_LENGTH
];
1249 t_solaredge_conversion_data
*conv_data
;
1250 bool system_key_valid
;
1252 /* Starts with magic number */
1253 if ( tvb_get_uint32(tvb
, 0, ENC_LITTLE_ENDIAN
) != SOLAREDGE_MAGIC_NUMBER
) {
1256 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SolarEdge");
1257 col_clear(pinfo
->cinfo
,COL_INFO
);
1258 ti
= proto_tree_add_item(tree
, proto_solaredge
, tvb
, 0, -1, ENC_NA
);
1259 current_offset
+= 4;
1260 solaredge_header_tree
= proto_item_add_subtree(ti
, ett
);
1262 header
.length
= tvb_get_uint16(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1263 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_length_type
, tvb
, current_offset
, 2, ENC_LITTLE_ENDIAN
);
1264 current_offset
+= 2;
1265 header
.length_inverse
= tvb_get_uint16(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1266 if (header
.length_inverse
!= (UINT16_MAX
- header
.length
)) {
1267 proto_tree_add_expert_format(solaredge_header_tree
, pinfo
, &ei_solaredge_invalid_length
, tvb
, current_offset
- 2, current_offset
+ 2, "Invalid length: inverse length %d not matching length %d", header
.length_inverse
, header
.length
);
1269 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_length_inverse_type
, tvb
, current_offset
, 2, ENC_LITTLE_ENDIAN
);
1270 current_offset
+= 2;
1271 header
.sequence_number
= tvb_get_uint16(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1272 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_sequence_number_type
, tvb
, current_offset
, 2, ENC_LITTLE_ENDIAN
);
1273 current_offset
+= 2;
1274 header
.source_address
= tvb_get_uint32(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1275 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_source_address_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1276 current_offset
+= 4;
1277 header
.destination_address
= tvb_get_uint32(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1278 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_destination_address_type
, tvb
, current_offset
, 4, ENC_LITTLE_ENDIAN
);
1279 current_offset
+= 4;
1280 header
.command_type
= tvb_get_uint16(tvb
, current_offset
, ENC_LITTLE_ENDIAN
);
1281 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_command_type
, tvb
, current_offset
, 2, ENC_LITTLE_ENDIAN
);
1282 current_offset
+= 2;
1283 col_append_str(pinfo
->cinfo
, COL_INFO
, val_to_str_const(header
.command_type
, solaredge_packet_commandtypes
, "Unknown command"));
1285 increment_dissection_depth(pinfo
);
1286 switch (header
.command_type
) {
1287 case SOLAREDGE_COMMAND_MISC_ENCRYPTED
:
1288 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_payload_type
, tvb
, current_offset
, header
.length
, ENC_NA
);
1289 conv_data
= (t_solaredge_conversion_data
*)conversation_get_proto_data(conv
, proto_solaredge
);
1290 if ((conv_data
!= NULL
) && (conv_data
->session_key_found
== true)) {
1291 uint8_t *decrypted_buffer
= (uint8_t*)wmem_alloc(pinfo
->pool
, header
.length
);
1292 solaredge_decrypt(pinfo
->pool
, tvb_get_ptr(tvb
, current_offset
, header
.length
), header
.length
, decrypted_buffer
, conv_data
->cipher_hd_session
);
1293 tvbuff_t
*next_tvb
= tvb_new_child_real_data(tvb
, decrypted_buffer
, header
.length
, header
.length
);
1294 if ( tvb_get_uint32(next_tvb
, 0, ENC_LITTLE_ENDIAN
) == SOLAREDGE_MAGIC_NUMBER
) {
1295 add_new_data_source(pinfo
, next_tvb
, "Decrypted Packet");
1296 dissect_solaredge_recursive(next_tvb
, pinfo
, tree
, data
, ett_solaredge_packet_decrypted
, conv
);
1299 current_offset
+= header
.length
;
1301 case SOLAREDGE_COMMAND_SERVER_POST_DATA
:
1302 solaredge_payload_item
= proto_tree_add_item(solaredge_header_tree
, hf_solaredge_post_type
, tvb
, current_offset
, header
.length
, ENC_NA
);
1303 solaredge_payload_tree
= proto_item_add_subtree(solaredge_payload_item
, ett_solaredge_packet_post
);
1304 dissect_solaredge_devicedata(tvb
, pinfo
, solaredge_payload_tree
, current_offset
, header
.length
);
1306 case SOLAREDGE_COMMAND_SERVER_SET_KEY
:
1307 proto_tree_add_item(solaredge_header_tree
, hf_solaredge_session_key_type
, tvb
, current_offset
, header
.length
, ENC_NA
);
1308 if (!gcry_cipher_open(&cipher_hd_system
, GCRY_CIPHER_AES128
, GCRY_CIPHER_MODE_ECB
, 0)) {
1309 /* Load the system key to generate session key */
1310 system_key
= g_byte_array_new();
1311 system_key_valid
= hex_str_to_bytes(global_system_encryption_key
, system_key
, false);
1312 if ((system_key_valid
== true) && (system_key
->len
== SOLAREDGE_ENCRYPTION_KEY_LENGTH
)) {
1313 if (!gcry_cipher_setkey(cipher_hd_system
, system_key
->data
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
)) {
1314 /* Read first part of message */
1315 tvb_memcpy(tvb
, session_key_message_part1
, current_offset
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1316 current_offset
+= SOLAREDGE_ENCRYPTION_KEY_LENGTH
;
1317 /* Read second part of message */
1318 tvb_memcpy(tvb
, session_key_message_part2
, current_offset
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1319 current_offset
+= SOLAREDGE_ENCRYPTION_KEY_LENGTH
;
1320 /* Encrypt first part with system key */
1321 gcry_cipher_encrypt(cipher_hd_system
, session_key_intermediate
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
, session_key_message_part1
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
);
1322 /* XOR result with second part to obtain session key */
1323 for (i
= 0; i
< SOLAREDGE_ENCRYPTION_KEY_LENGTH
; i
++) {
1324 session_key_message_part2
[i
] = session_key_intermediate
[i
] ^ session_key_message_part2
[i
];
1326 conv_data
= (t_solaredge_conversion_data
*)conversation_get_proto_data(conv
, proto_solaredge
);
1327 if (!gcry_cipher_open(&conv_data
->cipher_hd_session
, GCRY_CIPHER_AES128
, GCRY_CIPHER_MODE_ECB
, 0)) {
1328 /* Load the session key */
1329 if (!gcry_cipher_setkey(conv_data
->cipher_hd_session
, session_key_message_part2
, SOLAREDGE_ENCRYPTION_KEY_LENGTH
)) {
1330 conv_data
->session_key_found
= true;
1332 gcry_cipher_close(conv_data
->cipher_hd_session
);
1336 gcry_cipher_close(cipher_hd_system
);
1341 /* If not implemented, skip command */
1342 current_offset
+= header
.length
;
1345 decrement_dissection_depth(pinfo
);
1348 proto_tree_add_checksum(solaredge_header_tree
, tvb
, SOLAREDGE_HEADER_LENGTH
+ header
.length
, hf_solaredge_crc_type
, hf_solaredge_crc_status_type
, &ei_solaredge_invalid_crc
, pinfo
, calculate_crc(&header
, tvb_get_ptr(tvb
, SOLAREDGE_HEADER_LENGTH
, header
.length
), header
.length
), ENC_LITTLE_ENDIAN
, PROTO_CHECKSUM_VERIFY
);
1349 current_offset
+= 2;
1350 return current_offset
;
1354 dissect_solaredge(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree _U_
, void *data _U_
)
1356 conversation_t
*conv
= find_or_create_conversation(pinfo
);
1357 t_solaredge_conversion_data
*conv_data
;
1358 if (conversation_get_proto_data(conv
, proto_solaredge
) == NULL
) {
1359 /* Setup empty encryption key */
1360 conv_data
= wmem_new(wmem_file_scope(), t_solaredge_conversion_data
);
1361 conv_data
->session_key_found
= false;
1362 conversation_add_proto_data(conv
, proto_solaredge
, conv_data
);
1364 return dissect_solaredge_recursive(tvb
, pinfo
, tree
, data
, ett_solaredge_packet
, conv
);
1368 proto_reg_handoff_solaredge(void)
1370 dissector_add_for_decode_as("tcp.port", solaredge_handle
);
1374 proto_register_solaredge(void)
1376 static hf_register_info hf
[] = {
1377 { &hf_solaredge_length_type
,
1378 { "Length", "solaredge.length",
1379 FT_UINT16
, BASE_DEC
,
1383 { &hf_solaredge_length_inverse_type
,
1384 { "Length inverse", "solaredge.length_inverse",
1385 FT_UINT16
, BASE_DEC
,
1389 { &hf_solaredge_sequence_number_type
,
1390 { "Sequence number", "solaredge.sequence_number",
1391 FT_UINT16
, BASE_DEC
,
1395 { &hf_solaredge_source_address_type
,
1396 { "Source address", "solaredge.source_address",
1397 FT_UINT32
, BASE_HEX
,
1401 { &hf_solaredge_destination_address_type
,
1402 { "Destination address", "solaredge.destination_address",
1403 FT_UINT32
, BASE_HEX
,
1407 { &hf_solaredge_command_type
,
1408 { "Command Type", "solaredge.command",
1409 FT_UINT16
, BASE_HEX
,
1410 VALS(solaredge_packet_commandtypes
), 0x0,
1413 { &hf_solaredge_crc_type
,
1414 { "CRC", "solaredge.crc",
1415 FT_UINT16
, BASE_HEX
,
1419 { &hf_solaredge_crc_status_type
,
1420 { "CRC Status", "solaredge.crc.status",
1421 FT_UINT8
, BASE_NONE
,
1422 VALS(proto_checksum_vals
), 0x0,
1425 { &hf_solaredge_payload_type
,
1426 { "Payload", "solaredge.payload",
1427 FT_BYTES
, BASE_NONE
,
1431 { &hf_solaredge_session_key_type
,
1432 { "Session key", "solaredge.session_key",
1433 FT_BYTES
, BASE_NONE
,
1437 { &hf_solaredge_post_type
,
1438 { "Post data", "solaredge.post",
1443 { &hf_solaredge_post_device_type
,
1444 { "Device", "solaredge.post.device",
1449 { &hf_solaredge_post_device_type_type
,
1450 { "Device Type", "solaredge.post.device.type",
1451 FT_UINT16
, BASE_HEX
,
1452 VALS(solaredge_data_devicetypes
), 0x0,
1455 { &hf_solaredge_post_device_id_type
,
1456 { "Device ID", "solaredge.post.device.id",
1457 FT_UINT32
, BASE_HEX
,
1461 { &hf_solaredge_post_length_type
,
1462 { "Length", "solaredge.post.device.length",
1463 FT_UINT16
, BASE_DEC
,
1467 { &hf_solaredge_post_padding_uint32_type
,
1468 { "Padding (uint32)", "solaredge.post.device.padding_uint32",
1469 FT_UINT32
, BASE_HEX
,
1473 { &hf_solaredge_post_padding_float_type
,
1474 { "Padding (float)", "solaredge.post.device.padding_float",
1475 FT_FLOAT
, BASE_NONE
,
1479 { &hf_solaredge_post_singlephase_inverter_timestamp_type
,
1480 { "Timestamp", "solaredge.post.device.singlephase_inverter.timestamp",
1481 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
,
1485 { &hf_solaredge_post_singlephase_inverter_uptime_type
,
1486 { "Uptime", "solaredge.post.device.singlephase_inverter.uptime",
1487 FT_RELATIVE_TIME
, BASE_NONE
,
1491 { &hf_solaredge_post_singlephase_inverter_interval_type
,
1492 { "Interval", "solaredge.post.device.singlephase_inverter.interval",
1493 FT_UINT32
, BASE_DEC
,
1497 { &hf_solaredge_post_singlephase_inverter_temperature_type
,
1498 { "Temperature", "solaredge.post.device.singlephase_inverter.temperature",
1499 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1500 UNS(&units_degree_celsius
), 0x0,
1503 { &hf_solaredge_post_singlephase_inverter_energy_day_type
,
1504 { "Energy current day", "solaredge.post.device.singlephase_inverter.energy_day",
1505 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1506 UNS(&units_watthour
), 0x0,
1509 { &hf_solaredge_post_singlephase_inverter_energy_interval_type
,
1510 { "Energy current interval", "solaredge.post.device.singlephase_inverter.energy_interval",
1511 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1512 UNS(&units_watthour
), 0x0,
1515 { &hf_solaredge_post_singlephase_inverter_ac_voltage_type
,
1516 { "AC Voltage", "solaredge.post.device.singlephase_inverter.ac_voltage",
1517 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1518 UNS(&units_volt
), 0x0,
1521 { &hf_solaredge_post_singlephase_inverter_ac_current_type
,
1522 { "AC Current", "solaredge.post.device.singlephase_inverter.ac_current",
1523 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1524 UNS(&units_amp
), 0x0,
1527 { &hf_solaredge_post_singlephase_inverter_ac_frequency_type
,
1528 { "AC Frequency", "solaredge.post.device.singlephase_inverter.ac_frequency",
1529 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1530 UNS(&units_hz
), 0x0,
1533 { &hf_solaredge_post_singlephase_inverter_dc_voltage_type
,
1534 { "DC Voltage", "solaredge.post.device.singlephase_inverter.dc_voltage",
1535 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1536 UNS(&units_volt
), 0x0,
1539 { &hf_solaredge_post_singlephase_inverter_energy_total_type
,
1540 { "Energy total", "solaredge.post.device.singlephase_inverter.energy_total",
1541 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1542 UNS(&units_watthour
), 0x0,
1545 { &hf_solaredge_post_singlephase_inverter_power_max_type
,
1546 { "Power Max", "solaredge.post.device.singlephase_inverter.power_max",
1547 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1548 UNS(&units_watt
), 0x0,
1551 { &hf_solaredge_post_singlephase_inverter_ac_power_type
,
1552 { "AC Power", "solaredge.post.device.singlephase_inverter.ac_power",
1553 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1554 UNS(&units_watt
), 0x0,
1557 { &hf_solaredge_post_optimizer_inverter_type
,
1558 { "Inverter ID", "solaredge.post.device.optimizer.inverter",
1559 FT_UINT32
, BASE_HEX
,
1563 { &hf_solaredge_post_optimizer_dc_current_panel_type
,
1564 { "DC Current Panel", "solaredge.post.device.optimizer.panel_dc_current",
1565 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1566 UNS(&units_amp
), 0x0,
1569 { &hf_solaredge_post_optimizer_timestamp_type
,
1570 { "Timestamp", "solaredge.post.device.optimizer.timestamp",
1571 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
,
1575 { &hf_solaredge_post_optimizer_uptime_type
,
1576 { "Uptime", "solaredge.post.device.optimizer.uptime",
1577 FT_RELATIVE_TIME
, BASE_NONE
,
1581 { &hf_solaredge_post_optimizer_uptime_short_type
,
1582 { "Uptime (short format)", "solaredge.post.device.optimizer.uptime_short",
1583 FT_UINT16
, BASE_DEC
,
1587 { &hf_solaredge_post_optimizer_dc_voltage_panel_type
,
1588 { "DC Voltage Panel", "solaredge.post.device.optimizer.panel_dc_voltage",
1589 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1590 UNS(&units_volt
), 0x0,
1593 { &hf_solaredge_post_optimizer_dc_voltage_optimzer_type
,
1594 { "DC Voltage Optimizer", "solaredge.post.device.optimizer.optimizer_dc_voltage",
1595 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1596 UNS(&units_volt
), 0x0,
1599 { &hf_solaredge_post_optimizer_dc_current_optimzer_type
,
1600 { "DC Current Optimizer", "solaredge.post.device.optimizer.optimizer_dc_current",
1601 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1602 UNS(&units_amp
), 0x0,
1605 { &hf_solaredge_post_optimizer_energy_day_type
,
1606 { "Energy current day", "solaredge.post.device.optimizer.energy_day",
1607 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1608 UNS(&units_watthour
), 0x0,
1611 { &hf_solaredge_post_optimizer_temperature_type
,
1612 { "Temperature", "solaredge.post.device.optimizer.temperature",
1613 FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
1614 UNS(&units_degree_celsius
), 0x0,
1617 { &hf_solaredge_post_event_timestamp_type
,
1618 { "Timestamp", "solaredge.post.device.event.timestamp",
1619 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
,
1623 { &hf_solaredge_post_event_type_type
,
1624 { "Type", "solaredge.post.device.event.type",
1625 FT_UINT32
, BASE_HEX
,
1629 { &hf_solaredge_post_event_event_start_timestamp_type
,
1630 { "Event start", "solaredge.post.device.event.start",
1631 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
,
1635 { &hf_solaredge_post_event_event_timezone_offset_type
,
1636 { "Timezone offset", "solaredge.post.device.event.timezone_offset",
1641 { &hf_solaredge_post_event_event_end_timestamp_type
,
1642 { "Event stop", "solaredge.post.device.event.stop",
1643 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
,
1649 static ei_register_info ei
[] = {
1650 { &ei_solaredge_invalid_length
, { "solaredge.invalid_length", PI_MALFORMED
, PI_WARN
, "Inverse length field not matching length field", EXPFILL
}},
1651 { &ei_solaredge_invalid_crc
, { "solaredge.invalid_crc", PI_CHECKSUM
, PI_WARN
, "CRC does not match data", EXPFILL
}}
1654 expert_module_t
* expert_solaredge
;
1656 /* Setup protocol subtree array */
1657 static int *ett
[] = {
1658 &ett_solaredge_packet
,
1659 &ett_solaredge_packet_decrypted
,
1660 &ett_solaredge_packet_post
,
1661 &ett_solaredge_packet_post_device
1664 proto_solaredge
= proto_register_protocol ("SolarEdge monitoring protocol", "SolarEdge", "solaredge");
1665 solaredge_handle
= register_dissector("solaredge", dissect_solaredge
, proto_solaredge
);
1667 module_t
* module_solaredge
= prefs_register_protocol(proto_solaredge
, NULL
);
1668 prefs_register_bool_preference(module_solaredge
, "unknown", "Show unknown fields", "Show unidentified fields (\"padding\") in packet dissections", &global_show_unknown_fields
);
1669 prefs_register_string_preference(module_solaredge
, "system_encryption_key", "System encryption key", "Inverter system encryption key", &global_system_encryption_key
);
1671 proto_register_field_array(proto_solaredge
, hf
, array_length(hf
));
1672 proto_register_subtree_array(ett
, array_length(ett
));
1674 expert_solaredge
= expert_register_protocol(proto_solaredge
);
1675 expert_register_field_array(expert_solaredge
, ei
, array_length(ei
));
1679 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1684 * indent-tabs-mode: t
1687 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1688 * :indentSize=8:tabSize=8:noTabs=false: