nRF5 SDK for Mesh v2.2.0
serial_cmd.h
1 /* Copyright (c) 2010 - 2018, 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;
331 
333 typedef struct __attribute((packed))
334 {
335  uint8_t context_id;
336  uint8_t oob_method;
337  uint8_t oob_action;
338  uint8_t size;
340 
342 typedef struct __attribute((packed))
343 {
344  uint8_t context_id;
345  uint8_t data[16];
347 
349 typedef struct __attribute((packed))
350 {
351  uint8_t context_id;
352  uint8_t shared_secret[NRF_MESH_ECDH_SHARED_SECRET_SIZE];
354 
356 typedef union __attribute((packed))
357 {
365 
366 /******************* Mesh commands *********************/
368 typedef struct __attribute((packed))
369 {
370  uint16_t net_key_index;
371  uint8_t key[NRF_MESH_KEY_SIZE];
373 
375 typedef struct __attribute((packed))
376 {
377  uint16_t subnet_handle;
378  uint8_t key[NRF_MESH_KEY_SIZE];
380 
382 typedef struct __attribute((packed))
383 {
384  uint16_t subnet_handle;
386 
388 typedef struct __attribute((packed))
389 {
390  uint16_t app_key_index;
391  uint16_t subnet_handle;
392  uint8_t key[NRF_MESH_KEY_SIZE];
394 
396 typedef struct __attribute((packed))
397 {
398  uint16_t appkey_handle;
399  uint8_t key[NRF_MESH_KEY_SIZE];
401 
403 typedef struct __attribute((packed))
404 {
405  uint16_t appkey_handle;
407 
409 typedef struct __attribute((packed))
410 {
411  uint16_t subnet_handle;
413 
415 typedef struct __attribute((packed))
416 {
417  uint16_t owner_addr;
418  uint16_t subnet_handle;
419  uint8_t key[NRF_MESH_KEY_SIZE];
421 
423 typedef struct __attribute((packed))
424 {
425  uint16_t devkey_handle;
427 
429 typedef struct __attribute((packed))
430 {
431  uint16_t start_address;
432  uint16_t count;
434 
436 typedef struct __attribute((packed))
437 {
438  uint16_t raw_address;
440 
442 typedef struct __attribute((packed))
443 {
444  uint8_t virtual_addr_uuid[NRF_MESH_UUID_SIZE];
446 
448 typedef struct __attribute((packed))
449 {
450  uint16_t address_handle;
452 
454 typedef struct __attribute((packed))
455 {
456  uint16_t address;
458 
460 typedef struct __attribute((packed))
461 {
462  uint8_t uuid[NRF_MESH_UUID_SIZE];
464 
466 typedef struct __attribute((packed))
467 {
468  uint16_t address_handle;
470 
472 typedef struct __attribute((packed))
473 {
474  uint16_t address;
476 
478 typedef struct __attribute((packed))
479 {
480  uint8_t uuid[NRF_MESH_UUID_SIZE];
482 
484 typedef struct __attribute((packed))
485 {
486  uint16_t address_handle;
488 
490 typedef struct __attribute((packed))
491 {
492  uint16_t appkey_handle;
493  uint16_t src_addr;
494  uint16_t dst_addr_handle;
495  uint8_t ttl;
496  uint8_t force_segmented;
497  uint8_t transmic_size;
500 
502 
503 
505 typedef union __attribute((packed))
506 {
534 
535 /* **** PB-MESH Client **** */
536 
538 typedef struct __attribute((packed))
539 {
540  uint8_t element_index;
544 
546 typedef struct __attribute((packed))
547 {
548  uint16_t server_address;
550 
552 typedef struct __attribute((packed))
553 {
554  uint16_t server_address;
556 
558 typedef struct __attribute((packed))
559 {
560  uint16_t server_address;
562  uint8_t network_key[NRF_MESH_KEY_SIZE];
563  uint32_t iv_index;
564  uint16_t address;
566 
568 typedef union __attribute((packed))
569 {
575 
576 /*********** DFU commands ***************/
578 typedef struct __attribute((packed))
579 {
580  uint8_t dfu_type;
582  uint32_t bank_addr;
584 
586 typedef struct __attribute((packed))
587 {
588  uint8_t dfu_type;
591 
593 typedef struct __attribute((packed))
594 {
595  uint8_t dfu_type;
597 
599 typedef struct __attribute((packed))
600 {
601  uint8_t dfu_type;
603 
605 typedef union __attribute((packed))
606 {
612 
613 /*********** Access commands ************/
615 typedef struct __attribute((packed))
616 {
620 
622 typedef struct __attribute((packed))
623 {
626 
628 typedef struct __attribute((packed))
629 {
630  uint16_t element_index;
631  uint16_t location;
633 
635 typedef struct __attribute((packed))
636 {
638  uint8_t ttl;
640 
642 typedef struct __attribute((packed))
643 {
644  uint16_t element_index;
647 
649 typedef struct __attribute((packed))
650 {
652  uint8_t resolution;
653  uint8_t step_number;
655 
657 typedef struct __attribute((packed))
658 {
659  uint16_t element_index;
661 
663 typedef struct __attribute((packed))
664 {
668 
669 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_init_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
670 
672 typedef struct __attribute((packed))
673 {
677 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_command_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
678 
680 typedef union __attribute((packed))
681 {
687  serial_cmd_access_pub_period_set_t publish_period;
689  serial_cmd_model_specific_init_t model_init;
690  serial_cmd_model_specific_command_t model_cmd;
692 
693 /*********** App commands ***************/
695 typedef struct __attribute((packed))
696 {
699 
701 typedef union __attribute((packed))
702 {
712 } serial_cmd_t;
713 
714 /*lint -align_max(pop) */
717 #endif
uint16_t devkey_handle
Handle of the devkey to delete.
Definition: serial_cmd.h:425
uint16_t subnet_handle
Handle of the subnetwork to bind the devkey to.
Definition: serial_cmd.h:418
serial_cmd_mesh_addr_publication_add_t addr_publication_add
Publication address add parameters.
Definition: serial_cmd.h:528
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:548
serial_cmd_mesh_addr_publication_remove_t addr_publication_remove
Publication address remove parameters.
Definition: serial_cmd.h:530
#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:635
serial_cmd_mesh_appkey_add_t appkey_add
Appkey add parameters.
Definition: serial_cmd.h:511
uint8_t dfu_type
DFU Firmware type to get bank info about.
Definition: serial_cmd.h:595
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:651
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
Mesh devkey add command parameters.
Definition: serial_cmd.h:415
serial_cmd_prov_t prov
Provisioning parameters.
Definition: serial_cmd.h:707
uint16_t element_index
Index of the addressed element which owns the model.
Definition: serial_cmd.h:644
uint8_t prov_context_index
Provisioning context index.
Definition: serial_cmd.h:541
serial_cmd_mesh_packet_send_t packet_send
Packet send parameters.
Definition: serial_cmd.h:532
serial_cmd_mesh_addr_subscription_add_t addr_subscription_add
Subscription address add parameters.
Definition: serial_cmd.h:524
#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:665
Mesh address publication add command parameters.
Definition: serial_cmd.h:472
serial_cmd_dfu_bank_info_get_t bank_info
DFU bank info parameters.
Definition: serial_cmd.h:609
serial_cmd_pb_remote_client_remote_scan_cancel_t remote_scan_cancel
Cancel remote scanning procedure.
Definition: serial_cmd.h:572
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:362
Mesh subnet add command parameters.
Definition: serial_cmd.h:368
uint16_t src_addr
Raw unicast address to use as source address.
Definition: serial_cmd.h:493
uint16_t address_handle
Handle of the address to remove from the publication address list.
Definition: serial_cmd.h:486
serial_cmd_mesh_addr_subscription_remove_t addr_subscription_remove
Subscription address remove parameters.
Definition: serial_cmd.h:526
uint8_t step_number
Must not be larger than ACCESS_PUBLISH_PERIOD_STEP_MAX.
Definition: serial_cmd.h:653
uint8_t size
Size of the OOB data.
Definition: serial_cmd.h:338
DFU command parameters.
Definition: serial_cmd.h:605
uint16_t subnet_handle
Handle of the subnet to get all appkeys of.
Definition: serial_cmd.h:411
uint16_t start_address
First address in the range of unicast addresses.
Definition: serial_cmd.h:431
serial_cmd_mesh_subnet_update_t subnet_update
Subnet update parameters.
Definition: serial_cmd.h:508
Echo cmd parameters.
Definition: serial_cmd.h:204
uint16_t appkey_handle
Handle of the appkey to delete.
Definition: serial_cmd.h:405
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:359
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
#define NRF_MESH_STATIC_ASSERT(cond)
Compile-time assertion.
Mesh packet send command parameters.
Definition: serial_cmd.h:490
Used for initializing one of the available models.
Definition: serial_cmd.h:663
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:570
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:674
ECDH shared secret data parameters.
Definition: serial_cmd.h:349
DFU bank info get command parameters.
Definition: serial_cmd.h:593
Start remote provisioning command.
Definition: serial_cmd.h:558
#define NRF_MESH_ECDH_PUBLIC_KEY_SIZE
Size of an ECDH public key.
Mesh subnet delete command parameters.
Definition: serial_cmd.h:382
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:649
serial_cmd_mesh_addr_local_unicast_set_t local_unicast_addr_set
Address local unicast set parameters.
Definition: serial_cmd.h:519
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:335
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:375
Used by various access commands that work on address handles for a given model.
Definition: serial_cmd.h:615
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:563
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:706
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:630
Mes address subscription add virtual command parameters.
Definition: serial_cmd.h:460
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:659
DFU relay command parameters.
Definition: serial_cmd.h:586
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:578
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:520
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:628
uint8_t application_index
Application context index.
Definition: serial_cmd.h:542
uint8_t context_id
ID of the context to set the shared secret for.
Definition: serial_cmd.h:351
serial_cmd_mesh_addr_subscription_add_virtual_t addr_subscription_add_virtual
Virtual subscription address add parameters.
Definition: serial_cmd.h:525
Mesh command parameters.
Definition: serial_cmd.h:505
Start remote scanning command.
Definition: serial_cmd.h:546
Authentication data parameters.
Definition: serial_cmd.h:342
serial_cmd_prov_keypair_t keypair
Parameters for the Set keypair packet.
Definition: serial_cmd.h:358
serial_cmd_mesh_addr_publication_add_virtual_t addr_publication_add_virtual
Virtual publication address add parameters.
Definition: serial_cmd.h:529
Cancel remote scanning command.
Definition: serial_cmd.h:552
Mesh address add command parameters.
Definition: serial_cmd.h:436
uint16_t count
Number of addresses in the range of unicast addresses.
Definition: serial_cmd.h:432
Mesh address publication add virtual command parameters.
Definition: serial_cmd.h:478
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:618
#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:391
serial_cmd_pb_remote_client_remote_scan_start_t remote_scan_start
Start remote scanning procedure.
Definition: serial_cmd.h:571
uint32_t bank_addr
Address in which to bank firmware.
Definition: serial_cmd.h:582
Used by access commands that only require the element index.
Definition: serial_cmd.h:657
uint8_t ttl
Time To Live value to use in packet.
Definition: serial_cmd.h:495
serial_cmd_mesh_appkey_update_t appkey_update
Appkey update parameters.
Definition: serial_cmd.h:512
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:624
OOB method selection parameters.
Definition: serial_cmd.h:333
uint16_t appkey_handle
Appkey or devkey handle to use for packet sending.
Definition: serial_cmd.h:492
Mesh local unicast address set command parameters.
Definition: serial_cmd.h:429
serial_cmd_application_t application
Application parameters.
Definition: serial_cmd.h:711
serial_cmd_prov_oob_use_t oob_use
Parameters for the OOB use packet.
Definition: serial_cmd.h:361
uint16_t owner_addr
Unicast address of the device that owns the given devkey.
Definition: serial_cmd.h:417
access_model_handle_t model_handle
Handle for the model being modified.
Definition: serial_cmd.h:617
serial_cmd_mesh_addr_virtual_add_t addr_virtual_add
Virtual address add parameters.
Definition: serial_cmd.h:521
serial_cmd_mesh_devkey_delete_t devkey_delete
Devkey delete parameters.
Definition: serial_cmd.h:517
uint8_t element_index
Element index.
Definition: serial_cmd.h:540
uint8_t iv_update_flag
IV update in progress flag.
Definition: serial_cmd.h:328
Mesh appkey update command parameters.
Definition: serial_cmd.h:396
Mesh appkey delete command parameters.
Definition: serial_cmd.h:403
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:442
uint8_t num_elements
The number of elements in the device.
Definition: serial_cmd.h:307
serial_cmd_device_t device
Device parameters.
Definition: serial_cmd.h:704
serial_cmd_pb_remote_t pb_remote
PB-MESH parameters.
Definition: serial_cmd.h:710
serial_cmd_mesh_t mesh
Mesh parameters.
Definition: serial_cmd.h:708
serial_cmd_dfu_bank_flash_t bank_flash
DFU bank flash parameters.
Definition: serial_cmd.h:610
uint16_t app_key_index
Mesh-global key index.
Definition: serial_cmd.h:390
Mesh address subscription remove command parameters.
Definition: serial_cmd.h:466
Union of all provisioning command parameters.
Definition: serial_cmd.h:356
uint8_t dfu_type
DFU Firmware type to request.
Definition: serial_cmd.h:580
serial_cmd_mesh_devkey_add_t devkey_add
Devkey add parameters.
Definition: serial_cmd.h:516
uint16_t address_handle
Handle of address to get raw representation of.
Definition: serial_cmd.h:450
serial_cmd_prov_ecdh_data_t ecdh_data
Parameters for the ECDH shared secret packet.
Definition: serial_cmd.h:363
uint16_t address
Address to add as a subscription address.
Definition: serial_cmd.h:456
access_model_id_t model_id
Company and model IDs.
Definition: serial_cmd.h:645
uint8_t dfu_type
DFU Firmware type to flash.
Definition: serial_cmd.h:601
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:554
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:622
uint8_t resolution
see access_publish_resolution_t for accepted values.
Definition: serial_cmd.h:652
serial_cmd_mesh_appkey_delete_t appkey_delete
Appkey delete parameters.
Definition: serial_cmd.h:513
ACCESS layer command parameters.
Definition: serial_cmd.h:680
serial_cmd_config_t config
Configuration parameters.
Definition: serial_cmd.h:705
serial_cmd_pb_remote_client_remote_provision_t remote_provision
Start remote provisioning.
Definition: serial_cmd.h:573
#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:703
serial_cmd_mesh_subnet_add_t subnet_add
Subnet add parameters.
Definition: serial_cmd.h:507
Used to get the handle value for a model instance.
Definition: serial_cmd.h:642
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:360
Header for the model specific events.
Definition: serial_types.h:102
Union of all command parameters.
Definition: serial_cmd.h:701
Mesh address get command parameters.
Definition: serial_cmd.h:448
Beacon params set cmd parameters.
Definition: serial_cmd.h:223
nrf_mesh_fwid_t fwid
Firmware ID to request.
Definition: serial_cmd.h:581
uint16_t subnet_handle
Handle of the subnet to delete.
Definition: serial_cmd.h:384
uint8_t unprovisioned_device_index
Unprovisioned device index.
Definition: serial_cmd.h:561
Mesh appkey get all command parameters.
Definition: serial_cmd.h:409
Mesh appkey add command parameters.
Definition: serial_cmd.h:388
serial_cmd_dfu_t dfu
DFU parameters.
Definition: serial_cmd.h:709
Beacon start cmd parameters.
Definition: serial_cmd.h:210
Mesh devkey delete command parameters.
Definition: serial_cmd.h:423
serial_cmd_mesh_appkey_get_all_t appkey_get_all
Appkey get all parameters.
Definition: serial_cmd.h:514
Mesh address subscription add command parameters.
Definition: serial_cmd.h:454
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:637
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:589
uint8_t context_id
ID of the context to set the authentication data for.
Definition: serial_cmd.h:344
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:672
uint16_t address_handle
Handle of address to remove from address subscription list.
Definition: serial_cmd.h:468
PB-Mesh client commands.
Definition: serial_cmd.h:568
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:497
uint8_t ttl
TTL for outgoing messages.
Definition: serial_cmd.h:638
uint16_t appkey_handle
Handle of the appkey to change.
Definition: serial_cmd.h:398
ID of a standalone firmware segment.
Mesh address publication remove command parameters.
Definition: serial_cmd.h:484
uint8_t oob_method
OOB method to use, see nrf_mesh_prov_oob_method_t for accepted values.
Definition: serial_cmd.h:336
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:695
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:607
serial_cmd_mesh_addr_get_t addr_get
Address get parameters.
Definition: serial_cmd.h:522
Initialize PB-MESH Client.
Definition: serial_cmd.h:538
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:599
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:337
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:564
uint16_t dst_addr_handle
Handle of destination address to use in packet.
Definition: serial_cmd.h:494
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:560
UUID config command parameters.
Definition: serial_cmd.h:268
uint16_t net_key_index
Mesh-global key index.
Definition: serial_cmd.h:370
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:438
uint8_t dfu_type
DFU Firmware type to relay.
Definition: serial_cmd.h:588
serial_cmd_mesh_subnet_delete_t subnet_delete
Subnet delete parameters.
Definition: serial_cmd.h:509
uint16_t subnet_handle
Handle of the subnet to change.
Definition: serial_cmd.h:377
serial_cmd_dfu_relay_t relay
DFU relay parameters.
Definition: serial_cmd.h:608
uint16_t address
Address to add as a publication address.
Definition: serial_cmd.h:474
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:496
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:631
#define NRF_MESH_SERIAL_PAYLOAD_MAXLEN
Maximum length of a serial packet&#39;s payload.

Documentation feedback | Developer Zone | Subscribe | Updated