delan / usb3sun

usb input adapter for sun workstations
https://funny.computer.daz.cat/usb3sun/
ISC License
33 stars 6 forks source link

05AC:024F Apple Magic Keyboard with Numeric Keypad (model A1243) #4

Open delan opened 11 months ago

delan commented 11 months ago

reported by Anthony Sorace in http://a.9srv.net/reports/usb3sun.html

The behavior for the Apple keyboard is odd. The usb3sun makes no beep on connect, but makes the standard beep on disconnect. If a different (working) keyboard is attached, it behaves normally. If the Apple keyboard is re-attached, though, the usb3sun seems hung: no connections from any keyboard are recognized, and no beep is emited on disconnecting the Apple keyboard. A reset using the on-board button restores normal function. This keyboard is known to function normally with other non-Apple hardware (it was used to type this report while connected to a Raspberry Pi running Plan 9).

Notably, the Keyboardio Atreus does not exhibit this behavior; the usb3sun beeps on connect/disconnect as for the working keyboards.

plan 9 /dev/usb/ctl:

ep9.0 enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 4 port 3 rootport 1 addr 7 busy
hub csp 0x010009 ports 3 ’Apple, Inc.’ ’Keyboard Hub’ xhci
ep10.0 enabled control rw speed low maxpkt 8 pollival 0 samplesz 0 hz 0 hub 7 port 2 rootport 1 addr 8 busy
hid csp 0x010103 csp 0x000003 vid 0x05ac did 0x024f ’Apple Inc.’ ’Apple Keyboard’ xhci
ep10.1 enabled interrupt r speed low maxpkt 8 pollival 10 samplesz 0 hz 0 hub 7 port 2 rootport 1 addr 8 busy
delan commented 11 months ago

The usb3sun makes no beep on connect, but makes the standard beep on disconnect.

this suggests we are getting our tuh_umount_cb (note: not tuh_hid_umount_cb) on disconnect, but not our tuh_hid_mount_cb (note: not tuh_mount_cb) on connect.

If a different (working) keyboard is attached, it behaves normally. If the Apple keyboard is re-attached, though, the usb3sun seems hung: no connections from any keyboard are recognized, and no beep is emited on disconnecting the Apple keyboard.

this suggests the usb stack may be hitting an assertion failure or one of its device limits.