2 Commits
Author SHA1 Message Date
MrBlake 2a12166615 Release v0.1.1 2026-10-23 21:15:47 +02:00
MrBlakeandClaude Opus 5.5 d0fd799aeb Fix keyboard always shown as asleep
Replies carry the target as an index (0x08 -> 0x00, 0x09 -> 0x01),
not the target byte itself, so every reply was discarded. Also put the
receiver into software mode before reading its pairing list and read
firmware and serial independently.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 21:15:47 +02:00
3 changed files with 12 additions and 8 deletions

No files matched your search

+1 -1
View File
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
+10 -6
View File
@@ -62,7 +62,8 @@ class Transport:
deadline = time.monotonic() + timeout
while (left := deadline - time.monotonic()) > 0:
resp = self.dev.read(left)
if resp and resp[0] == pkt[0] and resp[1] == pkt[1]:
# Replies carry the target as an index (0x08 -> 0, 0x09 -> 1) and echo the command.
if resp and resp[0] == pkt[0] & 0x07 and resp[1] == pkt[1]:
return resp
raise DeviceError(f"no response to {pkt[:4].hex(' ')}")
@@ -256,11 +257,14 @@ class DeviceService:
self._h = _Handles(transport, notify, Keyboard(transport, target), receiver)
self._set(receiver=True, wireless=wireless, error="")
if receiver:
try:
self._set(receiver_firmware=receiver.firmware(), serial=self._paired_serial())
receiver.set_mode(bragi.MODE_SOFTWARE)
except DeviceError as e:
log.warning("receiver init: %s", e)
# Software mode first: the receiver refuses the pairing list in hardware mode.
for step in (lambda: receiver.set_mode(bragi.MODE_SOFTWARE),
lambda: self._set(receiver_firmware=receiver.firmware()),
lambda: self._set(serial=self._paired_serial())):
try:
step()
except DeviceError as e:
log.warning("receiver init: %s", e)
self._init_keyboard()
return True
+1 -1
View File
@@ -1,6 +1,6 @@
# Maintainer: Louis <[email protected]>
pkgname=k65studio
pkgver=0.1.0
pkgver=0.1.1
pkgrel=1
pkgdesc="Beleuchtung, Spielmodus, Akku und Profile für die Corsair K65 PLUS Wireless"
arch=('any')