code: def find_devices (self, lookup_names=True,
              duration=8,
              flush_cache=True):
          
          if self.is_inquiring:
              raise BluetoothError (EBUSY, "Already inquiring!")
  
          self.lookup_names = lookup_names
  
          self.sock = _gethcisock (self.device_id)
          flt = _bt.hci_filter_new ()
          _bt.hci_filter_all_events (flt)
          _bt.hci_filter_set_ptype (flt, _bt.HCI_EVENT_PKT)
  
          try:
              self.sock.setsockopt (_bt.SOL_HCI, _bt.HCI_FILTER, flt)
          except _bt.error as e:
              raise BluetoothError (*e.args)
  
          # send the inquiry command
          max_responses = 255
          cmd_pkt = struct.pack ("BBBBB", 0x33, 0x8b, 0x9e, \
                  duration, max_responses)
  
          self.pre_inquiry ()
  
          try:
              _bt.hci_send_cmd (self.sock, _bt.OGF_LINK_CTL, \
                      _bt.OCF_INQUIRY, cmd_pkt)
          except _bt.error as e:
              raise BluetoothError (*e.args)
  
          self.is_inquiring = True
  
          self.names_to_find = {}
          self.names_found = {}
docs: 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