nRF5 SDK for Mesh v3.2.0
serial_cmd.h
1 /* Copyright (c) 2010 - 2019, Nordic Semiconductor ASA
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this
8  * list of conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form, except as embedded into a Nordic
11  * Semiconductor ASA integrated circuit in a product or a software update for
12  * such product, must reproduce the above copyright notice, this list of
13  * conditions and the following disclaimer in the documentation and/or other
14  * materials provided with the distribution.
15  *
16  * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
17  * contributors may be used to endorse or promote products derived from this
18  * software without specific prior written permission.
19  *
20  * 4. This software, with or without modification, must only be used with a
21  * Nordic Semiconductor ASA integrated circuit.
22  *
23  * 5. Any software provided in binary form under this license must not be reverse
24  * engineered, decompiled, modified and/or disassembled.
25  *
26  * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
27  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28  * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
30  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
32  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
35  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef SERIAL_CMD_H__
39 #define SERIAL_CMD_H__
40 
41 #include <stdint.h>
42 #include <ble_gap.h>
43 
44 #include "nrf_mesh_defines.h"
45 #include "nrf_mesh_serial.h"
46 #include "nrf_mesh_prov.h"
47 #include "nrf_mesh_dfu.h"
48 #include "nrf_mesh_assert.h"
49 #include "serial_types.h"
50 #include "packet.h"
51 #include "access.h"
52 
59 #define SERIAL_OPCODE_CMD_RANGE_DEVICE_START (0x00)
60 #define SERIAL_OPCODE_CMD_DEVICE_ECHO (0x02)
61 #define SERIAL_OPCODE_CMD_DEVICE_INTERNAL_EVENTS_REPORT (0x03)
62 #define SERIAL_OPCODE_CMD_DEVICE_SERIAL_VERSION_GET (0x09)
63 #define SERIAL_OPCODE_CMD_DEVICE_FW_INFO_GET (0x0A)
64 #define SERIAL_OPCODE_CMD_DEVICE_RADIO_RESET (0x0E)
65 #define SERIAL_OPCODE_CMD_DEVICE_BEACON_START (0x10)
66 #define SERIAL_OPCODE_CMD_DEVICE_BEACON_STOP (0x11)
67 #define SERIAL_OPCODE_CMD_DEVICE_BEACON_PARAMS_SET (0x12)
68 #define SERIAL_OPCODE_CMD_DEVICE_BEACON_PARAMS_GET (0x13)
69 #define SERIAL_OPCODE_CMD_DEVICE_HOUSEKEEPING_DATA_GET (0x14)
70 #define SERIAL_OPCODE_CMD_DEVICE_HOUSEKEEPING_DATA_CLEAR (0x15)
72 #define SERIAL_OPCODE_CMD_RANGE_DEVICE_END (0x1F)
74 #define SERIAL_OPCODE_CMD_RANGE_APP_START (0x20)
75 #define SERIAL_OPCODE_CMD_APP_APPLICATION (0x20)
76 #define SERIAL_OPCODE_CMD_RANGE_APP_END (0x20)
78 #define SERIAL_OPCODE_CMD_RANGE_SAR_START (0x21)
79 #define SERIAL_OPCODE_CMD_SAR_START (0x21)
80 #define SERIAL_OPCODE_CMD_SAR_CONTINUE (0x22)
81 #define SERIAL_OPCODE_CMD_RANGE_SAR_END (0x22)
83 #define SERIAL_OPCODE_CMD_RANGE_CONFIG_START (0x40)
84 #define SERIAL_OPCODE_CMD_CONFIG_ADV_ADDR_SET (0x40)
85 #define SERIAL_OPCODE_CMD_CONFIG_ADV_ADDR_GET (0x41)
86 #define SERIAL_OPCODE_CMD_CONFIG_CHANNEL_MAP_SET (0x42)
87 #define SERIAL_OPCODE_CMD_CONFIG_CHANNEL_MAP_GET (0x43)
88 #define SERIAL_OPCODE_CMD_CONFIG_TX_POWER_SET (0x44)
89 #define SERIAL_OPCODE_CMD_CONFIG_TX_POWER_GET (0x45)
90 #define SERIAL_OPCODE_CMD_CONFIG_UUID_SET (0x53)
91 #define SERIAL_OPCODE_CMD_CONFIG_UUID_GET (0x54)
92 #define SERIAL_OPCODE_CMD_RANGE_CONFIG_END (0x5F)
94 #define SERIAL_OPCODE_CMD_RANGE_PROV_START (0x60)
95 #define SERIAL_OPCODE_CMD_PROV_SCAN_START (0x61)
96 #define SERIAL_OPCODE_CMD_PROV_SCAN_STOP (0x62)
97 #define SERIAL_OPCODE_CMD_PROV_PROVISION (0x63)
98 #define SERIAL_OPCODE_CMD_PROV_LISTEN (0x64)
99 #define SERIAL_OPCODE_CMD_PROV_OOB_USE (0x66)
100 #define SERIAL_OPCODE_CMD_PROV_AUTH_DATA (0x67)
101 #define SERIAL_OPCODE_CMD_PROV_ECDH_SECRET (0x68)
102 #define SERIAL_OPCODE_CMD_PROV_KEYPAIR_SET (0x69)
103 #define SERIAL_OPCODE_CMD_PROV_CAPABILITIES_SET (0x6A)
104 #define SERIAL_OPCODE_CMD_RANGE_PROV_END (0x6F)
106 #define SERIAL_OPCODE_CMD_RANGE_OPENMESH_START (0x70)
107 #define SERIAL_OPCODE_CMD_OPENMESH_INIT (0x70)
108 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_SET (0x71)
109 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_ENABLE (0x72)
110 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_DISABLE (0x73)
111 #define SERIAL_OPCODE_CMD_OPENMESH_START (0x74)
112 #define SERIAL_OPCODE_CMD_OPENMESH_STOP (0x75)
113 #define SERIAL_OPCODE_CMD_OPENMESH_FLAG_SET (0x76)
114 #define SERIAL_OPCODE_CMD_OPENMESH_FLAG_GET (0x77)
115 #define SERIAL_OPCODE_CMD_OPENMESH_DFU_DATA (0x78)
116 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_GET (0x7A)
117 #define SERIAL_OPCODE_CMD_OPENMESH_BUILD_VERSION_GET (0x7B)
118 #define SERIAL_OPCODE_CMD_OPENMESH_ACCESS_ADDR_GET (0x7C)
119 #define SERIAL_OPCODE_CMD_OPENMESH_CHANNEL_GET (0x7D)
120 #define SERIAL_OPCODE_CMD_OPENMESH_INTERVAL_MIN_MS_GET (0x7F)
121 #define SERIAL_OPCODE_CMD_RANGE_OPENMESH_END (0x8F)
124 #define SERIAL_OPCODE_CMD_RANGE_MESH_START (0x90)
126 #define SERIAL_OPCODE_CMD_MESH_ENABLE (0x90)
127 #define SERIAL_OPCODE_CMD_MESH_DISABLE (0x91)
128 #define SERIAL_OPCODE_CMD_MESH_SUBNET_ADD (0x92)
129 #define SERIAL_OPCODE_CMD_MESH_SUBNET_UPDATE (0x93)
130 #define SERIAL_OPCODE_CMD_MESH_SUBNET_DELETE (0x94)
131 #define SERIAL_OPCODE_CMD_MESH_SUBNET_GET_ALL (0x95)
132 #define SERIAL_OPCODE_CMD_MESH_SUBNET_COUNT_MAX_GET (0x96)
133 #define SERIAL_OPCODE_CMD_MESH_APPKEY_ADD (0x97)
134 #define SERIAL_OPCODE_CMD_MESH_APPKEY_UPDATE (0x98)
135 #define SERIAL_OPCODE_CMD_MESH_APPKEY_DELETE (0x99)
136 #define SERIAL_OPCODE_CMD_MESH_APPKEY_GET_ALL (0x9A)
137 #define SERIAL_OPCODE_CMD_MESH_APPKEY_COUNT_MAX_GET (0x9B)
138 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_ADD (0x9C)
139 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_DELETE (0x9D)
140 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_COUNT_MAX_GET (0x9E)
141 #define SERIAL_OPCODE_CMD_MESH_ADDR_LOCAL_UNICAST_SET (0x9F)
142 #define SERIAL_OPCODE_CMD_MESH_ADDR_LOCAL_UNICAST_GET (0xA0)
143 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_ADD (0xA1)
144 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_ADD_VIRTUAL (0xA2)
145 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_REMOVE (0xA3)
146 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_ADD (0xA4)
147 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_ADD_VIRTUAL (0xA5)
148 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_REMOVE (0xA6)
149 #define SERIAL_OPCODE_CMD_MESH_ADDR_GET (0xA7)
150 #define SERIAL_OPCODE_CMD_MESH_ADDR_GET_ALL (0xA8)
151 #define SERIAL_OPCODE_CMD_MESH_ADDR_NONVIRTUAL_COUNT_MAX_GET (0xA9)
152 #define SERIAL_OPCODE_CMD_MESH_ADDR_VIRTUAL_COUNT_MAX_GET (0xAA)
153 #define SERIAL_OPCODE_CMD_MESH_PACKET_SEND (0xAB)
154 #define SERIAL_OPCODE_CMD_MESH_STATE_CLEAR (0xAC)
156 #define SERIAL_OPCODE_CMD_RANGE_MESH_END (0xAF)
158 #define SERIAL_OPCODE_CMD_RANGE_DFU_START (0xD0)
159 #define SERIAL_OPCODE_CMD_DFU_JUMP_TO_BOOTLOADER (0xD0)
160 #define SERIAL_OPCODE_CMD_DFU_REQUEST (0xD1)
161 #define SERIAL_OPCODE_CMD_DFU_RELAY (0xD2)
162 #define SERIAL_OPCODE_CMD_DFU_ABORT (0xD3)
163 #define SERIAL_OPCODE_CMD_DFU_BANK_INFO_GET (0xD4)
164 #define SERIAL_OPCODE_CMD_DFU_BANK_FLASH (0xD5)
165 #define SERIAL_OPCODE_CMD_DFU_STATE_GET (0xD6)
166 #define SERIAL_OPCODE_CMD_RANGE_DFU_END (0xDF)
168 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_START (0xE0)
169 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_SET (0xE0)
170 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_GET (0xE1)
171 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_SET (0xE2)
172 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_GET (0xE3)
173 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_ADD (0xE4)
174 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_REMOVE (0xE5)
175 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_GET (0xE6)
176 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_BIND (0xE7)
177 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_UNBIND (0xE8)
178 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_GET (0xE9)
179 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_SET (0xEA)
180 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_GET (0xEB)
181 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_SET (0xEC)
182 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_GET (0xED)
183 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_SET (0xEE)
184 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_GET (0xEF)
185 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_SIG_MODEL_COUNT_GET (0xF0)
186 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_VENDOR_MODEL_COUNT_GET (0xF1)
187 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_ID_GET (0xF2)
188 #define SERIAL_OPCODE_CMD_ACCESS_HANDLE_GET (0xF3)
189 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_MODELS_GET (0xF4)
190 #define SERIAL_OPCODE_CMD_ACCESS_ACCESS_FLASH_STORE (0xF5)
191 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_END (0xF5)
193 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_START (0xFC)
194 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_MODELS_GET (0xFC)
195 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_INIT (0xFD)
196 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_COMMAND (0xFE)
197 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_END (0xFE)
200 /************** Device commands **************/
201 /*lint -align_max(push) -align_max(1) */
202 
204 typedef struct __attribute((packed))
205 {
208 
210 typedef struct __attribute((packed))
211 {
212  uint8_t beacon_slot;
213  uint8_t data[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
215 
217 typedef struct __attribute((packed))
218 {
219  uint8_t beacon_slot;
221 
223 typedef struct __attribute((packed))
224 {
225  uint8_t beacon_slot;
226  uint8_t tx_power;
227  uint8_t channel_map;
228  uint32_t interval_ms;
230 
232 typedef struct __attribute((packed))
233 {
234  uint8_t beacon_slot;
236 
238 typedef union __attribute((packed))
239 {
246 
247 /************** Config commands **************/
249 typedef struct __attribute((packed))
250 {
251  uint8_t addr_type;
252  uint8_t adv_addr[BLE_GAP_ADDR_LEN];
254 
256 typedef struct __attribute((packed))
257 {
258  uint8_t channel_map;
260 
262 typedef struct __attribute((packed))
263 {
264  uint8_t tx_power;
266 
268 typedef struct __attribute((packed))
269 {
270  uint8_t uuid[NRF_MESH_UUID_SIZE];
272 
274 typedef union __attribute((packed))
275 {
281 
282 /************** OpenMesh commands **************/
284 typedef struct __attribute((packed))
285 {
286  uint8_t dfu_packet[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
288 
290 typedef union __attribute((packed))
291 {
294 
295 /************** Provisioning commands **************/
296 
298 typedef struct __attribute((packed))
299 {
300  uint8_t private_key[NRF_MESH_ECDH_PRIVATE_KEY_SIZE];
301  uint8_t public_key[NRF_MESH_ECDH_PUBLIC_KEY_SIZE];
303 
305 typedef struct __attribute((packed))
306 {
307  uint8_t num_elements;
308  uint8_t public_key_type;
312  uint8_t output_oob_size;
315  uint8_t input_oob_size;
316  uint16_t input_oob_actions;
318 
320 typedef struct __attribute((packed))
321 {
322  uint8_t context_id;
323  uint8_t target_uuid[NRF_MESH_UUID_SIZE];
324  uint8_t network_key[NRF_MESH_KEY_SIZE];
325  uint16_t network_key_index;
326  uint32_t iv_index;
327  uint16_t address;
328  uint8_t iv_update_flag;
332 
334 typedef struct __attribute((packed))
335 {
336  uint8_t context_id;
337  uint8_t oob_method;
338  uint8_t oob_action;
339  uint8_t size;
341 
343 typedef struct __attribute((packed))
344 {
345  uint8_t context_id;
346  uint8_t data[16];
348 
350 typedef struct __attribute((packed))
351 {
352  uint8_t context_id;
353  uint8_t shared_secret[NRF_MESH_ECDH_SHARED_SECRET_SIZE];
355 
357 typedef union __attribute((packed))
358 {
366 
367 /******************* Mesh commands *********************/
369 typedef struct __attribute((packed))
370 {
371  uint16_t net_key_index;
372  uint8_t key[NRF_MESH_KEY_SIZE];
374 
376 typedef struct __attribute((packed))
377 {
378  uint16_t subnet_handle;
379  uint8_t key[NRF_MESH_KEY_SIZE];
381 
383 typedef struct __attribute((packed))
384 {
385  uint16_t subnet_handle;
387 
389 typedef struct __attribute((packed))
390 {
391  uint16_t app_key_index;
392  uint16_t subnet_handle;
393  uint8_t key[NRF_MESH_KEY_SIZE];
395 
397 typedef struct __attribute((packed))
398 {
399  uint16_t appkey_handle;
400  uint8_t key[NRF_MESH_KEY_SIZE];
402 
404 typedef struct __attribute((packed))
405 {
406  uint16_t appkey_handle;
408 
410 typedef struct __attribute((packed))
411 {
412  uint16_t subnet_handle;
414 
416 typedef struct __attribute((packed))
417 {
418  uint16_t owner_addr;
419  uint16_t subnet_handle;
420  uint8_t key[NRF_MESH_KEY_SIZE];
422 
424 typedef struct __attribute((packed))
425 {
426  uint16_t devkey_handle;
428 
430 typedef struct __attribute((packed))
431 {
432  uint16_t start_address;
433  uint16_t count;
435 
437 typedef struct __attribute((packed))
438 {
439  uint16_t raw_address;
441 
443 typedef struct __attribute((packed))
444 {
445  uint8_t virtual_addr_uuid[NRF_MESH_UUID_SIZE];
447 
449 typedef struct __attribute((packed))
450 {
451  uint16_t address_handle;
453 
455 typedef struct __attribute((packed))
456 {
457  uint16_t address;
459 
461 typedef struct __attribute((packed))
462 {
463  uint8_t uuid[NRF_MESH_UUID_SIZE];
465 
467 typedef struct __attribute((packed))
468 {
469  uint16_t address_handle;
471 
473 typedef struct __attribute((packed))
474 {
475  uint16_t address;
477 
479 typedef struct __attribute((packed))
480 {
481  uint8_t uuid[NRF_MESH_UUID_SIZE];
483 
485 typedef struct __attribute((packed))
486 {
487  uint16_t address_handle;
489 
491 typedef struct __attribute((packed))
492 {
493  uint16_t appkey_handle;
494  uint16_t src_addr;
495  uint16_t dst_addr_handle;
496  uint8_t ttl;
497  uint8_t force_segmented;
498  uint8_t transmic_size;
502 
504 
505 
507 typedef union __attribute((packed))
508 {
536 
537 /* **** PB-MESH Client **** */
538 
540 typedef struct __attribute((packed))
541 {
542  uint8_t element_index;
546 
548 typedef struct __attribute((packed))
549 {
550  uint16_t server_address;
552 
554 typedef struct __attribute((packed))
555 {
556  uint16_t server_address;
558 
560 typedef struct __attribute((packed))
561 {
562  uint16_t server_address;
564  uint8_t network_key[NRF_MESH_KEY_SIZE];
565  uint32_t iv_index;
566  uint16_t address;
568 
570 typedef union __attribute((packed))
571 {
577 
578 /*********** DFU commands ***************/
580 typedef struct __attribute((packed))
581 {
582  uint8_t dfu_type;
584  uint32_t bank_addr;
586 
588 typedef struct __attribute((packed))
589 {
590  uint8_t dfu_type;
593 
595 typedef struct __attribute((packed))
596 {
597  uint8_t dfu_type;
599 
601 typedef struct __attribute((packed))
602 {
603  uint8_t dfu_type;
605 
607 typedef union __attribute((packed))
608 {
614 
615 /*********** Access commands ************/
617 typedef struct __attribute((packed))
618 {
622 
624 typedef struct __attribute((packed))
625 {
628 
630 typedef struct __attribute((packed))
631 {
632  uint16_t element_index;
633  uint16_t location;
635 
637 typedef struct __attribute((packed))
638 {
640  uint8_t ttl;
642 
644 typedef struct __attribute((packed))
645 {
646  uint16_t element_index;
649 
651 typedef struct __attribute((packed))
652 {
654  uint8_t resolution;
655  uint8_t step_number;
657 
659 typedef struct __attribute((packed))
660 {
661  uint16_t element_index;
663 
665 typedef struct __attribute((packed))
666 {
670 
671 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_init_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
672 
674 typedef struct __attribute((packed))
675 {
679 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_command_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
680 
682 typedef union __attribute((packed))
683 {
689  serial_cmd_access_pub_period_set_t publish_period;
691  serial_cmd_model_specific_init_t model_init;
692  serial_cmd_model_specific_command_t model_cmd;
694 
695 /*********** App commands ***************/
697 typedef struct __attribute((packed))
698 {
701 
703 typedef union __attribute((packed))
704 {
714 } serial_cmd_t;
715 
716 /*lint -align_max(pop) */
719 #endif
uint16_t devkey_handle
Handle of the devkey to delete.
Definition: serial_cmd.h:426
uint16_t subnet_handle
Handle of the subnetwork to bind the devkey to.
Definition: serial_cmd.h:419
serial_cmd_mesh_addr_publication_add_t addr_publication_add
Publication address add parameters.
Definition: serial_cmd.h:530
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:550
serial_cmd_mesh_addr_publication_remove_t addr_publication_remove
Publication address remove parameters.
Definition: serial_cmd.h:532
#define SERIAL_CMD_MESH_PACKET_SEND_OVERHEAD
Mesh packet send command overhead.
Definition: serial_types.h:59
uint16_t access_model_handle_t
Access layer handle type.
Definition: access.h:162
serial_cmd_device_beacon_start_t beacon_start
Beacon start parameters.
Definition: serial_cmd.h:241
Used to update the ttl value for the messages originating from a given model.
Definition: serial_cmd.h:637
serial_cmd_mesh_appkey_add_t appkey_add
Appkey add parameters.
Definition: serial_cmd.h:513
uint8_t dfu_type
DFU Firmware type to get bank info about.
Definition: serial_cmd.h:597
serial_cmd_device_echo_t echo
Echo parameters.
Definition: serial_cmd.h:240
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:653
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
Mesh devkey add command parameters.
Definition: serial_cmd.h:416
serial_cmd_prov_t prov
Provisioning parameters.
Definition: serial_cmd.h:709
uint16_t element_index
Index of the addressed element which owns the model.
Definition: serial_cmd.h:646
uint8_t prov_context_index
Provisioning context index.
Definition: serial_cmd.h:543
serial_cmd_mesh_packet_send_t packet_send
Packet send parameters.
Definition: serial_cmd.h:534
serial_cmd_mesh_addr_subscription_add_t addr_subscription_add
Subscription address add parameters.
Definition: serial_cmd.h:526
#define NRF_MESH_UUID_SIZE
Size (in octets) of a UUID.
serial_cmd_model_specific_init_header_t model_init_info
Basic information that is always needed to initialize a model.
Definition: serial_cmd.h:667
Mesh address publication add command parameters.
Definition: serial_cmd.h:473
serial_cmd_dfu_bank_info_get_t bank_info
DFU bank info parameters.
Definition: serial_cmd.h:611
serial_cmd_pb_remote_client_remote_scan_cancel_t remote_scan_cancel
Cancel remote scanning procedure.
Definition: serial_cmd.h:574
Advertisement address config command parameters.
Definition: serial_cmd.h:249
serial_cmd_prov_auth_data_t auth_data
Parameters for the Authentication data packet.
Definition: serial_cmd.h:363
Mesh subnet add command parameters.
Definition: serial_cmd.h:369
uint16_t src_addr
Raw unicast address to use as source address.
Definition: serial_cmd.h:494
uint16_t address_handle
Handle of the address to remove from the publication address list.
Definition: serial_cmd.h:487
serial_cmd_mesh_addr_subscription_remove_t addr_subscription_remove
Subscription address remove parameters.
Definition: serial_cmd.h:528
uint8_t step_number
Must not be larger than ACCESS_PUBLISH_PERIOD_STEP_MAX.
Definition: serial_cmd.h:655
uint8_t size
Size of the OOB data.
Definition: serial_cmd.h:339
DFU command parameters.
Definition: serial_cmd.h:607
uint16_t subnet_handle
Handle of the subnet to get all appkeys of.
Definition: serial_cmd.h:412
uint16_t start_address
First address in the range of unicast addresses.
Definition: serial_cmd.h:432
serial_cmd_mesh_subnet_update_t subnet_update
Subnet update parameters.
Definition: serial_cmd.h:510
Echo cmd parameters.
Definition: serial_cmd.h:204
uint16_t appkey_handle
Handle of the appkey to delete.
Definition: serial_cmd.h:406
serial_cmd_device_beacon_params_get_t beacon_params_get
Beacon params get parameters.
Definition: serial_cmd.h:244
serial_cmd_prov_caps_t caps
Parameters for the Set capabilities packet.
Definition: serial_cmd.h:360
Channel map config command parameters.
Definition: serial_cmd.h:256
Keypair cmd parameters.
Definition: serial_cmd.h:298
Union of all config command parameters.
Definition: serial_cmd.h:274
uint16_t network_key_index
Network key index.
Definition: serial_cmd.h:325
Mesh packet send command parameters.
Definition: serial_cmd.h:491
Used for initializing one of the available models.
Definition: serial_cmd.h:665
TX power config command parameters.
Definition: serial_cmd.h:262
Header for the model specific events.
Definition: serial_types.h:95
serial_cmd_pb_remote_client_init_t init
Initialize PB-Mesh client.
Definition: serial_cmd.h:572
uint8_t beacon_slot
Slot number of the beacon to set the payload for.
Definition: serial_cmd.h:212
serial_cmd_model_specific_command_header_t model_cmd_info
Contains the handle of the model being addressed.
Definition: serial_cmd.h:676
ECDH shared secret data parameters.
Definition: serial_cmd.h:350
DFU bank info get command parameters.
Definition: serial_cmd.h:595
Start remote provisioning command.
Definition: serial_cmd.h:560
#define NRF_MESH_ECDH_PUBLIC_KEY_SIZE
Size of an ECDH public key.
Mesh subnet delete command parameters.
Definition: serial_cmd.h:383
uint16_t dsm_handle_t
DSM handle type, used for the handles returned for the each set of data added.
serial_cmd_config_channel_map_t channel_map
Channel map.
Definition: serial_cmd.h:277
Used to update the publish period of a model by updating resolution and number of steps...
Definition: serial_cmd.h:651
serial_cmd_mesh_addr_local_unicast_set_t local_unicast_addr_set
Address local unicast set parameters.
Definition: serial_cmd.h:521
uint8_t beacon_slot
Slot number of the beacon to stop.
Definition: serial_cmd.h:219
uint8_t context_id
ID of context to set the oob method for.
Definition: serial_cmd.h:336
uint16_t input_oob_actions
Available input actions for OOB authentication.
Definition: serial_cmd.h:316
uint32_t interval_ms
TX interval in milliseconds.
Definition: serial_cmd.h:228
Mesh subnet update command parameters.
Definition: serial_cmd.h:376
Used by various access commands that work on address handles for a given model.
Definition: serial_cmd.h:617
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:565
Beacon params get cmd parameters.
Definition: serial_cmd.h:232
serial_cmd_config_uuid_t uuid
Device UUID.
Definition: serial_cmd.h:279
serial_cmd_openmesh_t openmesh
OpenMesh parameters.
Definition: serial_cmd.h:708
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:632
Mes address subscription add virtual command parameters.
Definition: serial_cmd.h:461
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:661
DFU relay command parameters.
Definition: serial_cmd.h:588
uint8_t beacon_slot
Slot number of the beacon to get the parameters of.
Definition: serial_cmd.h:234
DFU request command parameters.
Definition: serial_cmd.h:580
uint8_t channel_map
Channel map bitfield for mesh to use, starting at channel 37.
Definition: serial_cmd.h:258
serial_cmd_mesh_addr_add_t addr_add
Address add parameters.
Definition: serial_cmd.h:522
serial_cmd_config_adv_addr_t adv_addr
Advertising address.
Definition: serial_cmd.h:276
Used to update the location field of an element.
Definition: serial_cmd.h:630
uint8_t application_index
Application context index.
Definition: serial_cmd.h:544
uint8_t context_id
ID of the context to set the shared secret for.
Definition: serial_cmd.h:352
serial_cmd_mesh_addr_subscription_add_virtual_t addr_subscription_add_virtual
Virtual subscription address add parameters.
Definition: serial_cmd.h:527
Mesh command parameters.
Definition: serial_cmd.h:507
Start remote scanning command.
Definition: serial_cmd.h:548
Authentication data parameters.
Definition: serial_cmd.h:343
serial_cmd_prov_keypair_t keypair
Parameters for the Set keypair packet.
Definition: serial_cmd.h:359
serial_cmd_mesh_addr_publication_add_virtual_t addr_publication_add_virtual
Virtual publication address add parameters.
Definition: serial_cmd.h:531
Cancel remote scanning command.
Definition: serial_cmd.h:554
Mesh address add command parameters.
Definition: serial_cmd.h:437
uint16_t count
Number of addresses in the range of unicast addresses.
Definition: serial_cmd.h:433
Mesh address publication add virtual command parameters.
Definition: serial_cmd.h:479
Union of all device command parameters.
Definition: serial_cmd.h:238
dsm_handle_t dsm_handle
Handle for a value (e.g.
Definition: serial_cmd.h:620
#define NRF_MESH_ECDH_SHARED_SECRET_SIZE
Size of an ECDH shared secret.
uint8_t input_oob_size
Maximum size of the OOB authentication input.
Definition: serial_cmd.h:315
uint16_t subnet_handle
Handle of the subnetwork to add the appkey to.
Definition: serial_cmd.h:392
serial_cmd_pb_remote_client_remote_scan_start_t remote_scan_start
Start remote scanning procedure.
Definition: serial_cmd.h:573
uint32_t bank_addr
Address in which to bank firmware.
Definition: serial_cmd.h:584
Used by access commands that only require the element index.
Definition: serial_cmd.h:659
uint8_t ttl
Time To Live value to use in packet.
Definition: serial_cmd.h:496
serial_cmd_mesh_appkey_update_t appkey_update
Appkey update parameters.
Definition: serial_cmd.h:514
uint8_t beacon_slot
Slot number of the beacon to start.
Definition: serial_cmd.h:225
access_model_handle_t handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:626
OOB method selection parameters.
Definition: serial_cmd.h:334
uint16_t appkey_handle
Appkey or devkey handle to use for packet sending.
Definition: serial_cmd.h:493
Mesh local unicast address set command parameters.
Definition: serial_cmd.h:430
serial_cmd_application_t application
Application parameters.
Definition: serial_cmd.h:713
serial_cmd_prov_oob_use_t oob_use
Parameters for the OOB use packet.
Definition: serial_cmd.h:362
uint16_t owner_addr
Unicast address of the device that owns the given devkey.
Definition: serial_cmd.h:418
access_model_handle_t model_handle
Handle for the model being modified.
Definition: serial_cmd.h:619
serial_cmd_mesh_addr_virtual_add_t addr_virtual_add
Virtual address add parameters.
Definition: serial_cmd.h:523
serial_cmd_mesh_devkey_delete_t devkey_delete
Devkey delete parameters.
Definition: serial_cmd.h:519
uint8_t element_index
Element index.
Definition: serial_cmd.h:542
uint8_t iv_update_flag
IV update in progress flag.
Definition: serial_cmd.h:328
Mesh appkey update command parameters.
Definition: serial_cmd.h:397
Mesh appkey delete command parameters.
Definition: serial_cmd.h:404
serial_cmd_config_tx_power_t tx_power
Radio transmit power.
Definition: serial_cmd.h:278
Mesh address virtual add command parameters.
Definition: serial_cmd.h:443
uint8_t num_elements
The number of elements in the device.
Definition: serial_cmd.h:307
uint8_t attention_duration_s
Time in seconds during which the device will identify itself using any means it can.
Definition: serial_cmd.h:330
serial_cmd_device_t device
Device parameters.
Definition: serial_cmd.h:706
serial_cmd_pb_remote_t pb_remote
PB-MESH parameters.
Definition: serial_cmd.h:712
serial_cmd_mesh_t mesh
Mesh parameters.
Definition: serial_cmd.h:710
serial_cmd_dfu_bank_flash_t bank_flash
DFU bank flash parameters.
Definition: serial_cmd.h:612
uint16_t app_key_index
Mesh-global key index.
Definition: serial_cmd.h:391
Mesh address subscription remove command parameters.
Definition: serial_cmd.h:467
Union of all provisioning command parameters.
Definition: serial_cmd.h:357
uint8_t dfu_type
DFU Firmware type to request.
Definition: serial_cmd.h:582
serial_cmd_mesh_devkey_add_t devkey_add
Devkey add parameters.
Definition: serial_cmd.h:518
uint16_t address_handle
Handle of address to get raw representation of.
Definition: serial_cmd.h:451
serial_cmd_prov_ecdh_data_t ecdh_data
Parameters for the ECDH shared secret packet.
Definition: serial_cmd.h:364
uint16_t address
Address to add as a subscription address.
Definition: serial_cmd.h:457
access_model_id_t model_id
Company and model IDs.
Definition: serial_cmd.h:647
uint8_t dfu_type
DFU Firmware type to flash.
Definition: serial_cmd.h:603
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:556
uint8_t tx_power
Transmit power of radio, see serial_cmd_tx_power_value_t for accepted values.
Definition: serial_cmd.h:264
Used by access commands that only require the model handle.
Definition: serial_cmd.h:624
uint8_t resolution
see access_publish_resolution_t for accepted values.
Definition: serial_cmd.h:654
serial_cmd_mesh_appkey_delete_t appkey_delete
Appkey delete parameters.
Definition: serial_cmd.h:515
ACCESS layer command parameters.
Definition: serial_cmd.h:682
serial_cmd_config_t config
Configuration parameters.
Definition: serial_cmd.h:707
serial_cmd_pb_remote_client_remote_provision_t remote_provision
Start remote provisioning.
Definition: serial_cmd.h:575
#define NRF_MESH_ECDH_PRIVATE_KEY_SIZE
Size of an ECDH private key.
serial_cmd_access_t access
Used for Access layer and Model interfacing.
Definition: serial_cmd.h:705
serial_cmd_mesh_subnet_add_t subnet_add
Subnet add parameters.
Definition: serial_cmd.h:509
Used to get the handle value for a model instance.
Definition: serial_cmd.h:644
uint8_t context_id
Context ID to use for this provisioning session.
Definition: serial_cmd.h:322
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:326
serial_cmd_prov_data_t data
Parameters for the Provisioning data packet.
Definition: serial_cmd.h:361
Header for the model specific events.
Definition: serial_types.h:102
Union of all command parameters.
Definition: serial_cmd.h:703
Mesh address get command parameters.
Definition: serial_cmd.h:449
Beacon params set cmd parameters.
Definition: serial_cmd.h:223
nrf_mesh_fwid_t fwid
Firmware ID to request.
Definition: serial_cmd.h:583
uint16_t subnet_handle
Handle of the subnet to delete.
Definition: serial_cmd.h:385
uint8_t unprovisioned_device_index
Unprovisioned device index.
Definition: serial_cmd.h:563
Mesh appkey get all command parameters.
Definition: serial_cmd.h:410
Mesh appkey add command parameters.
Definition: serial_cmd.h:389
serial_cmd_dfu_t dfu
DFU parameters.
Definition: serial_cmd.h:711
Beacon start cmd parameters.
Definition: serial_cmd.h:210
Mesh devkey delete command parameters.
Definition: serial_cmd.h:424
serial_cmd_mesh_appkey_get_all_t appkey_get_all
Appkey get all parameters.
Definition: serial_cmd.h:516
Mesh address subscription add command parameters.
Definition: serial_cmd.h:455
serial_cmd_device_beacon_params_set_t beacon_params_set
Beacon params set parameters.
Definition: serial_cmd.h:243
Union of all config command parameters.
Definition: serial_cmd.h:290
serial_cmd_openmesh_dfu_data_t dfu_data
DFU data parameters.
Definition: serial_cmd.h:292
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:639
Access layer model ID.
Definition: access.h:151
uint8_t key_refresh_flag
Key refresh in progress flag.
Definition: serial_cmd.h:329
nrf_mesh_fwid_t fwid
Firmware ID of firmware that should be relayed.
Definition: serial_cmd.h:591
uint8_t context_id
ID of the context to set the authentication data for.
Definition: serial_cmd.h:345
uint8_t tx_power
TX Power value, must be a value from serial_cmd_tx_power_value_t.
Definition: serial_cmd.h:226
Used for sending commands to one of the initialized models.
Definition: serial_cmd.h:674
uint16_t address_handle
Handle of address to remove from address subscription list.
Definition: serial_cmd.h:469
uint8_t friendship_credential_flag
Control parameter for credentials used to publish messages from a model.
Definition: serial_cmd.h:499
PB-Mesh client commands.
Definition: serial_cmd.h:570
uint8_t channel_map
Channel map bitfield for beacon, starting at channel 37.
Definition: serial_cmd.h:227
DFU data parameters.
Definition: serial_cmd.h:284
uint8_t transmic_size
Transport MIC size used enum.
Definition: serial_cmd.h:498
uint8_t ttl
TTL for outgoing messages.
Definition: serial_cmd.h:640
uint16_t appkey_handle
Handle of the appkey to change.
Definition: serial_cmd.h:399
ID of a standalone firmware segment.
Mesh address publication remove command parameters.
Definition: serial_cmd.h:485
uint8_t oob_method
OOB method to use, see nrf_mesh_prov_oob_method_t for accepted values.
Definition: serial_cmd.h:337
uint16_t output_oob_actions
Available output actions for OOB authentication.
Definition: serial_cmd.h:313
Provisioning provision command parameters.
Definition: serial_cmd.h:320
Application command parameters.
Definition: serial_cmd.h:697
Provisioning set capabilities parameters.
Definition: serial_cmd.h:305
uint8_t addr_type
BLE advertising address type.
Definition: serial_cmd.h:251
serial_cmd_dfu_request_t request
DFU request parameters.
Definition: serial_cmd.h:609
serial_cmd_mesh_addr_get_t addr_get
Address get parameters.
Definition: serial_cmd.h:524
Initialize PB-MESH Client.
Definition: serial_cmd.h:540
uint8_t static_oob_types
The types of static OOB authentication methods.
Definition: serial_cmd.h:310
Beacon stop cmd parameters.
Definition: serial_cmd.h:217
DFU bank flash command parameters.
Definition: serial_cmd.h:601
serial_cmd_device_beacon_stop_t beacon_stop
Beacon stop parameters.
Definition: serial_cmd.h:242
uint8_t oob_action
OOB action to use, see nrf_mesh_prov_input_action_t or nrf_mesh_prov_output_action_t for values...
Definition: serial_cmd.h:338
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:566
#define NRF_MESH_STATIC_ASSERT(...)
Compile-time assertion.
uint16_t dst_addr_handle
Handle of destination address to use in packet.
Definition: serial_cmd.h:495
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:562
UUID config command parameters.
Definition: serial_cmd.h:268
uint16_t net_key_index
Mesh-global key index.
Definition: serial_cmd.h:371
uint8_t output_oob_size
Maximum size of the OOB authentication output.
Definition: serial_cmd.h:312
uint16_t raw_address
Raw representation of the address to add.
Definition: serial_cmd.h:439
uint8_t dfu_type
DFU Firmware type to relay.
Definition: serial_cmd.h:590
serial_cmd_mesh_subnet_delete_t subnet_delete
Subnet delete parameters.
Definition: serial_cmd.h:511
uint16_t subnet_handle
Handle of the subnet to change.
Definition: serial_cmd.h:378
serial_cmd_dfu_relay_t relay
DFU relay parameters.
Definition: serial_cmd.h:610
uint16_t address
Address to add as a publication address.
Definition: serial_cmd.h:475
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:327
uint8_t force_segmented
Whether or not to force use of segmented message type for the transmission.
Definition: serial_cmd.h:497
uint8_t public_key_type
The type of public key used in the device.
Definition: serial_cmd.h:308
uint16_t location
Location value for the element.
Definition: serial_cmd.h:633
#define NRF_MESH_SERIAL_PAYLOAD_MAXLEN
Maximum length of a serial packet&#39;s payload.

Documentation feedback | Developer Zone | Subscribe | Updated