Skip to content

Match AJAZZ AKP03 and other clones by USB ID - #1

Open
nanderss wants to merge 1 commit into
okoker:mainfrom
nanderss:akp03-usb-id
Open

Match AJAZZ AKP03 and other clones by USB ID#1
nanderss wants to merge 1 commit into
okoker:mainfrom
nanderss:akp03-usb-id

Conversation

@nanderss

Copy link
Copy Markdown

The README lists the AJAZZ AKP03 as a known clone that "should work out of the box", but it doesn't: it enumerates under different USB IDs than the hardcoded pair, so IOHIDManagerSetDeviceMatching never fires and the daemon waits forever for a device that is plugged in and working.

On my unit (macOS 26.5, Apple Silicon) it appears as:

"Manufacturer"      = "HOTSPOTEKUSB"
"Product"           = "HOTSPOTEKUSB HID DEMO"
"VendorID"          = 768     (0x0300)
"ProductID"         = 12290   (0x3002)
"PrimaryUsagePage"  = 65440   (0xFFA0)
"PrimaryUsage"      = 1
"MaxOutputReportSize" = 1024

Everything except the IDs matches what Protocol.swift expects — same vendor usage page, same usage, same 1024-byte output reports — and it speaks the CRT protocol unmodified. Buttons, both knob types and knob clicks all decode correctly once the matcher accepts it.

Replaces the single vendorID/productID pair with a deviceIDs list and builds one matching dictionary per entry. IOHIDManagerSetDeviceMatchingMultiple was already being used, so this is just supplying more than one.

Also logs the IDs being waited for at startup. With no match the daemon is completely silent, which is indistinguishable from a device that failed to enumerate — that ambiguity is most of what made this hard to diagnose.

Tested on an AJAZZ AKP03. I don't have a TreasLin N3 to confirm the original path still matches, but that entry is unchanged.

The AJAZZ AKP03 is listed as a supported clone, but it enumerates as
0300:3002 with the descriptor "HOTSPOTEKUSB HID DEMO" rather than the
5548:1001 that was hardcoded. It exposes the same 0xFFA0/0x01 vendor HID
interface with 1024-byte reports and speaks the same CRT protocol, so it
works unmodified once the matcher accepts its IDs.

Replace the single vendorID/productID pair with a deviceIDs list and
build one matching dictionary per entry. Also log the IDs being waited
for: with no device attached the daemon otherwise sits silent forever,
which is indistinguishable from a device that failed to connect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant