replaced uuids in Android BLE
authorjihwan.seo <jihwan.seo@samsung.com>
Wed, 1 Jul 2015 07:42:54 +0000 (16:42 +0900)
committerErich Keane <erich.keane@intel.com>
Wed, 1 Jul 2015 16:21:59 +0000 (16:21 +0000)
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 <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1471
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java
resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaLeClientInterface.java
resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h

index 42165f2..ddeeb48 100644 (file)
@@ -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<UUID> 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);
                     }
index beb62c3..891cb40 100644 (file)
@@ -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<UUID> 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);
                     }
index 4e25589..b56bcd7 100644 (file)
@@ -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;