From 0fea3d67cd776fa1fd420620ff6d5ccf2ec95291 Mon Sep 17 00:00:00 2001 From: "jihwan.seo" Date: Wed, 1 Jul 2015 16:42:54 +0900 Subject: [PATCH] replaced uuids in Android BLE I have replaced current uuids in android BLE with new uuids which mentioned in OIC spec. (https://workspace.openinterconnect.org/ apps/org/workgroup/oswg/download.php/1568/ OIC_BLE_Transport_Profile.pdf) Change-Id: I409174458c0abc2c669f252e4e3ac44e9a040743 Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/1471 Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- .../base/src/main/java/org/iotivity/ca/CaLeClientInterface.java | 4 ++-- .../sample_service/src/org/iotivity/ca/CaLeClientInterface.java | 4 ++-- resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java b/android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java index 42165f2..ddeeb48 100644 --- a/android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java +++ b/android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java @@ -40,7 +40,7 @@ import android.util.Log; public class CaLeClientInterface { - private static String SERVICE_UUID = "713d0000-503e-4c75-ba94-3148f18d941e"; + private static String SERVICE_UUID = "ADE3D529-C784-4F63-A987-EB69F70EE816"; private CaLeClientInterface(Context context) { @@ -122,7 +122,7 @@ public class CaLeClientInterface { List uuids = getUuids(scanRecord); for (UUID uuid : uuids) { Log.d("CA", "UUID : " + uuid.toString()); - if(uuid.toString().contains(SERVICE_UUID)) { + if(uuid.toString().contains(SERVICE_UUID.toLowerCase())) { Log.d("CA", "we found that has the Device"); caLeScanCallback(device, rssi, scanRecord); } diff --git a/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaLeClientInterface.java b/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaLeClientInterface.java index beb62c3..891cb40 100644 --- a/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaLeClientInterface.java +++ b/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaLeClientInterface.java @@ -40,7 +40,7 @@ import android.util.Log; public class CaLeClientInterface { - private static String SERVICE_UUID = "713d0000-503e-4c75-ba94-3148f18d941e"; + private static String SERVICE_UUID = "ADE3D529-C784-4F63-A987-EB69F70EE816"; private static String TAG = "Sample_Service : CaLeClientInterface"; private CaLeClientInterface(Context context) { @@ -123,7 +123,7 @@ public class CaLeClientInterface { List uuids = getUuids(scanRecord); for (UUID uuid : uuids) { Log.d(TAG, "UUID : " + uuid.toString()); - if(uuid.toString().contains(SERVICE_UUID)) { + if(uuid.toString().contains(SERVICE_UUID.toLowerCase())) { Log.d(TAG, "we found that has the Device"); caLeScanCallback(device, rssi, scanRecord); } diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h b/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h index 4e25589..b56bcd7 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h @@ -36,9 +36,9 @@ extern "C" #endif /* Service UUID */ -static const char OIC_GATT_SERVICE_UUID[] = "713d0000-503e-4c75-ba94-3148f18d941e"; -static const char OIC_GATT_CHARACTERISTIC_RESPONSE_UUID[] = "713d0002-503e-4c75-ba94-3148f18d941e"; -static const char OIC_GATT_CHARACTERISTIC_REQUEST_UUID[] = "713d0003-503e-4c75-ba94-3148f18d941e"; +static const char OIC_GATT_SERVICE_UUID[] = "ADE3D529-C784-4F63-A987-EB69F70EE816"; +static const char OIC_GATT_CHARACTERISTIC_REQUEST_UUID[] = "AD7B334F-4637-4B86-90B6-9D787F03D218"; +static const char OIC_GATT_CHARACTERISTIC_RESPONSE_UUID[] = "E9241982-4580-42C4-8831-95048216B256"; static const char OIC_GATT_CHARACTERISTIC_CONFIG_UUID[] = "00002902-0000-1000-8000-00805f9b34fb"; static const uint32_t GATT_SUCCESS = 0; -- 2.7.4