(self, address=None)
Delete the bonds stored on the adapter.

        address - the address of the device to unbond. If not provided, will
            erase all bonds.

        Note: this does not delete the corresponding bond stored on the remote
              device.
Delete the bonds stored on the adapter.
Delete the bonds stored on the adapter .
def clear_bond(self, address=None):
        """
        Delete the bonds stored on the adapter.

        address - the address of the device to unbond. If not provided, will
            erase all bonds.

        Note: this does not delete the corresponding bond stored on the remote
              device.
        """
        # Find bonds
        log.info("Fetching existing bonds for devices")
        self._stored_bonds = []
        self.send_command(CommandBuilder.sm_get_bonds())

        try:
            self.expect(ResponsePacketType.sm_get_bonds)
        except NotConnectedError:
            pass

        if self._num_bonds == 0:
            return

        while len(self._stored_bonds) < self._num_bonds:
            self.expect(EventPacketType.sm_bond_status)

        for b in reversed(self._stored_bonds):
            log.info("Deleting bond %s", b)

            self.send_command(CommandBuilder.sm_delete_bonding(b))
            self.expect(ResponsePacketType.sm_delete_bonding)
def clear_bond ( self , address = None ) : # Find bonds log . info ( "Fetching existing bonds for devices" ) self . _stored_bonds = [ ] self . send_command ( CommandBuilder . sm_get_bonds ( ) ) try : self . expect ( ResponsePacketType . sm_get_bonds ) except NotConnectedError : pass if self . _num_bonds == 0 : return while len ( self . _stored_bonds ) < self . _num_bonds : self . expect ( EventPacketType . sm_bond_status ) for b in reversed ( self . _stored_bonds ) : log . info ( "Deleting bond %s" , b ) self . send_command ( CommandBuilder . sm_delete_bonding ( b ) ) self . expect ( ResponsePacketType . sm_delete_bonding )