1 BlueZ D-Bus Attribute API description 2 ************************************* 3 4 Copyright (C) 2004-2010 Marcel Holtmann <marcel (a] holtmann.org> 5 6 7 Attribute hierarchy 8 =================== 9 10 Service org.bluez 11 Interface org.bluez.Service 12 org.bluez.Characteristic 13 Object path [prefix]/{hci0}/{service0} 14 [prefix]/{hci0}/{device0}/{service0}/{characteristic0,...} 15 [prefix]/{hci0}/{device0}/{service1}/{characteristic0,...} 16 17 Service details 18 --------------- 19 20 One service object path for every remote SDP record or service in the 21 attribute database. One service object path for every local SDP record 22 or service from attribute database. 23 24 Local services are children of the adapter object path. Remote services 25 are children of the remote device object path. This doesn't solve the 26 problem where local atttributes can have different instances based on 27 the remote device. 28 29 In general the idea is to also represent SDP records as services so that 30 new style application can just use the service interfaces to retrieve the 31 needed information. That way the usage of SDP and GATT would be mostly 32 fully transparent and a differentiation becomes unimportant in the future. 33 34 A service consists of some generic service information and a set of 35 characteristics. All characteristic are presented as object path as well. 36 37 Properties 38 ---------- 39 string Name (mandatory) 40 41 General name of service 42 43 string Description (optional) 44 45 Description of service 46 47 string UUID (mandatory) 48 49 UUID of service. Service class value for SDP and GATT UUID 50 for attribute based services. 51 52 array{object} Characteristics 53 54 This list contains the characteristics owned by this specific 55 service and other characteristics from service includes. That 56 way no complicated service includes array is needed. 57 58 string UUID 59 string Name 60 string Description 61 struct Format (type, name, exponet etc.) 62 63 array{byte} Value 64 string Representation (of the binary Value) 65 66 object Service (the original service in case of includes) 67 68 At this point only GetProperties() method call should be 69 supported for simplicity. Changing characteristics is up 70 to future support. 71 72 The object path of the characteristics might be split 73 over multiple service objects, because of includes. 74 75 array[(object, dict)] GetCharacteristics() 76 77 Array of tuples with object path as identifier. An alternativ 78 is doing dict of dict since the object path is unique and the 79 order of characteristics is irrelevant. However it might be 80 good to actually present an order here. 81 82 See Characteristics properties for dictionary details. 83 84 RegisterCharacteristicsWatcher(object path) 85 86 Register a watcher for changes in specific characteristics 87 to monitor changes. 88 89 A watcher will be registered for this service and will 90 notifier about any changed characteristics in the service. 91 This also notifies about any included characteristics. 92 93 Method for the watch objects still need to be defined. 94 95 UnregisterCharacteristicsWatcher(object path) 96 97 Unregister a watcher. 98