Merge "Implement get and input pairing pin"
diff --git a/acts/framework/acts/controllers/fuchsia_lib/bt/btc_lib.py b/acts/framework/acts/controllers/fuchsia_lib/bt/btc_lib.py
index 4fe0171..54e81b0 100644
--- a/acts/framework/acts/controllers/fuchsia_lib/bt/btc_lib.py
+++ b/acts/framework/acts/controllers/fuchsia_lib/bt/btc_lib.py
@@ -82,6 +82,35 @@
 
         return self.send_command(test_id, test_cmd, test_args)
 
+    def inputPairingPin(self, pin):
+        """Inputs the pairing pin to the Fuchsia devices' pairing delegate.
+
+        Args:
+            pin: A string that represents the pin to input.
+
+        Returns:
+            Dictionary, None if success, error if error.
+        """
+        test_cmd = "bt_control_facade.BluetoothInputPairingPin"
+        test_args = {"pin": pin}
+        test_id = self.build_id(self.test_counter)
+        self.test_counter += 1
+
+        return self.send_command(test_id, test_cmd, test_args)
+
+    def getPairingPin(self):
+        """Gets the pairing pin from the Fuchsia devices' pairing delegate.
+
+        Returns:
+            Dictionary, None if success, error if error.
+        """
+        test_cmd = "bt_control_facade.BluetoothGetPairingPin"
+        test_args = {}
+        test_id = self.build_id(self.test_counter)
+        self.test_counter += 1
+
+        return self.send_command(test_id, test_cmd, test_args)
+
     def initBluetoothControl(self):
         """Initialises the Bluetooth Control Interface proxy in SL4F.
 
diff --git a/acts/framework/acts/test_utils/bt/gatt_test_database.py b/acts/framework/acts/test_utils/bt/gatt_test_database.py
index 383e175..2eae933 100644
--- a/acts/framework/acts/test_utils/bt/gatt_test_database.py
+++ b/acts/framework/acts/test_utils/bt/gatt_test_database.py
@@ -119,8 +119,7 @@
                     gatt_descriptor['permission_write'],
                 }, {
                     'uuid': '0000b017-0000-1000-8000-00805f9b34fb',
-                    'permissions': gatt_descriptor['permission_read'] |
-                    gatt_descriptor['permission_write'] |
+                    'permissions':
                     gatt_characteristic['permission_read_encrypted_mitm'],
                 }]
             }]
diff --git a/acts/tests/google/fuchsia/bt/fuchsia_cmd_input.py b/acts/tests/google/fuchsia/bt/fuchsia_cmd_input.py
index 9c554d4..2e7d8b3 100644
--- a/acts/tests/google/fuchsia/bt/fuchsia_cmd_input.py
+++ b/acts/tests/google/fuchsia/bt/fuchsia_cmd_input.py
@@ -1284,4 +1284,36 @@
         except Exception as err:
             self.log.error(FAILURE.format(cmd, err))
 
+    def do_btc_input_pairing_pin(self, line):
+        """
+        Description: Sends a pairing pin to SL4F's Bluetooth Control's
+        Pairing Delegate.
+
+        Usage:
+          Examples:
+            btc_input_pairing_pin 123456
+        """
+        cmd = "Input pairing pin to the Fuchsia device."
+        try:
+            result = self.pri_dut.btc_lib.inputPairingPin(line)['result']
+            self.log.info(result)
+        except Exception as err:
+            self.log.error(FAILURE.format(cmd, err))
+
+    def do_btc_get_pairing_pin(self, line):
+        """
+        Description: Gets the pairing pin from SL4F's Bluetooth Control's
+        Pairing Delegate.
+
+        Usage:
+          Examples:
+            btc_get_pairing_pin
+        """
+        cmd = "Get the pairing pin from the Fuchsia device."
+        try:
+            result = self.pri_dut.btc_lib.getPairingPin()['result']
+            self.log.info(result)
+        except Exception as err:
+            self.log.error(FAILURE.format(cmd, err))
+
     """End Bluetooth Control wrappers"""