1 /* Bluetooth: Mesh Generic OnOff, Generic Level, Lighting & Vendor Models
2  *
3  * Copyright (c) 2018 Vikrant More
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #ifndef _BLE_MESH_H
9 #define _BLE_MESH_H
10 
11 #include <zephyr/settings/settings.h>
12 #include <zephyr/bluetooth/bluetooth.h>
13 #include <zephyr/bluetooth/conn.h>
14 #include <zephyr/bluetooth/l2cap.h>
15 #include <zephyr/bluetooth/hci.h>
16 #include <zephyr/bluetooth/mesh.h>
17 
18 /* Model Operation Codes */
19 #define	BT_MESH_MODEL_OP_GEN_ONOFF_GET          BT_MESH_MODEL_OP_2(0x82, 0x01)
20 #define	BT_MESH_MODEL_OP_GEN_ONOFF_SET          BT_MESH_MODEL_OP_2(0x82, 0x02)
21 #define	BT_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK    BT_MESH_MODEL_OP_2(0x82, 0x03)
22 #define	BT_MESH_MODEL_OP_GEN_ONOFF_STATUS       BT_MESH_MODEL_OP_2(0x82, 0x04)
23 
24 #define	BT_MESH_MODEL_OP_GEN_LEVEL_GET          BT_MESH_MODEL_OP_2(0x82, 0x05)
25 #define	BT_MESH_MODEL_OP_GEN_LEVEL_SET          BT_MESH_MODEL_OP_2(0x82, 0x06)
26 #define	BT_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK    BT_MESH_MODEL_OP_2(0x82, 0x07)
27 #define	BT_MESH_MODEL_OP_GEN_LEVEL_STATUS       BT_MESH_MODEL_OP_2(0x82, 0x08)
28 #define	BT_MESH_MODEL_OP_GEN_DELTA_SET          BT_MESH_MODEL_OP_2(0x82, 0x09)
29 #define	BT_MESH_MODEL_OP_GEN_DELTA_SET_UNACK    BT_MESH_MODEL_OP_2(0x82, 0x0A)
30 #define	BT_MESH_MODEL_OP_GEN_MOVE_SET           BT_MESH_MODEL_OP_2(0x82, 0x0B)
31 #define	BT_MESH_MODEL_OP_GEN_MOVE_SET_UNACK     BT_MESH_MODEL_OP_2(0x82, 0x0C)
32 
33 #define	BT_MESH_MODEL_GEN_DEF_TRANS_TIME_GET	BT_MESH_MODEL_OP_2(0x82, 0x0D)
34 #define	BT_MESH_MODEL_GEN_DEF_TRANS_TIME_SET	BT_MESH_MODEL_OP_2(0x82, 0x0E)
35 #define	BT_MESH_MODEL_GEN_DEF_TRANS_TIME_SET_UNACK \
36 	BT_MESH_MODEL_OP_2(0x82, 0x0F)
37 #define	BT_MESH_MODEL_GEN_DEF_TRANS_TIME_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x10)
38 
39 #define	BT_MESH_MODEL_GEN_ONPOWERUP_GET		BT_MESH_MODEL_OP_2(0x82, 0x11)
40 #define	BT_MESH_MODEL_GEN_ONPOWERUP_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x12)
41 #define	BT_MESH_MODEL_GEN_ONPOWERUP_SET		BT_MESH_MODEL_OP_2(0x82, 0x13)
42 #define	BT_MESH_MODEL_GEN_ONPOWERUP_SET_UNACK	BT_MESH_MODEL_OP_2(0x82, 0x14)
43 
44 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_GET	BT_MESH_MODEL_OP_2(0x82, 0x4B)
45 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_SET	BT_MESH_MODEL_OP_2(0x82, 0x4C)
46 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_SET_UNACK	BT_MESH_MODEL_OP_2(0x82, 0x4D)
47 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x4E)
48 
49 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LINEAR_GET \
50 	BT_MESH_MODEL_OP_2(0x82, 0x4F)
51 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LINEAR_SET \
52 	BT_MESH_MODEL_OP_2(0x82, 0x50)
53 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LINEAR_SET_UNACK \
54 	BT_MESH_MODEL_OP_2(0x82, 0x51)
55 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LINEAR_STATUS \
56 	BT_MESH_MODEL_OP_2(0x82, 0x52)
57 
58 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LAST_GET \
59 	BT_MESH_MODEL_OP_2(0x82, 0x53)
60 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_LAST_STATUS \
61 	BT_MESH_MODEL_OP_2(0x82, 0x54)
62 
63 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_DEFAULT_GET \
64 	BT_MESH_MODEL_OP_2(0x82, 0x55)
65 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_DEFAULT_STATUS \
66 	BT_MESH_MODEL_OP_2(0x82, 0x56)
67 
68 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_RANGE_GET \
69 	BT_MESH_MODEL_OP_2(0x82, 0x57)
70 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_RANGE_STATUS \
71 	BT_MESH_MODEL_OP_2(0x82, 0x58)
72 
73 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_DEFAULT_SET \
74 	BT_MESH_MODEL_OP_2(0x82, 0x59)
75 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_DEFAULT_SET_UNACK \
76 	BT_MESH_MODEL_OP_2(0x82, 0x5A)
77 
78 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_RANGE_SET \
79 	BT_MESH_MODEL_OP_2(0x82, 0x5B)
80 #define	BT_MESH_MODEL_LIGHT_LIGHTNESS_RANGE_SET_UNACK \
81 	BT_MESH_MODEL_OP_2(0x82, 0x5C)
82 
83 #define	BT_MESH_MODEL_LIGHT_CTL_GET	BT_MESH_MODEL_OP_2(0x82, 0x5D)
84 #define	BT_MESH_MODEL_LIGHT_CTL_SET	BT_MESH_MODEL_OP_2(0x82, 0x5E)
85 #define	BT_MESH_MODEL_LIGHT_CTL_SET_UNACK	BT_MESH_MODEL_OP_2(0x82, 0x5F)
86 #define	BT_MESH_MODEL_LIGHT_CTL_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x60)
87 
88 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_GET	BT_MESH_MODEL_OP_2(0x82, 0x61)
89 
90 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_RANGE_GET \
91 	BT_MESH_MODEL_OP_2(0x82, 0x62)
92 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_RANGE_STATUS \
93 	BT_MESH_MODEL_OP_2(0x82, 0x63)
94 
95 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_SET	BT_MESH_MODEL_OP_2(0x82, 0x64)
96 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_SET_UNACK	BT_MESH_MODEL_OP_2(0x82, 0x65)
97 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x66)
98 
99 #define	BT_MESH_MODEL_LIGHT_CTL_DEFAULT_GET	BT_MESH_MODEL_OP_2(0x82, 0x67)
100 #define	BT_MESH_MODEL_LIGHT_CTL_DEFAULT_STATUS	BT_MESH_MODEL_OP_2(0x82, 0x68)
101 
102 #define	BT_MESH_MODEL_LIGHT_CTL_DEFAULT_SET  BT_MESH_MODEL_OP_2(0x82, 0x69)
103 #define	BT_MESH_MODEL_LIGHT_CTL_DEFAULT_SET_UNACK \
104 	BT_MESH_MODEL_OP_2(0x82, 0x6A)
105 
106 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_RANGE_SET \
107 	BT_MESH_MODEL_OP_2(0x82, 0x6B)
108 #define	BT_MESH_MODEL_LIGHT_CTL_TEMP_RANGE_SET_UNACK \
109 	BT_MESH_MODEL_OP_2(0x82, 0x6C)
110 
111 void bt_ready(void);
112 
113 #endif
114