Add robot socket channel 77/259177/3
authorWootak Jung <wootak.jung@samsung.com>
Tue, 1 Jun 2021 00:15:30 +0000 (09:15 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 2 Jun 2021 01:57:38 +0000 (10:57 +0900)
Change-Id: Iab39beae121598e659f5e646d306ac7577600269
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-api/bt-common.c
include/bluetooth-api.h

index 2dd2700..d82e921 100644 (file)
@@ -1233,10 +1233,19 @@ int _bt_register_profile(bt_register_profile_info_t *info, gboolean use_default_
         * RFCOMM channels based on the availability when two services want
         * to use the RFCOMM along with SPP. Hence bluez makes sure that no
         * two services use the same SPP RFCOMM channel. */
-       if (use_default_rfcomm)
-               g_variant_builder_add(option_builder, "{sv}",
-                                               "Channel",
-                                               g_variant_new_uint16(RFCOMM_DEFAULT_PROFILE_CHANNEL));
+       if (use_default_rfcomm) {
+               if (TIZEN_FEATURE_ROBOT_REFERENCE) {
+                       BT_INFO("Use channel 22 for robot");
+                       g_variant_builder_add(option_builder, "{sv}",
+                                       "Channel",
+                                       g_variant_new_uint16(RFCOMM_ROBOT_PROFILE_CHANNEL));
+               } else {
+                       g_variant_builder_add(option_builder, "{sv}",
+                                       "Channel",
+                                       g_variant_new_uint16(RFCOMM_DEFAULT_PROFILE_CHANNEL));
+               }
+       }
+
        if (info->service)
                g_variant_builder_add(option_builder, "{sv}",
                                                "Service",
index 7ee62b6..6e916ac 100644 (file)
@@ -74,6 +74,7 @@ extern "C" {
  * This is RFCOMM default Channel Value
  */
 #define RFCOMM_DEFAULT_PROFILE_CHANNEL 0
+#define RFCOMM_ROBOT_PROFILE_CHANNEL 22
 
 /**
  * This is maximum length for search value string for PBAP Phonebook Search