From: Michal Pawluk Date: Mon, 21 Dec 2015 19:00:59 +0000 (+0100) Subject: [SAMPLE APP][Bluetooth LE Service] Advertiser creation section updated X-Git-Tag: tizen_3.0/TD_SYNC/20161201~212^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11b18ba7f56e4a41430b9c37b9b764c2dd9af9e9;p=sdk%2Fonline-doc.git [SAMPLE APP][Bluetooth LE Service] Advertiser creation section updated Change-Id: I8a0961961b58f7ce10d09106c27263af69c2f163 Signed-off-by: Michal Pawluk --- diff --git a/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm b/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm index f58401d..7a31a89 100644 --- a/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm +++ b/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm @@ -192,6 +192,82 @@ static bool __create_advertizer(bt_advertiser_h *adv_h, int appearance) } +

+Within the __create_advertizer() function: +

+The advertiser's properties setting determines the amount and the category of information to be broadcasted over the Bluetooth LE adapter. It is assumed that: + +The __set_advertizing_properties() and the +__set_scan_response_properties() functions are only convenient wrappers and call the +__set_properties() function with appropriately adjusted arguments. For reference of properties' setting, see the code listing below. +

+ +
+static bool __set_properties(bt_advertiser_h adv_h, struct _adv_properties properties)
+{
+   /* Sets whether the device's name is to be included in the packet. */
+   if (!bt_common_set_device_name(adv_h, properties.pkt_type, properties.name))
+      return false;
+
+   /* Sets the device's appearance value if provided. */
+   if (properties.appearance > 0)
+      if (!bt_common_set_appearance(adv_h, properties.pkt_type, properties.appearance))
+         return false;
+
+   /* Sets the device's manufacturer identifier if provided. */
+   if (properties.manufacturer_id > 0)
+      if (!bt_common_set_manufacturer(adv_h,
+                        properties.pkt_type,
+                        properties.manufacturer_id,
+                        (const char *)&properties.manufacturer_data,
+                        sizeof(struct _manufacturer_data)))
+         return false;
+
+   /* Sets whether the transmition power level is to be included in the packet. */
+   if (!bt_common_set_tx_power_level(adv_h, properties.pkt_type, properties.tx_power))
+      return false;
+
+   return true;
+}
+
+ +

+See the References section for details of all undescribed functions. +

+

Data advertising