nRF5 SDK for Mesh v2.1.1
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_RANGE_DEVICE_END (0x1F)
71 #define SERIAL_OPCODE_CMD_RANGE_APP_START (0x20)
72 #define SERIAL_OPCODE_CMD_APP_APPLICATION (0x20)
73 #define SERIAL_OPCODE_CMD_RANGE_APP_END (0x20)
75 #define SERIAL_OPCODE_CMD_RANGE_SAR_START (0x21)
76 #define SERIAL_OPCODE_CMD_SAR_START (0x21)
77 #define SERIAL_OPCODE_CMD_SAR_CONTINUE (0x22)
78 #define SERIAL_OPCODE_CMD_RANGE_SAR_END (0x22)
80 #define SERIAL_OPCODE_CMD_RANGE_CONFIG_START (0x40)
81 #define SERIAL_OPCODE_CMD_CONFIG_ADV_ADDR_SET (0x40)
82 #define SERIAL_OPCODE_CMD_CONFIG_ADV_ADDR_GET (0x41)
83 #define SERIAL_OPCODE_CMD_CONFIG_CHANNEL_MAP_SET (0x42)
84 #define SERIAL_OPCODE_CMD_CONFIG_CHANNEL_MAP_GET (0x43)
85 #define SERIAL_OPCODE_CMD_CONFIG_TX_POWER_SET (0x44)
86 #define SERIAL_OPCODE_CMD_CONFIG_TX_POWER_GET (0x45)
87 #define SERIAL_OPCODE_CMD_CONFIG_UUID_SET (0x53)
88 #define SERIAL_OPCODE_CMD_CONFIG_UUID_GET (0x54)
89 #define SERIAL_OPCODE_CMD_RANGE_CONFIG_END (0x5F)
91 #define SERIAL_OPCODE_CMD_RANGE_PROV_START (0x60)
92 #define SERIAL_OPCODE_CMD_PROV_SCAN_START (0x61)
93 #define SERIAL_OPCODE_CMD_PROV_SCAN_STOP (0x62)
94 #define SERIAL_OPCODE_CMD_PROV_PROVISION (0x63)
95 #define SERIAL_OPCODE_CMD_PROV_LISTEN (0x64)
96 #define SERIAL_OPCODE_CMD_PROV_OOB_USE (0x66)
97 #define SERIAL_OPCODE_CMD_PROV_AUTH_DATA (0x67)
98 #define SERIAL_OPCODE_CMD_PROV_ECDH_SECRET (0x68)
99 #define SERIAL_OPCODE_CMD_PROV_KEYPAIR_SET (0x69)
100 #define SERIAL_OPCODE_CMD_PROV_CAPABILITIES_SET (0x6A)
101 #define SERIAL_OPCODE_CMD_RANGE_PROV_END (0x6F)
103 #define SERIAL_OPCODE_CMD_RANGE_OPENMESH_START (0x70)
104 #define SERIAL_OPCODE_CMD_OPENMESH_INIT (0x70)
105 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_SET (0x71)
106 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_ENABLE (0x72)
107 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_DISABLE (0x73)
108 #define SERIAL_OPCODE_CMD_OPENMESH_START (0x74)
109 #define SERIAL_OPCODE_CMD_OPENMESH_STOP (0x75)
110 #define SERIAL_OPCODE_CMD_OPENMESH_FLAG_SET (0x76)
111 #define SERIAL_OPCODE_CMD_OPENMESH_FLAG_GET (0x77)
112 #define SERIAL_OPCODE_CMD_OPENMESH_DFU_DATA (0x78)
113 #define SERIAL_OPCODE_CMD_OPENMESH_VALUE_GET (0x7A)
114 #define SERIAL_OPCODE_CMD_OPENMESH_BUILD_VERSION_GET (0x7B)
115 #define SERIAL_OPCODE_CMD_OPENMESH_ACCESS_ADDR_GET (0x7C)
116 #define SERIAL_OPCODE_CMD_OPENMESH_CHANNEL_GET (0x7D)
117 #define SERIAL_OPCODE_CMD_OPENMESH_INTERVAL_MIN_MS_GET (0x7F)
118 #define SERIAL_OPCODE_CMD_RANGE_OPENMESH_END (0x8F)
121 #define SERIAL_OPCODE_CMD_RANGE_MESH_START (0x90)
123 #define SERIAL_OPCODE_CMD_MESH_ENABLE (0x90)
124 #define SERIAL_OPCODE_CMD_MESH_DISABLE (0x91)
125 #define SERIAL_OPCODE_CMD_MESH_SUBNET_ADD (0x92)
126 #define SERIAL_OPCODE_CMD_MESH_SUBNET_UPDATE (0x93)
127 #define SERIAL_OPCODE_CMD_MESH_SUBNET_DELETE (0x94)
128 #define SERIAL_OPCODE_CMD_MESH_SUBNET_GET_ALL (0x95)
129 #define SERIAL_OPCODE_CMD_MESH_SUBNET_COUNT_MAX_GET (0x96)
130 #define SERIAL_OPCODE_CMD_MESH_APPKEY_ADD (0x97)
131 #define SERIAL_OPCODE_CMD_MESH_APPKEY_UPDATE (0x98)
132 #define SERIAL_OPCODE_CMD_MESH_APPKEY_DELETE (0x99)
133 #define SERIAL_OPCODE_CMD_MESH_APPKEY_GET_ALL (0x9A)
134 #define SERIAL_OPCODE_CMD_MESH_APPKEY_COUNT_MAX_GET (0x9B)
135 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_ADD (0x9C)
136 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_DELETE (0x9D)
137 #define SERIAL_OPCODE_CMD_MESH_DEVKEY_COUNT_MAX_GET (0x9E)
138 #define SERIAL_OPCODE_CMD_MESH_ADDR_LOCAL_UNICAST_SET (0x9F)
139 #define SERIAL_OPCODE_CMD_MESH_ADDR_LOCAL_UNICAST_GET (0xA0)
140 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_ADD (0xA1)
141 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_ADD_VIRTUAL (0xA2)
142 #define SERIAL_OPCODE_CMD_MESH_ADDR_SUBSCRIPTION_REMOVE (0xA3)
143 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_ADD (0xA4)
144 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_ADD_VIRTUAL (0xA5)
145 #define SERIAL_OPCODE_CMD_MESH_ADDR_PUBLICATION_REMOVE (0xA6)
146 #define SERIAL_OPCODE_CMD_MESH_ADDR_GET (0xA7)
147 #define SERIAL_OPCODE_CMD_MESH_ADDR_GET_ALL (0xA8)
148 #define SERIAL_OPCODE_CMD_MESH_ADDR_NONVIRTUAL_COUNT_MAX_GET (0xA9)
149 #define SERIAL_OPCODE_CMD_MESH_ADDR_VIRTUAL_COUNT_MAX_GET (0xAA)
150 #define SERIAL_OPCODE_CMD_MESH_PACKET_SEND (0xAB)
151 #define SERIAL_OPCODE_CMD_MESH_STATE_CLEAR (0xAC)
153 #define SERIAL_OPCODE_CMD_RANGE_MESH_END (0xAF)
155 #define SERIAL_OPCODE_CMD_RANGE_DFU_START (0xD0)
156 #define SERIAL_OPCODE_CMD_DFU_JUMP_TO_BOOTLOADER (0xD0)
157 #define SERIAL_OPCODE_CMD_DFU_REQUEST (0xD1)
158 #define SERIAL_OPCODE_CMD_DFU_RELAY (0xD2)
159 #define SERIAL_OPCODE_CMD_DFU_ABORT (0xD3)
160 #define SERIAL_OPCODE_CMD_DFU_BANK_INFO_GET (0xD4)
161 #define SERIAL_OPCODE_CMD_DFU_BANK_FLASH (0xD5)
162 #define SERIAL_OPCODE_CMD_DFU_STATE_GET (0xD6)
163 #define SERIAL_OPCODE_CMD_RANGE_DFU_END (0xDF)
165 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_START (0xE0)
166 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_SET (0xE0)
167 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_GET (0xE1)
168 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_SET (0xE2)
169 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_GET (0xE3)
170 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_ADD (0xE4)
171 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_REMOVE (0xE5)
172 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_GET (0xE6)
173 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_BIND (0xE7)
174 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_UNBIND (0xE8)
175 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_GET (0xE9)
176 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_SET (0xEA)
177 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_GET (0xEB)
178 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_SET (0xEC)
179 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_GET (0xED)
180 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_SET (0xEE)
181 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_GET (0xEF)
182 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_SIG_MODEL_COUNT_GET (0xF0)
183 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_VENDOR_MODEL_COUNT_GET (0xF1)
184 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_ID_GET (0xF2)
185 #define SERIAL_OPCODE_CMD_ACCESS_HANDLE_GET (0xF3)
186 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_MODELS_GET (0xF4)
187 #define SERIAL_OPCODE_CMD_ACCESS_ACCESS_FLASH_STORE (0xF5)
188 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_END (0xF5)
190 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_START (0xFC)
191 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_MODELS_GET (0xFC)
192 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_INIT (0xFD)
193 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_COMMAND (0xFE)
194 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_END (0xFE)
197 /************** Device commands **************/
198 /*lint -align_max(push) -align_max(1) */
199 
201 typedef struct __attribute((packed))
202 {
205 
207 typedef struct __attribute((packed))
208 {
209  uint8_t beacon_slot;
210  uint8_t data[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
212 
214 typedef struct __attribute((packed))
215 {
216  uint8_t beacon_slot;
218 
220 typedef struct __attribute((packed))
221 {
222  uint8_t beacon_slot;
223  uint8_t tx_power;
224  uint8_t channel_map;
225  uint32_t interval_ms;
227 
229 typedef struct __attribute((packed))
230 {
231  uint8_t beacon_slot;
233 
235 typedef union __attribute((packed))
236 {
243 
244 /************** Config commands **************/
246 typedef struct __attribute((packed))
247 {
248  uint8_t addr_type;
249  uint8_t adv_addr[BLE_GAP_ADDR_LEN];
251 
253 typedef struct __attribute((packed))
254 {
255  uint8_t channel_map;
257 
259 typedef struct __attribute((packed))
260 {
261  uint8_t tx_power;
263 
265 typedef struct __attribute((packed))
266 {
267  uint8_t uuid[NRF_MESH_UUID_SIZE];
269 
271 typedef union __attribute((packed))
272 {
278 
279 /************** OpenMesh commands **************/
281 typedef struct __attribute((packed))
282 {
283  uint8_t dfu_packet[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
285 
287 typedef union __attribute((packed))
288 {
291 
292 /************** Provisioning commands **************/
293 
295 typedef struct __attribute((packed))
296 {
297  uint8_t private_key[NRF_MESH_ECDH_PRIVATE_KEY_SIZE];
298  uint8_t public_key[NRF_MESH_ECDH_PUBLIC_KEY_SIZE];
300 
302 typedef struct __attribute((packed))
303 {
304  uint8_t num_elements;
305  uint8_t public_key_type;
309  uint8_t output_oob_size;
312  uint8_t input_oob_size;
313  uint16_t input_oob_actions;
315 
317 typedef struct __attribute((packed))
318 {
319  uint8_t context_id;
320  uint8_t target_uuid[NRF_MESH_UUID_SIZE];
321  uint8_t network_key[NRF_MESH_KEY_SIZE];
322  uint16_t network_key_index;
323  uint32_t iv_index;
324  uint16_t address;
325  uint8_t iv_update_flag;
328 
330 typedef struct __attribute((packed))
331 {
332  uint8_t context_id;
333  uint8_t oob_method;
334  uint8_t oob_action;
335  uint8_t size;
337 
339 typedef struct __attribute((packed))
340 {
341  uint8_t context_id;
342  uint8_t data[16];
344 
346 typedef struct __attribute((packed))
347 {
348  uint8_t context_id;
349  uint8_t shared_secret[NRF_MESH_ECDH_SHARED_SECRET_SIZE];
351 
353 typedef union __attribute((packed))
354 {
362 
363 /******************* Mesh commands *********************/
365 typedef struct __attribute((packed))
366 {
367  uint16_t net_key_index;
368  uint8_t key[NRF_MESH_KEY_SIZE];
370 
372 typedef struct __attribute((packed))
373 {
374  uint16_t subnet_handle;
375  uint8_t key[NRF_MESH_KEY_SIZE];
377 
379 typedef struct __attribute((packed))
380 {
381  uint16_t subnet_handle;
383 
385 typedef struct __attribute((packed))
386 {
387  uint16_t app_key_index;
388  uint16_t subnet_handle;
389  uint8_t key[NRF_MESH_KEY_SIZE];
391 
393 typedef struct __attribute((packed))
394 {
395  uint16_t appkey_handle;
396  uint8_t key[NRF_MESH_KEY_SIZE];
398 
400 typedef struct __attribute((packed))
401 {
402  uint16_t appkey_handle;
404 
406 typedef struct __attribute((packed))
407 {
408  uint16_t subnet_handle;
410 
412 typedef struct __attribute((packed))
413 {
414  uint16_t owner_addr;
415  uint16_t subnet_handle;
416  uint8_t key[NRF_MESH_KEY_SIZE];
418 
420 typedef struct __attribute((packed))
421 {
422  uint16_t devkey_handle;
424 
426 typedef struct __attribute((packed))
427 {
428  uint16_t start_address;
429  uint16_t count;
431 
433 typedef struct __attribute((packed))
434 {
435  uint16_t raw_address;
437 
439 typedef struct __attribute((packed))
440 {
441  uint8_t virtual_addr_uuid[NRF_MESH_UUID_SIZE];
443 
445 typedef struct __attribute((packed))
446 {
447  uint16_t address_handle;
449 
451 typedef struct __attribute((packed))
452 {
453  uint16_t address;
455 
457 typedef struct __attribute((packed))
458 {
459  uint8_t uuid[NRF_MESH_UUID_SIZE];
461 
463 typedef struct __attribute((packed))
464 {
465  uint16_t address_handle;
467 
469 typedef struct __attribute((packed))
470 {
471  uint16_t address;
473 
475 typedef struct __attribute((packed))
476 {
477  uint8_t uuid[NRF_MESH_UUID_SIZE];
479 
481 typedef struct __attribute((packed))
482 {
483  uint16_t address_handle;
485 
487 typedef struct __attribute((packed))
488 {
489  uint16_t appkey_handle;
490  uint16_t src_addr;
491  uint16_t dst_addr_handle;
492  uint8_t ttl;
493  uint8_t force_segmented;
494  uint8_t transmic_size;
497 
499 
500 
502 typedef union __attribute((packed))
503 {
531 
532 /* **** PB-MESH Client **** */
533 
535 typedef struct __attribute((packed))
536 {
537  uint8_t element_index;
541 
543 typedef struct __attribute((packed))
544 {
545  uint16_t server_address;
547 
549 typedef struct __attribute((packed))
550 {
551  uint16_t server_address;
553 
555 typedef struct __attribute((packed))
556 {
557  uint16_t server_address;
559  uint8_t network_key[NRF_MESH_KEY_SIZE];
560  uint32_t iv_index;
561  uint16_t address;
563 
565 typedef union __attribute((packed))
566 {
572 
573 /*********** DFU commands ***************/
575 typedef struct __attribute((packed))
576 {
577  uint8_t dfu_type;
579  uint32_t bank_addr;
581 
583 typedef struct __attribute((packed))
584 {
585  uint8_t dfu_type;
588 
590 typedef struct __attribute((packed))
591 {
592  uint8_t dfu_type;
594 
596 typedef struct __attribute((packed))
597 {
598  uint8_t dfu_type;
600 
602 typedef union __attribute((packed))
603 {
609 
610 /*********** Access commands ************/
612 typedef struct __attribute((packed))
613 {
617 
619 typedef struct __attribute((packed))
620 {
623 
625 typedef struct __attribute((packed))
626 {
627  uint16_t element_index;
628  uint16_t location;
630 
632 typedef struct __attribute((packed))
633 {
635  uint8_t ttl;
637 
639 typedef struct __attribute((packed))
640 {
641  uint16_t element_index;
644 
646 typedef struct __attribute((packed))
647 {
649  uint8_t resolution;
650  uint8_t step_number;
652 
654 typedef struct __attribute((packed))
655 {
656  uint16_t element_index;
658 
660 typedef struct __attribute((packed))
661 {
665 
666 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_init_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
667 
669 typedef struct __attribute((packed))
670 {
674 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_command_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
675 
677 typedef union __attribute((packed))
678 {
684  serial_cmd_access_pub_period_set_t publish_period;
686  serial_cmd_model_specific_init_t model_init;
687  serial_cmd_model_specific_command_t model_cmd;
689 
690 /*********** App commands ***************/
692 typedef struct __attribute((packed))
693 {
696 
698 typedef union __attribute((packed))
699 {
709 } serial_cmd_t;
710 
711 /*lint -align_max(pop) */
714 #endif
uint16_t devkey_handle
Handle of the devkey to delete.
Definition: serial_cmd.h:422
uint16_t subnet_handle
Handle of the subnetwork to bind the devkey to.
Definition: serial_cmd.h:415
serial_cmd_mesh_addr_publication_add_t addr_publication_add
Publication address add parameters.
Definition: serial_cmd.h:525
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:545
serial_cmd_mesh_addr_publication_remove_t addr_publication_remove
Publication address remove parameters.
Definition: serial_cmd.h:527
#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:238
Used to update the ttl value for the messages originating from a given model.
Definition: serial_cmd.h:632
serial_cmd_mesh_appkey_add_t appkey_add
Appkey add parameters.
Definition: serial_cmd.h:508
uint8_t dfu_type
DFU Firmware type to get bank info about.
Definition: serial_cmd.h:592
serial_cmd_device_echo_t echo
Echo parameters.
Definition: serial_cmd.h:237
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:648
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
Mesh devkey add command parameters.
Definition: serial_cmd.h:412
serial_cmd_prov_t prov
Provisioning parameters.
Definition: serial_cmd.h:704
uint16_t element_index
Index of the addressed element which owns the model.
Definition: serial_cmd.h:641
uint8_t prov_context_index
Provisioning context index.
Definition: serial_cmd.h:538
serial_cmd_mesh_packet_send_t packet_send
Packet send parameters.
Definition: serial_cmd.h:529
serial_cmd_mesh_addr_subscription_add_t addr_subscription_add
Subscription address add parameters.
Definition: serial_cmd.h:521
#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:662
Mesh address publication add command parameters.
Definition: serial_cmd.h:469
serial_cmd_dfu_bank_info_get_t bank_info
DFU bank info parameters.
Definition: serial_cmd.h:606
serial_cmd_pb_remote_client_remote_scan_cancel_t remote_scan_cancel
Cancel remote scanning procedure.
Definition: serial_cmd.h:569
Advertisement address config command parameters.
Definition: serial_cmd.h:246
serial_cmd_prov_auth_data_t auth_data
Parameters for the Authentication data packet.
Definition: serial_cmd.h:359
Mesh subnet add command parameters.
Definition: serial_cmd.h:365
uint16_t src_addr
Raw unicast address to use as source address.
Definition: serial_cmd.h:490
uint16_t address_handle
Handle of the address to remove from the publication address list.
Definition: serial_cmd.h:483
serial_cmd_mesh_addr_subscription_remove_t addr_subscription_remove
Subscription address remove parameters.
Definition: serial_cmd.h:523
uint8_t step_number
Must not be larger than ACCESS_PUBLISH_PERIOD_STEP_MAX.
Definition: serial_cmd.h:650
uint8_t size
Size of the OOB data.
Definition: serial_cmd.h:335
DFU command parameters.
Definition: serial_cmd.h:602
uint16_t subnet_handle
Handle of the subnet to get all appkeys of.
Definition: serial_cmd.h:408
uint16_t start_address
First address in the range of unicast addresses.
Definition: serial_cmd.h:428
serial_cmd_mesh_subnet_update_t subnet_update
Subnet update parameters.
Definition: serial_cmd.h:505
Echo cmd parameters.
Definition: serial_cmd.h:201
uint16_t appkey_handle
Handle of the appkey to delete.
Definition: serial_cmd.h:402
serial_cmd_device_beacon_params_get_t beacon_params_get
Beacon params get parameters.
Definition: serial_cmd.h:241
serial_cmd_prov_caps_t caps
Parameters for the Set capabilities packet.
Definition: serial_cmd.h:356
Channel map config command parameters.
Definition: serial_cmd.h:253
Keypair cmd parameters.
Definition: serial_cmd.h:295
Union of all config command parameters.
Definition: serial_cmd.h:271
uint16_t network_key_index
Network key index.
Definition: serial_cmd.h:322
#define NRF_MESH_STATIC_ASSERT(cond)
Compile-time assertion.
Mesh packet send command parameters.
Definition: serial_cmd.h:487
Used for initializing one of the available models.
Definition: serial_cmd.h:660
TX power config command parameters.
Definition: serial_cmd.h:259
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:567
uint8_t beacon_slot
Slot number of the beacon to set the payload for.
Definition: serial_cmd.h:209
serial_cmd_model_specific_command_header_t model_cmd_info
Contains the handle of the model being addressed.
Definition: serial_cmd.h:671
ECDH shared secret data parameters.
Definition: serial_cmd.h:346
DFU bank info get command parameters.
Definition: serial_cmd.h:590
Start remote provisioning command.
Definition: serial_cmd.h:555
#define NRF_MESH_ECDH_PUBLIC_KEY_SIZE
Size of an ECDH public key.
Mesh subnet delete command parameters.
Definition: serial_cmd.h:379
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:274
Used to update the publish period of a model by updating resolution and number of steps...
Definition: serial_cmd.h:646
serial_cmd_mesh_addr_local_unicast_set_t local_unicast_addr_set
Address local unicast set parameters.
Definition: serial_cmd.h:516
uint8_t beacon_slot
Slot number of the beacon to stop.
Definition: serial_cmd.h:216
uint8_t context_id
ID of context to set the oob method for.
Definition: serial_cmd.h:332
uint16_t input_oob_actions
Available input actions for OOB authentication.
Definition: serial_cmd.h:313
uint32_t interval_ms
TX interval in milliseconds.
Definition: serial_cmd.h:225
Mesh subnet update command parameters.
Definition: serial_cmd.h:372
Used by various access commands that work on address handles for a given model.
Definition: serial_cmd.h:612
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:560
Beacon params get cmd parameters.
Definition: serial_cmd.h:229
serial_cmd_config_uuid_t uuid
Device UUID.
Definition: serial_cmd.h:276
serial_cmd_openmesh_t openmesh
OpenMesh parameters.
Definition: serial_cmd.h:703
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:627
Mes address subscription add virtual command parameters.
Definition: serial_cmd.h:457
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:656
DFU relay command parameters.
Definition: serial_cmd.h:583
uint8_t beacon_slot
Slot number of the beacon to get the parameters of.
Definition: serial_cmd.h:231
DFU request command parameters.
Definition: serial_cmd.h:575
uint8_t channel_map
Channel map bitfield for mesh to use, starting at channel 37.
Definition: serial_cmd.h:255
serial_cmd_mesh_addr_add_t addr_add
Address add parameters.
Definition: serial_cmd.h:517
serial_cmd_config_adv_addr_t adv_addr
Advertising address.
Definition: serial_cmd.h:273
Used to update the location field of an element.
Definition: serial_cmd.h:625
uint8_t application_index
Application context index.
Definition: serial_cmd.h:539
uint8_t context_id
ID of the context to set the shared secret for.
Definition: serial_cmd.h:348
serial_cmd_mesh_addr_subscription_add_virtual_t addr_subscription_add_virtual
Virtual subscription address add parameters.
Definition: serial_cmd.h:522
Mesh command parameters.
Definition: serial_cmd.h:502
Start remote scanning command.
Definition: serial_cmd.h:543
Authentication data parameters.
Definition: serial_cmd.h:339
serial_cmd_prov_keypair_t keypair
Parameters for the Set keypair packet.
Definition: serial_cmd.h:355
serial_cmd_mesh_addr_publication_add_virtual_t addr_publication_add_virtual
Virtual publication address add parameters.
Definition: serial_cmd.h:526
Cancel remote scanning command.
Definition: serial_cmd.h:549
Mesh address add command parameters.
Definition: serial_cmd.h:433
uint16_t count
Number of addresses in the range of unicast addresses.
Definition: serial_cmd.h:429
Mesh address publication add virtual command parameters.
Definition: serial_cmd.h:475
Union of all device command parameters.
Definition: serial_cmd.h:235
dsm_handle_t dsm_handle
Handle for a value (e.g.
Definition: serial_cmd.h:615
#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:312
uint16_t subnet_handle
Handle of the subnetwork to add the appkey to.
Definition: serial_cmd.h:388
serial_cmd_pb_remote_client_remote_scan_start_t remote_scan_start
Start remote scanning procedure.
Definition: serial_cmd.h:568
uint32_t bank_addr
Address in which to bank firmware.
Definition: serial_cmd.h:579
Used by access commands that only require the element index.
Definition: serial_cmd.h:654
uint8_t ttl
Time To Live value to use in packet.
Definition: serial_cmd.h:492
serial_cmd_mesh_appkey_update_t appkey_update
Appkey update parameters.
Definition: serial_cmd.h:509
uint8_t beacon_slot
Slot number of the beacon to start.
Definition: serial_cmd.h:222
access_model_handle_t handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:621
OOB method selection parameters.
Definition: serial_cmd.h:330
uint16_t appkey_handle
Appkey or devkey handle to use for packet sending.
Definition: serial_cmd.h:489
Mesh local unicast address set command parameters.
Definition: serial_cmd.h:426
serial_cmd_application_t application
Application parameters.
Definition: serial_cmd.h:708
serial_cmd_prov_oob_use_t oob_use
Parameters for the OOB use packet.
Definition: serial_cmd.h:358
uint16_t owner_addr
Unicast address of the device that owns the given devkey.
Definition: serial_cmd.h:414
access_model_handle_t model_handle
Handle for the model being modified.
Definition: serial_cmd.h:614
serial_cmd_mesh_addr_virtual_add_t addr_virtual_add
Virtual address add parameters.
Definition: serial_cmd.h:518
serial_cmd_mesh_devkey_delete_t devkey_delete
Devkey delete parameters.
Definition: serial_cmd.h:514
uint8_t element_index
Element index.
Definition: serial_cmd.h:537
uint8_t iv_update_flag
IV update in progress flag.
Definition: serial_cmd.h:325
Mesh appkey update command parameters.
Definition: serial_cmd.h:393
Mesh appkey delete command parameters.
Definition: serial_cmd.h:400
serial_cmd_config_tx_power_t tx_power
Radio transmit power.
Definition: serial_cmd.h:275
Mesh address virtual add command parameters.
Definition: serial_cmd.h:439
uint8_t num_elements
The number of elements in the device.
Definition: serial_cmd.h:304
serial_cmd_device_t device
Device parameters.
Definition: serial_cmd.h:701
serial_cmd_pb_remote_t pb_remote
PB-MESH parameters.
Definition: serial_cmd.h:707
serial_cmd_mesh_t mesh
Mesh parameters.
Definition: serial_cmd.h:705
serial_cmd_dfu_bank_flash_t bank_flash
DFU bank flash parameters.
Definition: serial_cmd.h:607
uint16_t app_key_index
Mesh-global key index.
Definition: serial_cmd.h:387
Mesh address subscription remove command parameters.
Definition: serial_cmd.h:463
Union of all provisioning command parameters.
Definition: serial_cmd.h:353
uint8_t dfu_type
DFU Firmware type to request.
Definition: serial_cmd.h:577
serial_cmd_mesh_devkey_add_t devkey_add
Devkey add parameters.
Definition: serial_cmd.h:513
uint16_t address_handle
Handle of address to get raw representation of.
Definition: serial_cmd.h:447
serial_cmd_prov_ecdh_data_t ecdh_data
Parameters for the ECDH shared secret packet.
Definition: serial_cmd.h:360
uint16_t address
Address to add as a subscription address.
Definition: serial_cmd.h:453
access_model_id_t model_id
Company and model IDs.
Definition: serial_cmd.h:642
uint8_t dfu_type
DFU Firmware type to flash.
Definition: serial_cmd.h:598
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:551
uint8_t tx_power
Transmit power of radio, see serial_cmd_tx_power_value_t for accepted values.
Definition: serial_cmd.h:261
Used by access commands that only require the model handle.
Definition: serial_cmd.h:619
uint8_t resolution
see access_publish_resolution_t for accepted values.
Definition: serial_cmd.h:649
serial_cmd_mesh_appkey_delete_t appkey_delete
Appkey delete parameters.
Definition: serial_cmd.h:510
ACCESS layer command parameters.
Definition: serial_cmd.h:677
serial_cmd_config_t config
Configuration parameters.
Definition: serial_cmd.h:702
serial_cmd_pb_remote_client_remote_provision_t remote_provision
Start remote provisioning.
Definition: serial_cmd.h:570
#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:700
serial_cmd_mesh_subnet_add_t subnet_add
Subnet add parameters.
Definition: serial_cmd.h:504
Used to get the handle value for a model instance.
Definition: serial_cmd.h:639
uint8_t context_id
Context ID to use for this provisioning session.
Definition: serial_cmd.h:319
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:323
serial_cmd_prov_data_t data
Parameters for the Provisioning data packet.
Definition: serial_cmd.h:357
Header for the model specific events.
Definition: serial_types.h:102
Union of all command parameters.
Definition: serial_cmd.h:698
Mesh address get command parameters.
Definition: serial_cmd.h:445
Beacon params set cmd parameters.
Definition: serial_cmd.h:220
nrf_mesh_fwid_t fwid
Firmware ID to request.
Definition: serial_cmd.h:578
uint16_t subnet_handle
Handle of the subnet to delete.
Definition: serial_cmd.h:381
uint8_t unprovisioned_device_index
Unprovisioned device index.
Definition: serial_cmd.h:558
Mesh appkey get all command parameters.
Definition: serial_cmd.h:406
Mesh appkey add command parameters.
Definition: serial_cmd.h:385
serial_cmd_dfu_t dfu
DFU parameters.
Definition: serial_cmd.h:706
Beacon start cmd parameters.
Definition: serial_cmd.h:207
Mesh devkey delete command parameters.
Definition: serial_cmd.h:420
serial_cmd_mesh_appkey_get_all_t appkey_get_all
Appkey get all parameters.
Definition: serial_cmd.h:511
Mesh address subscription add command parameters.
Definition: serial_cmd.h:451
serial_cmd_device_beacon_params_set_t beacon_params_set
Beacon params set parameters.
Definition: serial_cmd.h:240
Union of all config command parameters.
Definition: serial_cmd.h:287
serial_cmd_openmesh_dfu_data_t dfu_data
DFU data parameters.
Definition: serial_cmd.h:289
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:634
Access layer model ID.
Definition: access.h:151
uint8_t key_refresh_flag
Key refresh in progress flag.
Definition: serial_cmd.h:326
nrf_mesh_fwid_t fwid
Firmware ID of firmware that should be relayed.
Definition: serial_cmd.h:586
uint8_t context_id
ID of the context to set the authentication data for.
Definition: serial_cmd.h:341
uint8_t tx_power
TX Power value, must be a value from serial_cmd_tx_power_value_t.
Definition: serial_cmd.h:223
Used for sending commands to one of the initialized models.
Definition: serial_cmd.h:669
uint16_t address_handle
Handle of address to remove from address subscription list.
Definition: serial_cmd.h:465
PB-Mesh client commands.
Definition: serial_cmd.h:565
uint8_t channel_map
Channel map bitfield for beacon, starting at channel 37.
Definition: serial_cmd.h:224
DFU data parameters.
Definition: serial_cmd.h:281
uint8_t transmic_size
Transport MIC size used enum.
Definition: serial_cmd.h:494
uint8_t ttl
TTL for outgoing messages.
Definition: serial_cmd.h:635
uint16_t appkey_handle
Handle of the appkey to change.
Definition: serial_cmd.h:395
ID of a standalone firmware segment.
Mesh address publication remove command parameters.
Definition: serial_cmd.h:481
uint8_t oob_method
OOB method to use, see nrf_mesh_prov_oob_method_t for accepted values.
Definition: serial_cmd.h:333
uint16_t output_oob_actions
Available output actions for OOB authentication.
Definition: serial_cmd.h:310
Provisioning provision command parameters.
Definition: serial_cmd.h:317
Application command parameters.
Definition: serial_cmd.h:692
Provisioning set capabilities parameters.
Definition: serial_cmd.h:302
uint8_t addr_type
BLE advertising address type.
Definition: serial_cmd.h:248
serial_cmd_dfu_request_t request
DFU request parameters.
Definition: serial_cmd.h:604
serial_cmd_mesh_addr_get_t addr_get
Address get parameters.
Definition: serial_cmd.h:519
Initialize PB-MESH Client.
Definition: serial_cmd.h:535
uint8_t static_oob_types
The types of static OOB authentication methods.
Definition: serial_cmd.h:307
Beacon stop cmd parameters.
Definition: serial_cmd.h:214
DFU bank flash command parameters.
Definition: serial_cmd.h:596
serial_cmd_device_beacon_stop_t beacon_stop
Beacon stop parameters.
Definition: serial_cmd.h:239
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:334
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:561
uint16_t dst_addr_handle
Handle of destination address to use in packet.
Definition: serial_cmd.h:491
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:557
UUID config command parameters.
Definition: serial_cmd.h:265
uint16_t net_key_index
Mesh-global key index.
Definition: serial_cmd.h:367
uint8_t output_oob_size
Maximum size of the OOB authentication output.
Definition: serial_cmd.h:309
uint16_t raw_address
Raw representation of the address to add.
Definition: serial_cmd.h:435
uint8_t dfu_type
DFU Firmware type to relay.
Definition: serial_cmd.h:585
serial_cmd_mesh_subnet_delete_t subnet_delete
Subnet delete parameters.
Definition: serial_cmd.h:506
uint16_t subnet_handle
Handle of the subnet to change.
Definition: serial_cmd.h:374
serial_cmd_dfu_relay_t relay
DFU relay parameters.
Definition: serial_cmd.h:605
uint16_t address
Address to add as a publication address.
Definition: serial_cmd.h:471
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:324
uint8_t force_segmented
Whether or not to force use of segmented message type for the transmission.
Definition: serial_cmd.h:493
uint8_t public_key_type
The type of public key used in the device.
Definition: serial_cmd.h:305
uint16_t location
Location value for the element.
Definition: serial_cmd.h:628
#define NRF_MESH_SERIAL_PAYLOAD_MAXLEN
Maximum length of a serial packet&#39;s payload.

Documentation feedback | Developer Zone | Subscribe | Updated