nRF5 SDK for Mesh v5.0.0
serial_cmd.h
1 /* Copyright (c) 2010 - 2020, 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)
155 #define SERIAL_OPCODE_CMD_MESH_CONFIG_SERVER_BIND (0xAD)
156 #define SERIAL_OPCODE_CMD_MESH_NET_STATE_SET (0xAE)
157 #define SERIAL_OPCODE_CMD_MESH_NET_STATE_GET (0xAF)
158 #define SERIAL_OPCODE_CMD_RANGE_MESH_END (0xBF)
160 #define SERIAL_OPCODE_CMD_RANGE_DFU_START (0xD0)
161 #define SERIAL_OPCODE_CMD_DFU_JUMP_TO_BOOTLOADER (0xD0)
162 #define SERIAL_OPCODE_CMD_DFU_REQUEST (0xD1)
163 #define SERIAL_OPCODE_CMD_DFU_RELAY (0xD2)
164 #define SERIAL_OPCODE_CMD_DFU_ABORT (0xD3)
165 #define SERIAL_OPCODE_CMD_DFU_BANK_INFO_GET (0xD4)
166 #define SERIAL_OPCODE_CMD_DFU_BANK_FLASH (0xD5)
167 #define SERIAL_OPCODE_CMD_DFU_STATE_GET (0xD6)
168 #define SERIAL_OPCODE_CMD_RANGE_DFU_END (0xDF)
170 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_START (0xE0)
171 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_SET (0xE0)
172 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_ADDR_GET (0xE1)
173 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_SET (0xE2)
174 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_PERIOD_GET (0xE3)
175 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_ADD (0xE4)
176 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_REMOVE (0xE5)
177 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_SUBS_GET (0xE6)
178 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_BIND (0xE7)
179 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_UNBIND (0xE8)
180 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_APP_GET (0xE9)
181 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_SET (0xEA)
182 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_APP_GET (0xEB)
183 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_SET (0xEC)
184 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_PUB_TTL_GET (0xED)
185 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_SET (0xEE)
186 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_LOC_GET (0xEF)
187 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_SIG_MODEL_COUNT_GET (0xF0)
188 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_VENDOR_MODEL_COUNT_GET (0xF1)
189 #define SERIAL_OPCODE_CMD_ACCESS_MODEL_ID_GET (0xF2)
190 #define SERIAL_OPCODE_CMD_ACCESS_HANDLE_GET (0xF3)
191 #define SERIAL_OPCODE_CMD_ACCESS_ELEM_MODELS_GET (0xF4)
192 #define SERIAL_OPCODE_CMD_RANGE_ACCESS_END (0xF4)
194 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_START (0xFC)
195 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_MODELS_GET (0xFC)
196 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_INIT (0xFD)
197 #define SERIAL_OPCODE_CMD_MODEL_SPECIFIC_COMMAND (0xFE)
198 #define SERIAL_OPCODE_CMD_RANGE_MODEL_SPECIFIC_END (0xFE)
201 /************** Device commands **************/
202 /*lint -align_max(push) -align_max(1) */
203 
205 typedef struct __attribute((packed))
206 {
209 
211 typedef struct __attribute((packed))
212 {
213  uint8_t beacon_slot;
214  uint8_t data[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
216 
218 typedef struct __attribute((packed))
219 {
220  uint8_t beacon_slot;
222 
224 typedef struct __attribute((packed))
225 {
226  uint8_t beacon_slot;
227  uint8_t tx_power;
228  uint8_t channel_map;
229  uint32_t interval_ms;
231 
233 typedef struct __attribute((packed))
234 {
235  uint8_t beacon_slot;
237 
239 typedef union __attribute((packed))
240 {
247 
248 /************** Config commands **************/
250 typedef struct __attribute((packed))
251 {
252  uint8_t addr_type;
253  uint8_t adv_addr[BLE_GAP_ADDR_LEN];
255 
257 typedef struct __attribute((packed))
258 {
259  uint8_t channel_map;
261 
263 typedef struct __attribute((packed))
264 {
265  uint8_t tx_power;
267 
269 typedef struct __attribute((packed))
270 {
271  uint8_t uuid[NRF_MESH_UUID_SIZE];
273 
275 typedef union __attribute((packed))
276 {
282 
283 /************** OpenMesh commands **************/
285 typedef struct __attribute((packed))
286 {
287  uint8_t dfu_packet[BLE_ADV_PACKET_PAYLOAD_MAX_LENGTH];
289 
291 typedef union __attribute((packed))
292 {
295 
296 /************** Provisioning commands **************/
297 
299 typedef struct __attribute((packed))
300 {
301  uint8_t private_key[NRF_MESH_ECDH_PRIVATE_KEY_SIZE];
302  uint8_t public_key[NRF_MESH_ECDH_PUBLIC_KEY_SIZE];
304 
306 typedef struct __attribute((packed))
307 {
308  uint8_t num_elements;
309  uint8_t public_key_type;
313  uint8_t output_oob_size;
316  uint8_t input_oob_size;
317  uint16_t input_oob_actions;
319 
321 typedef struct __attribute((packed))
322 {
323  uint8_t context_id;
324  uint8_t target_uuid[NRF_MESH_UUID_SIZE];
325  uint8_t network_key[NRF_MESH_KEY_SIZE];
326  uint16_t network_key_index;
327  uint32_t iv_index;
328  uint16_t address;
329  uint8_t iv_update_flag;
333 
335 typedef struct __attribute((packed))
336 {
337  uint8_t context_id;
338  uint8_t oob_method;
339  uint8_t oob_action;
340  uint8_t size;
342 
344 typedef struct __attribute((packed))
345 {
346  uint8_t context_id;
347  uint8_t data[16];
349 
351 typedef struct __attribute((packed))
352 {
353  uint8_t context_id;
354  uint8_t shared_secret[NRF_MESH_ECDH_SHARED_SECRET_SIZE];
356 
358 typedef union __attribute((packed))
359 {
367 
368 /******************* Mesh commands *********************/
370 typedef struct __attribute((packed))
371 {
372  uint16_t net_key_index;
373  uint8_t key[NRF_MESH_KEY_SIZE];
375 
377 typedef struct __attribute((packed))
378 {
379  uint16_t subnet_handle;
380  uint8_t key[NRF_MESH_KEY_SIZE];
382 
384 typedef struct __attribute((packed))
385 {
386  uint16_t subnet_handle;
388 
390 typedef struct __attribute((packed))
391 {
392  uint16_t app_key_index;
393  uint16_t subnet_handle;
394  uint8_t key[NRF_MESH_KEY_SIZE];
396 
398 typedef struct __attribute((packed))
399 {
400  uint16_t appkey_handle;
401  uint8_t key[NRF_MESH_KEY_SIZE];
403 
405 typedef struct __attribute((packed))
406 {
407  uint16_t appkey_handle;
409 
411 typedef struct __attribute((packed))
412 {
413  uint16_t subnet_handle;
415 
417 typedef struct __attribute((packed))
418 {
419  uint16_t owner_addr;
420  uint16_t subnet_handle;
421  uint8_t key[NRF_MESH_KEY_SIZE];
423 
425 typedef struct __attribute((packed))
426 {
427  uint16_t devkey_handle;
429 
431 typedef struct __attribute((packed))
432 {
433  uint16_t start_address;
434  uint16_t count;
436 
438 typedef struct __attribute((packed))
439 {
440  uint16_t raw_address;
442 
444 typedef struct __attribute((packed))
445 {
446  uint8_t virtual_addr_uuid[NRF_MESH_UUID_SIZE];
448 
450 typedef struct __attribute((packed))
451 {
452  uint16_t address_handle;
454 
456 typedef struct __attribute((packed))
457 {
458  uint16_t address;
460 
462 typedef struct __attribute((packed))
463 {
464  uint8_t uuid[NRF_MESH_UUID_SIZE];
466 
468 typedef struct __attribute((packed))
469 {
470  uint16_t address_handle;
472 
474 typedef struct __attribute((packed))
475 {
476  uint16_t address;
478 
480 typedef struct __attribute((packed))
481 {
482  uint8_t uuid[NRF_MESH_UUID_SIZE];
484 
486 typedef struct __attribute((packed))
487 {
488  uint16_t address_handle;
490 
492 typedef struct __attribute((packed))
493 {
494  uint16_t appkey_handle;
495  uint16_t src_addr;
496  uint16_t dst_addr_handle;
497  uint8_t ttl;
498  uint8_t force_segmented;
499  uint8_t transmic_size;
503 
505 
507 typedef struct __attribute((packed))
508 {
509  uint16_t address_handle;
511 
513 typedef struct __attribute((packed))
514 {
515  uint32_t iv_index;
518  uint32_t next_seqnum_block;
520 
522 typedef union __attribute((packed))
523 {
553 
554 /* **** PB-MESH Client **** */
555 
557 typedef struct __attribute((packed))
558 {
559  uint8_t element_index;
563 
565 typedef struct __attribute((packed))
566 {
567  uint16_t server_address;
569 
571 typedef struct __attribute((packed))
572 {
573  uint16_t server_address;
575 
577 typedef struct __attribute((packed))
578 {
579  uint16_t server_address;
581  uint8_t network_key[NRF_MESH_KEY_SIZE];
582  uint32_t iv_index;
583  uint16_t address;
585 
587 typedef union __attribute((packed))
588 {
594 
595 /*********** DFU commands ***************/
597 typedef struct __attribute((packed))
598 {
599  uint8_t dfu_type;
601  uint32_t bank_addr;
603 
605 typedef struct __attribute((packed))
606 {
607  uint8_t dfu_type;
610 
612 typedef struct __attribute((packed))
613 {
614  uint8_t dfu_type;
616 
618 typedef struct __attribute((packed))
619 {
620  uint8_t dfu_type;
622 
624 typedef union __attribute((packed))
625 {
631 
632 /*********** Access commands ************/
634 typedef struct __attribute((packed))
635 {
639 
641 typedef struct __attribute((packed))
642 {
645 
647 typedef struct __attribute((packed))
648 {
649  uint16_t element_index;
650  uint16_t location;
652 
654 typedef struct __attribute((packed))
655 {
657  uint8_t ttl;
659 
661 typedef struct __attribute((packed))
662 {
663  uint16_t element_index;
666 
668 typedef struct __attribute((packed))
669 {
671  uint8_t resolution;
672  uint8_t step_number;
674 
676 typedef struct __attribute((packed))
677 {
678  uint16_t element_index;
680 
682 typedef struct __attribute((packed))
683 {
687 
688 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_init_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
689 
691 typedef struct __attribute((packed))
692 {
696 NRF_MESH_STATIC_ASSERT(sizeof(serial_cmd_model_specific_command_t) == NRF_MESH_SERIAL_PAYLOAD_MAXLEN);
697 
699 typedef union __attribute((packed))
700 {
706  serial_cmd_access_pub_period_set_t publish_period;
708  serial_cmd_model_specific_init_t model_init;
709  serial_cmd_model_specific_command_t model_cmd;
711 
712 /*********** App commands ***************/
714 typedef struct __attribute((packed))
715 {
718 
720 typedef union __attribute((packed))
721 {
731 } serial_cmd_t;
732 
733 /*lint -align_max(pop) */
736 #endif
uint16_t devkey_handle
Handle of the devkey to delete.
Definition: serial_cmd.h:427
uint16_t subnet_handle
Handle of the subnetwork to bind the devkey to.
Definition: serial_cmd.h:420
serial_cmd_mesh_addr_publication_add_t addr_publication_add
Publication address add parameters.
Definition: serial_cmd.h:545
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:567
serial_cmd_mesh_addr_publication_remove_t addr_publication_remove
Publication address remove parameters.
Definition: serial_cmd.h:547
#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:242
Used to update the ttl value for the messages originating from a given model.
Definition: serial_cmd.h:654
serial_cmd_mesh_appkey_add_t appkey_add
Appkey add parameters.
Definition: serial_cmd.h:528
uint8_t dfu_type
DFU Firmware type to get bank info about.
Definition: serial_cmd.h:614
serial_cmd_device_echo_t echo
Echo parameters.
Definition: serial_cmd.h:241
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:670
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
Mesh devkey add command parameters.
Definition: serial_cmd.h:417
serial_cmd_prov_t prov
Provisioning parameters.
Definition: serial_cmd.h:726
uint16_t address_handle
Handle of the address to get the raw representation of.
Definition: serial_cmd.h:509
uint16_t element_index
Index of the addressed element which owns the model.
Definition: serial_cmd.h:663
uint8_t prov_context_index
Provisioning context index.
Definition: serial_cmd.h:560
serial_cmd_mesh_packet_send_t packet_send
Packet send parameters.
Definition: serial_cmd.h:549
serial_cmd_mesh_addr_subscription_add_t addr_subscription_add
Subscription address add parameters.
Definition: serial_cmd.h:541
#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:684
Mesh address publication add command parameters.
Definition: serial_cmd.h:474
serial_cmd_dfu_bank_info_get_t bank_info
DFU bank info parameters.
Definition: serial_cmd.h:628
serial_cmd_pb_remote_client_remote_scan_cancel_t remote_scan_cancel
Cancel remote scanning procedure.
Definition: serial_cmd.h:591
Advertisement address config command parameters.
Definition: serial_cmd.h:250
serial_cmd_prov_auth_data_t auth_data
Parameters for the Authentication data packet.
Definition: serial_cmd.h:364
Mesh subnet add command parameters.
Definition: serial_cmd.h:370
uint16_t src_addr
Raw unicast address to use as source address.
Definition: serial_cmd.h:495
uint16_t address_handle
Handle of the address to remove from the publication address list.
Definition: serial_cmd.h:488
serial_cmd_mesh_addr_subscription_remove_t addr_subscription_remove
Subscription address remove parameters.
Definition: serial_cmd.h:543
uint8_t step_number
Must not be larger than ACCESS_PUBLISH_PERIOD_STEP_MAX.
Definition: serial_cmd.h:672
uint8_t size
Size of the OOB data.
Definition: serial_cmd.h:340
DFU command parameters.
Definition: serial_cmd.h:624
uint16_t subnet_handle
Handle of the subnet to get all appkeys of.
Definition: serial_cmd.h:413
uint16_t start_address
First address in the range of unicast addresses.
Definition: serial_cmd.h:433
serial_cmd_mesh_subnet_update_t subnet_update
Subnet update parameters.
Definition: serial_cmd.h:525
Echo cmd parameters.
Definition: serial_cmd.h:205
uint16_t appkey_handle
Handle of the appkey to delete.
Definition: serial_cmd.h:407
serial_cmd_device_beacon_params_get_t beacon_params_get
Beacon params get parameters.
Definition: serial_cmd.h:245
serial_cmd_prov_caps_t caps
Parameters for the Set capabilities packet.
Definition: serial_cmd.h:361
Channel map config command parameters.
Definition: serial_cmd.h:257
Keypair cmd parameters.
Definition: serial_cmd.h:299
Union of all config command parameters.
Definition: serial_cmd.h:275
uint16_t network_key_index
Network key index.
Definition: serial_cmd.h:326
Mesh packet send command parameters.
Definition: serial_cmd.h:492
Used for initializing one of the available models.
Definition: serial_cmd.h:682
Mesh net state set command parameters.
Definition: serial_cmd.h:513
TX power config command parameters.
Definition: serial_cmd.h:263
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:589
uint8_t beacon_slot
Slot number of the beacon to set the payload for.
Definition: serial_cmd.h:213
serial_cmd_model_specific_command_header_t model_cmd_info
Contains the handle of the model being addressed.
Definition: serial_cmd.h:693
ECDH shared secret data parameters.
Definition: serial_cmd.h:351
DFU bank info get command parameters.
Definition: serial_cmd.h:612
Start remote provisioning command.
Definition: serial_cmd.h:577
#define NRF_MESH_ECDH_PUBLIC_KEY_SIZE
Size of an ECDH public key.
Mesh subnet delete command parameters.
Definition: serial_cmd.h:384
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:278
Used to update the publish period of a model by updating resolution and number of steps...
Definition: serial_cmd.h:668
serial_cmd_mesh_addr_local_unicast_set_t local_unicast_addr_set
Address local unicast set parameters.
Definition: serial_cmd.h:536
uint8_t beacon_slot
Slot number of the beacon to stop.
Definition: serial_cmd.h:220
uint8_t context_id
ID of context to set the oob method for.
Definition: serial_cmd.h:337
uint16_t input_oob_actions
Available input actions for OOB authentication.
Definition: serial_cmd.h:317
uint32_t interval_ms
TX interval in milliseconds.
Definition: serial_cmd.h:229
Mesh subnet update command parameters.
Definition: serial_cmd.h:377
Used by various access commands that work on address handles for a given model.
Definition: serial_cmd.h:634
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:582
Beacon params get cmd parameters.
Definition: serial_cmd.h:233
serial_cmd_config_uuid_t uuid
Device UUID.
Definition: serial_cmd.h:280
serial_cmd_openmesh_t openmesh
OpenMesh parameters.
Definition: serial_cmd.h:725
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:649
Mes address subscription add virtual command parameters.
Definition: serial_cmd.h:462
uint16_t element_index
Index of the addressed element.
Definition: serial_cmd.h:678
DFU relay command parameters.
Definition: serial_cmd.h:605
uint8_t beacon_slot
Slot number of the beacon to get the parameters of.
Definition: serial_cmd.h:235
DFU request command parameters.
Definition: serial_cmd.h:597
uint8_t channel_map
Channel map bitfield for mesh to use, starting at channel 37.
Definition: serial_cmd.h:259
serial_cmd_mesh_addr_add_t addr_add
Address add parameters.
Definition: serial_cmd.h:537
serial_cmd_config_adv_addr_t adv_addr
Advertising address.
Definition: serial_cmd.h:277
Used to update the location field of an element.
Definition: serial_cmd.h:647
uint8_t application_index
Application context index.
Definition: serial_cmd.h:561
uint8_t context_id
ID of the context to set the shared secret for.
Definition: serial_cmd.h:353
serial_cmd_mesh_addr_subscription_add_virtual_t addr_subscription_add_virtual
Virtual subscription address add parameters.
Definition: serial_cmd.h:542
Mesh command parameters.
Definition: serial_cmd.h:522
Start remote scanning command.
Definition: serial_cmd.h:565
Authentication data parameters.
Definition: serial_cmd.h:344
uint16_t iv_update_timeout_counter
Timeout counter for IV update process.
Definition: serial_cmd.h:517
serial_cmd_prov_keypair_t keypair
Parameters for the Set keypair packet.
Definition: serial_cmd.h:360
serial_cmd_mesh_addr_publication_add_virtual_t addr_publication_add_virtual
Virtual publication address add parameters.
Definition: serial_cmd.h:546
Cancel remote scanning command.
Definition: serial_cmd.h:571
Mesh address add command parameters.
Definition: serial_cmd.h:438
uint16_t count
Number of addresses in the range of unicast addresses.
Definition: serial_cmd.h:434
Mesh address publication add virtual command parameters.
Definition: serial_cmd.h:480
Union of all device command parameters.
Definition: serial_cmd.h:239
dsm_handle_t dsm_handle
Handle for a value (e.g.
Definition: serial_cmd.h:637
#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:316
uint8_t iv_update_in_progress
Value indicating the phase of the IV update process.
Definition: serial_cmd.h:516
uint16_t subnet_handle
Handle of the subnetwork to add the appkey to.
Definition: serial_cmd.h:393
serial_cmd_pb_remote_client_remote_scan_start_t remote_scan_start
Start remote scanning procedure.
Definition: serial_cmd.h:590
uint32_t bank_addr
Address in which to bank firmware.
Definition: serial_cmd.h:601
Used by access commands that only require the element index.
Definition: serial_cmd.h:676
uint8_t ttl
Time To Live value to use in packet.
Definition: serial_cmd.h:497
serial_cmd_mesh_appkey_update_t appkey_update
Appkey update parameters.
Definition: serial_cmd.h:529
uint8_t beacon_slot
Slot number of the beacon to start.
Definition: serial_cmd.h:226
access_model_handle_t handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:643
uint32_t next_seqnum_block
The first sequence number block which is not yet allocated.
Definition: serial_cmd.h:518
OOB method selection parameters.
Definition: serial_cmd.h:335
uint16_t appkey_handle
Appkey or devkey handle to use for packet sending.
Definition: serial_cmd.h:494
Mesh local unicast address set command parameters.
Definition: serial_cmd.h:431
serial_cmd_application_t application
Application parameters.
Definition: serial_cmd.h:730
serial_cmd_prov_oob_use_t oob_use
Parameters for the OOB use packet.
Definition: serial_cmd.h:363
uint16_t owner_addr
Unicast address of the device that owns the given devkey.
Definition: serial_cmd.h:419
access_model_handle_t model_handle
Handle for the model being modified.
Definition: serial_cmd.h:636
serial_cmd_mesh_addr_virtual_add_t addr_virtual_add
Virtual address add parameters.
Definition: serial_cmd.h:538
serial_cmd_mesh_devkey_delete_t devkey_delete
Devkey delete parameters.
Definition: serial_cmd.h:534
uint8_t element_index
Element index.
Definition: serial_cmd.h:559
uint8_t iv_update_flag
IV update in progress flag.
Definition: serial_cmd.h:329
Mesh appkey update command parameters.
Definition: serial_cmd.h:398
serial_cmd_mesh_config_server_devkey_bind_t config_server_devkey_bind
Configuration Server: device key bind parameters.
Definition: serial_cmd.h:550
Mesh appkey delete command parameters.
Definition: serial_cmd.h:405
serial_cmd_config_tx_power_t tx_power
Radio transmit power.
Definition: serial_cmd.h:279
Mesh address virtual add command parameters.
Definition: serial_cmd.h:444
uint8_t num_elements
The number of elements in the device.
Definition: serial_cmd.h:308
uint8_t attention_duration_s
Time in seconds during which the device will identify itself using any means it can.
Definition: serial_cmd.h:331
serial_cmd_device_t device
Device parameters.
Definition: serial_cmd.h:723
serial_cmd_pb_remote_t pb_remote
PB-MESH parameters.
Definition: serial_cmd.h:729
serial_cmd_mesh_t mesh
Mesh parameters.
Definition: serial_cmd.h:727
serial_cmd_dfu_bank_flash_t bank_flash
DFU bank flash parameters.
Definition: serial_cmd.h:629
uint16_t app_key_index
Mesh-global key index.
Definition: serial_cmd.h:392
Mesh address subscription remove command parameters.
Definition: serial_cmd.h:468
Union of all provisioning command parameters.
Definition: serial_cmd.h:358
uint8_t dfu_type
DFU Firmware type to request.
Definition: serial_cmd.h:599
serial_cmd_mesh_devkey_add_t devkey_add
Devkey add parameters.
Definition: serial_cmd.h:533
uint16_t address_handle
Handle of address to get raw representation of.
Definition: serial_cmd.h:452
serial_cmd_prov_ecdh_data_t ecdh_data
Parameters for the ECDH shared secret packet.
Definition: serial_cmd.h:365
uint16_t address
Address to add as a subscription address.
Definition: serial_cmd.h:458
access_model_id_t model_id
Company and model IDs.
Definition: serial_cmd.h:664
uint8_t dfu_type
DFU Firmware type to flash.
Definition: serial_cmd.h:620
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:573
uint8_t tx_power
Transmit power of radio, see serial_cmd_tx_power_value_t for accepted values.
Definition: serial_cmd.h:265
Used by access commands that only require the model handle.
Definition: serial_cmd.h:641
uint8_t resolution
see access_publish_resolution_t for accepted values.
Definition: serial_cmd.h:671
serial_cmd_mesh_appkey_delete_t appkey_delete
Appkey delete parameters.
Definition: serial_cmd.h:530
ACCESS layer command parameters.
Definition: serial_cmd.h:699
serial_cmd_config_t config
Configuration parameters.
Definition: serial_cmd.h:724
serial_cmd_pb_remote_client_remote_provision_t remote_provision
Start remote provisioning.
Definition: serial_cmd.h:592
#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:722
serial_cmd_mesh_subnet_add_t subnet_add
Subnet add parameters.
Definition: serial_cmd.h:524
Used to get the handle value for a model instance.
Definition: serial_cmd.h:661
uint8_t context_id
Context ID to use for this provisioning session.
Definition: serial_cmd.h:323
uint32_t iv_index
Initial IV index of the network.
Definition: serial_cmd.h:327
serial_cmd_prov_data_t data
Parameters for the Provisioning data packet.
Definition: serial_cmd.h:362
Header for the model specific events.
Definition: serial_types.h:102
Union of all command parameters.
Definition: serial_cmd.h:720
Mesh address get command parameters.
Definition: serial_cmd.h:450
Beacon params set cmd parameters.
Definition: serial_cmd.h:224
nrf_mesh_fwid_t fwid
Firmware ID to request.
Definition: serial_cmd.h:600
uint16_t subnet_handle
Handle of the subnet to delete.
Definition: serial_cmd.h:386
uint8_t unprovisioned_device_index
Unprovisioned device index.
Definition: serial_cmd.h:580
Mesh appkey get all command parameters.
Definition: serial_cmd.h:411
Mesh appkey add command parameters.
Definition: serial_cmd.h:390
serial_cmd_dfu_t dfu
DFU parameters.
Definition: serial_cmd.h:728
Beacon start cmd parameters.
Definition: serial_cmd.h:211
Mesh devkey delete command parameters.
Definition: serial_cmd.h:425
serial_cmd_mesh_appkey_get_all_t appkey_get_all
Appkey get all parameters.
Definition: serial_cmd.h:531
Mesh address subscription add command parameters.
Definition: serial_cmd.h:456
serial_cmd_mesh_net_state_set_t net_state_set
Net state set parameters.
Definition: serial_cmd.h:551
serial_cmd_device_beacon_params_set_t beacon_params_set
Beacon params set parameters.
Definition: serial_cmd.h:244
Union of all config command parameters.
Definition: serial_cmd.h:291
serial_cmd_openmesh_dfu_data_t dfu_data
DFU data parameters.
Definition: serial_cmd.h:293
access_model_handle_t model_handle
Handle of the model that the access module should operate on.
Definition: serial_cmd.h:656
Access layer model ID.
Definition: access.h:151
uint8_t key_refresh_flag
Key refresh in progress flag.
Definition: serial_cmd.h:330
nrf_mesh_fwid_t fwid
Firmware ID of firmware that should be relayed.
Definition: serial_cmd.h:608
uint8_t context_id
ID of the context to set the authentication data for.
Definition: serial_cmd.h:346
uint8_t tx_power
TX Power value, must be a value from serial_cmd_tx_power_value_t.
Definition: serial_cmd.h:227
Used for sending commands to one of the initialized models.
Definition: serial_cmd.h:691
uint16_t address_handle
Handle of address to remove from address subscription list.
Definition: serial_cmd.h:470
uint8_t friendship_credential_flag
Control parameter for credentials used to publish messages from a model.
Definition: serial_cmd.h:500
PB-Mesh client commands.
Definition: serial_cmd.h:587
uint8_t channel_map
Channel map bitfield for beacon, starting at channel 37.
Definition: serial_cmd.h:228
DFU data parameters.
Definition: serial_cmd.h:285
uint8_t transmic_size
Transport MIC size used enum.
Definition: serial_cmd.h:499
uint8_t ttl
TTL for outgoing messages.
Definition: serial_cmd.h:657
uint16_t appkey_handle
Handle of the appkey to change.
Definition: serial_cmd.h:400
ID of a standalone firmware segment.
Mesh address publication remove command parameters.
Definition: serial_cmd.h:486
uint8_t oob_method
OOB method to use, see nrf_mesh_prov_oob_method_t for accepted values.
Definition: serial_cmd.h:338
uint16_t output_oob_actions
Available output actions for OOB authentication.
Definition: serial_cmd.h:314
Provisioning provision command parameters.
Definition: serial_cmd.h:321
Application command parameters.
Definition: serial_cmd.h:714
Provisioning set capabilities parameters.
Definition: serial_cmd.h:306
uint8_t addr_type
BLE advertising address type.
Definition: serial_cmd.h:252
serial_cmd_dfu_request_t request
DFU request parameters.
Definition: serial_cmd.h:626
serial_cmd_mesh_addr_get_t addr_get
Address get parameters.
Definition: serial_cmd.h:539
Initialize PB-MESH Client.
Definition: serial_cmd.h:557
uint8_t static_oob_types
The types of static OOB authentication methods.
Definition: serial_cmd.h:311
Beacon stop cmd parameters.
Definition: serial_cmd.h:218
Configuration Server: device key bind command parameters.
Definition: serial_cmd.h:507
DFU bank flash command parameters.
Definition: serial_cmd.h:618
serial_cmd_device_beacon_stop_t beacon_stop
Beacon stop parameters.
Definition: serial_cmd.h:243
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:339
uint32_t iv_index
The IV index to set.
Definition: serial_cmd.h:515
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:583
#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:496
uint16_t server_address
Remote provisioning Server address.
Definition: serial_cmd.h:579
UUID config command parameters.
Definition: serial_cmd.h:269
uint16_t net_key_index
Mesh-global key index.
Definition: serial_cmd.h:372
uint8_t output_oob_size
Maximum size of the OOB authentication output.
Definition: serial_cmd.h:313
uint16_t raw_address
Raw representation of the address to add.
Definition: serial_cmd.h:440
uint8_t dfu_type
DFU Firmware type to relay.
Definition: serial_cmd.h:607
serial_cmd_mesh_subnet_delete_t subnet_delete
Subnet delete parameters.
Definition: serial_cmd.h:526
uint16_t subnet_handle
Handle of the subnet to change.
Definition: serial_cmd.h:379
serial_cmd_dfu_relay_t relay
DFU relay parameters.
Definition: serial_cmd.h:627
uint16_t address
Address to add as a publication address.
Definition: serial_cmd.h:476
uint16_t address
Unicast address to assign to the device.
Definition: serial_cmd.h:328
uint8_t force_segmented
Whether or not to force use of segmented message type for the transmission.
Definition: serial_cmd.h:498
uint8_t public_key_type
The type of public key used in the device.
Definition: serial_cmd.h:309
uint16_t location
Location value for the element.
Definition: serial_cmd.h:650
#define NRF_MESH_SERIAL_PAYLOAD_MAXLEN
Maximum length of a serial packet&#39;s payload.

Documentation feedback | Developer Zone | Subscribe | Updated