docs: def close(self):
          """Closes the connection to the dongle.
          
          Calls :meth:`reset` and then closes the serial port connection to the dongle."""
          logger.debug('closing dongle, {} active connections'.format(len(self.conn_handles)))
          if self.is_scanning():
              logger.debug('in scanning mode, calling end_scan')
              self.end_scan()
          self.reset()
          if self.api is not None:
              self.api.stop_daemon()
              self.api = None