code: def connect(self, uri, link_quality_callback, link_error_callback):
          
  
          # check if the URI is a radio URI
          if not re.search('^usb://', uri):
              raise WrongUriType('Not a radio URI')
  
          # Open the USB dongle
          if not re.search('^usb://([0-9]+)$',
                           uri):
              raise WrongUriType('Wrong radio URI format!')
  
          uri_data = re.search('^usb://([0-9]+)$',
                               uri)
  
          self.uri = uri
  
          if self.cfusb is None:
              self.cfusb = CfUsb(devid=int(uri_data.group(1)))
              if self.cfusb.dev:
                  self.cfusb.set_crtp_to_usb(True)
              else:
                  self.cfusb = None
                  raise Exception('Could not open {}'.format(self.uri))
  
          else:
              raise Exception('Link already open!')
  
          # Prepare the inter-thread communication queue
          self.in_queue = queue.Queue()
          # Limited size out queue to avoid "ReadBack" effect
          self.out_queue = queue.Queue(50)
  
          # Launch the comm thread
          self._thread = _UsbReceiveThread(self.cfusb, self.in_queue,
                                           link_quality_callback,
                                           link_error_callback)
          self._thread.start()
  
          self.link_error_callback = link_error_callback
docs: Connect the link driver to a specified URI of the format:
          radio://<dongle nbr>/<radio channel>/[250K,1M,2M]
  
          The callback for linkQuality can be called at any moment from the
          driver to report back the link quality in percentage. The
          callback from linkError will be called when a error occues with
          an error message.