Handle no appearance data type (0x19) in adv data 33/243333/2 accepted/tizen/unified/20200909.014251 submit/tizen/20200907.031811
authorDoHyun Pyun <dh79.pyun@samsung.com>
Sun, 6 Sep 2020 23:46:02 +0000 (08:46 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 7 Sep 2020 00:34:07 +0000 (09:34 +0900)
Change-Id: I51659c64f66a449d2135f1414bce7b18e890fef0
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-oal/bluez_hal/src/bt-hal-adapter-le.c
bt-oal/hardware/bt_gatt_server.h
bt-oal/include/oal-gatt.h
bt-oal/oal-gatt.c
bt-service/services/adapter/bt-service-core-adapter-le.c

index 9859df0..ba84848 100644 (file)
@@ -813,7 +813,11 @@ int _bt_hal_set_advertising_data(btgatt_adv_param_setup_t adv_param_setup)
        }
 
        /* Set Apperance */
-       if (adv_param_setup.appearance >= 0) {
+#ifdef TIZEN_BT_HAL
+       if (adv_param_setup.include_appearance != 0) {
+#else
+       if (adv_param_setup.appearance > 0) {
+#endif
                adv_data[index] = 0x03;
                adv_data[index+1] = 0x19;
                adv_data[index+2] = (uint8_t) (adv_param_setup.appearance & 0xFF);
index d1fd236..73df96c 100644 (file)
@@ -44,6 +44,9 @@ typedef struct {
        bool     set_scan_rsp;
        bool     include_name;
        bool     include_txpower;
+#ifdef TIZEN_BT_HAL
+       bool     include_appearance;
+#endif
        uint16_t  appearance;
        char*    manufacturer_data;
        uint16_t manufacturer_data_len;
index 4d06060..6f9f7c4 100644 (file)
@@ -72,6 +72,9 @@ typedef struct {
        uint8_t  set_scan_rsp;
        uint8_t  include_name;
        uint8_t  include_txpower;
+#ifdef TIZEN_BT_HAL
+       uint8_t  include_appearance;
+#endif
        uint16_t  appearance;
        char*    manufacturer_data;
        uint16_t manufacturer_data_len;
index f99fe74..ab6cc88 100644 (file)
@@ -563,6 +563,9 @@ oal_status_t gatts_multi_adv_set_inst_data(int instance_id,
        adv_setup.set_scan_rsp = adv_param_setup->set_scan_rsp;
        adv_setup.include_name = adv_param_setup->include_name;
        adv_setup.include_txpower = adv_param_setup->include_txpower;
+#ifdef TIZEN_BT_HAL
+       adv_setup.include_appearance = adv_param_setup->include_appearance;
+#endif
        adv_setup.appearance = adv_param_setup->appearance;
        adv_setup.manufacturer_data = adv_param_setup->manufacturer_data;
        adv_setup.manufacturer_data_len = adv_param_setup->manufacturer_data_len;
index 99d7bb6..187bd7f 100644 (file)
@@ -1550,6 +1550,9 @@ static int __bt_set_multi_adv_param(oal_ble_multi_adv_param_setup_t *adv_setup,
                        break;
                }
                case 0x19: {
+#ifdef TIZEN_BT_HAL
+                       adv_setup->include_appearance = 1;
+#endif
                        memcpy(&adv_setup->appearance, (ptr + 2), (len - 1));
                        break;
                }