def find_devices (self, lookup_names=True,<EOL>duration=<NUM_LIT:8>,<EOL>flush_cache=True):
if self.is_inquiring:<EOL><INDENT>raise BluetoothError (EBUSY, "<STR_LIT>")<EOL><DEDENT>self.lookup_names = lookup_names<EOL>self.sock = _gethcisock (self.device_id)<EOL>flt = _bt.hci_filter_new ()<EOL>_bt.hci_filter_all_events (flt)<EOL>_bt.hci_filter_set_ptype (flt, _bt.HCI_EVENT_PKT)<EOL>try:<EOL><INDENT>self.sock.setsockopt (_bt.SOL_HCI, _bt.HCI_FILTER, flt)<EOL><DEDENT>except _bt.error as e:<EOL><INDENT>raise BluetoothError (*e.args)<EOL><DEDENT>max_responses = <NUM_LIT:255><EOL>cmd_pkt = struct.pack ("<STR_LIT>", <NUM_LIT>, <NUM_LIT>, <NUM_LIT>,duration, max_responses)<EOL>self.pre_inquiry ()<EOL>try:<EOL><INDENT>_bt.hci_send_cmd (self.sock, _bt.OGF_LINK_CTL,_bt.OCF_INQUIRY, cmd_pkt)<EOL><DEDENT>except _bt.error as e:<EOL><INDENT>raise BluetoothError (*e.args)<EOL><DEDENT>self.is_inquiring = True<EOL>self.names_to_find = {}<EOL>self.names_found = {}<EOL>
find_devices (lookup_names=True, service_name=None,
               duration=8, flush_cache=True)

Call this method to initiate the device discovery process

lookup_names - set to True if you want to lookup the user-friendly
               names for each device found.

service_name - set to the name of a service you're looking for.
               only devices with a service of this name will be
               returned in device_discovered () NOT YET IMPLEMENTED


ADVANCED PARAMETERS:  (don't change these unless you know what
                    you're doing)

duration - the number of 1.2 second units to spend searching for
           bluetooth devices.  If lookup_names is True, then the
           inquiry process can take a lot longer.

flush_cache - return devices discovered in previous inquiries