data_len = g_variant_get_uint16(value);
DBG("LegacyManufacturerDataLen [%d]", data_len);
} else if (!g_strcmp0(key, "LegacyManufacturerData")) {
+ DBG("LegacyManufacturerData");
+
manufacturer_data = g_byte_array_new();
g_variant_get(value, "ay", &char_value_iter);
while (g_variant_iter_loop(char_value_iter, "y", &char_value))
if (manufacturer_data) {
if (manufacturer_data->len > 0) {
size += __bt_insert_hal_properties(
- buf + size, HAL_PROP_DEVICE_BLE_ADV_DATA,
+ buf + size, HAL_PROP_DEVICE_MANUFACTURER_DATA,
manufacturer_data->len, manufacturer_data->data);
ev->num_props++;
}
dev_info->type = dev_type - 1;//OAL enum starts with 0 and Bluedroid with 1
break;
}
+ case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA:
case BT_PROPERTY_REMOTE_BLE_ADV_DATA: {
if (adv_info) {
adv_info->adv_data = properties[i].val;
#define BLUETOOTH_UUID_STRING_MAX 50
-#define BT_DEVICE_MANUFACTURER_DATA_LEN_MAX 31 /**<This specifies the Maximum manufacturer data Length>*/
+#define BT_DEVICE_MANUFACTURER_DATA_LEN_MAX 62 /**<This specifies the Maximum manufacturer data Length>*/
typedef void (*oal_event_callback)(int event, gpointer event_data, gsize size);
memcpy(&dev_props_event->device_info,
dev_info, sizeof(remote_device_t));
} else {
+ int i;
+
BT_DBG("BREDR type Device");
+
+ /* Legacy Manufacturer data */
+ if (adv_info.len > 0) {
+ dev_props_event->adv_len = adv_info.len;
+ if (dev_props_event->adv_len > 0)
+ memcpy(dev_props_event->adv_data,
+ adv_info.adv_data, adv_info.len);
+
+ for (i = 0; i < dev_props_event->adv_len; i++)
+ BT_DBG("Adv Data[%d] = [0x%x]",
+ i, dev_props_event->adv_data[i]);
+ }
+
memcpy(&dev_props_event->device_info,
dev_info, sizeof(remote_device_t));
+
}
event_data = dev_props_event;