Skip to content

Commit 2c64fe7

Browse files
simeneilevstjonnaescolar
authored andcommitted
Bluetooth: Implemented new DIS characteristics
Implemented new DIS characteristics: - UDI for medical devices - IEEE 11073-20601 Regulatory Certification Data List - System ID Also fixed buffer overflow bug when assigning too long DIS string literals Signed-off-by: Simen Eilevstjønn <[email protected]>
1 parent eb406f8 commit 2c64fe7

File tree

3 files changed

+359
-63
lines changed

3 files changed

+359
-63
lines changed

include/zephyr/bluetooth/uuid.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5090,6 +5090,16 @@ struct bt_uuid_128 {
50905090
#define BT_UUID_GATT_SL \
50915091
BT_UUID_DECLARE_16(BT_UUID_GATT_SL_VAL)
50925092

5093+
/**
5094+
* @brief GATT Characteristic UDI for Medical Devices UUID Value
5095+
*/
5096+
#define BT_UUID_UDI_FOR_MEDICAL_DEVICES_VAL 0x2bff
5097+
/**
5098+
* @brief GATT Characteristic UDI for Medical Devices
5099+
*/
5100+
#define BT_UUID_UDI_FOR_MEDICAL_DEVICES \
5101+
BT_UUID_DECLARE_16(BT_UUID_UDI_FOR_MEDICAL_DEVICES_VAL)
5102+
50935103
/**
50945104
* @brief Gaming Service UUID value
50955105
*/

subsys/bluetooth/services/Kconfig.dis

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,74 @@ config BT_DIS_SW_REV_STR
144144
help
145145
Enable software revision characteristic in Device Information Service.
146146

147+
config BT_DIS_UDI
148+
bool "DIS UDI for Medical Devices characteristic"
149+
help
150+
Enable UDI for Medical Devices characteristic in Device Information Service.
151+
152+
if BT_DIS_UDI
153+
config BT_DIS_UDI_LABEL_STR
154+
string "UDI Label"
155+
help
156+
String value matching the UDI in human readable form
157+
as assigned to the product by a recognized UDI Issuer.
158+
159+
config BT_DIS_UDI_DI_STR
160+
string "UDI Device Identifier"
161+
help
162+
A fixed portion of a UDI that identifies the labeler and the
163+
specific version or model of a device.
164+
165+
config BT_DIS_UDI_ISSUER_STR
166+
string "UDI Issuer"
167+
help
168+
OID representing the UDI Issuing Organization, such as GS1.
169+
170+
config BT_DIS_UDI_AUTHORITY_STR
171+
string "UDI Authority"
172+
help
173+
OID representing the regional UDI Authority, such as the US FDA.
174+
endif # BT_DIS_UDI
175+
176+
config BT_DIS_SYSTEM_ID
177+
bool "DIS System ID characteristic [experimental]"
178+
select EXPERIMENTAL
179+
help
180+
Enable System ID characteristic in Device Information Service.
181+
The System ID characteristic is used to represent an extended unique identifier (EUI) of the system
182+
implementing the service that contains this characteristic. This 64-bit structure is an EUI-64 which consists
183+
of an Organizationally Unique Identifier (OUI) concatenated with a manufacturer-defined identifier.
184+
185+
This will be transmitted as the 40 bit identifier followed by the 24-bit OUI.
186+
Both in little-endian format.
187+
188+
if BT_DIS_SYSTEM_ID
189+
config BT_DIS_SYSTEM_ID_OUI
190+
hex "Organizationally Unique Identifier (OUI) of the manufacturer."
191+
range 0 0xFFFFFF
192+
default 0
193+
help
194+
The OUI is a 24-bit number issued by the IEEE Registration Authority.
195+
System ID characteristic in Device Information Service.
196+
Shall contain an Organisationally Unique Identifier (OUI) followed by a manufacturer-defined indentifier unique for the device.
197+
198+
config BT_DIS_SYSTEM_ID_IDENTIFIER
199+
hex "Manufacturer-defined unique identifier."
200+
range 0 0xFFFFFFFFFF
201+
default 0
202+
help
203+
The manufacturer-defined unique identifier is 40 bits long.
204+
endif # BT_DIS_SYSTEM_ID
205+
206+
config BT_DIS_IEEE_RCDL
207+
bool "DIS IEEE 11073-20601 Regulatory Certification Data List characteristic"
208+
help
209+
Enable IEEE 11073-20601 Regulatory Certification Data List characteristic in Device Information Service.
210+
211+
config BT_DIS_IEEE_RCDL_STR
212+
string "IEEE 11073-20601 Regulatory Certification Data List"
213+
depends on BT_DIS_IEEE_RCDL
214+
help
215+
IEEE 11073-20601 Regulatory Certification Data List characteristic in Device Information Service string contents.
216+
147217
endif # BT_DIS

0 commit comments

Comments
 (0)