def get_capabilities(self):
        assert self.grab_lock()
        ccid_dev = self.watcher.open()
        if ccid_dev:
            dev = YubiOathCcid(ccid_dev)
            return Capabilities(True, None, dev.version)
        legacy = self.open_otp()
        if legacy:
            return Capabilities(None, legacy.slot_status(), (0, 0, 0))
        return Capabilities(None, None, (0, 0, 0))