From owner-freebsd-usb@FreeBSD.ORG Sun Jan 27 02:56:18 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BE116401 for ; Sun, 27 Jan 2013 02:56:18 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id B0609AFC for ; Sun, 27 Jan 2013 02:56:18 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id r0R2uCAv027646 for ; Sat, 26 Jan 2013 18:56:12 -0800 (PST) (envelope-from yuri@rawbw.com) Message-ID: <5104974C.803@rawbw.com> Date: Sat, 26 Jan 2013 18:56:12 -0800 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130112 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-usb@FreeBSD.org Subject: Why my USB keyboard doesn't generate scancodes? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2013 02:56:18 -0000 I have this mouse that also defines the usb keyboad with 2 buttons. Below is USB log I get when I press one of the buttons. Looks like scancode is 0x27 (another one being 0x28). However, ukbd device doesn't return anything. ukbd0 (and atkbd0) are connected to kbdmux0. Signals from atkbd0 are visible through DTrace on kbdmux0. But USB keyboard signals just disappear. While troubleshooting, I set DTrace probes on all ukbd_... functions in kernel. See below what is called when keyboard is datached (first), and attached again (later). No functions are called in ukbd module when the keyboard buttons are pressed. What could be wrong? 9.1-STABLE amd64 Yuri ---usbdump log--- # usbdump -i usbus1 -s 160 -v 17:40:16.961544 usbus1.2 DONE-INTR-EP=00000082,SPD=FULL,NFR=1,SLEN=8,IVAL=1,ERR=0 frame[0] READ 5 bytes 0000 16 00 00 27 00 -- -- -- -- -- -- -- -- -- -- -- |...'. | 17:40:16.961551 usbus1.2 SUBM-INTR-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=1 frame[0] READ 10 bytes 17:40:17.113540 usbus1.2 DONE-INTR-EP=00000082,SPD=FULL,NFR=1,SLEN=8,IVAL=1,ERR=0 frame[0] READ 5 bytes 0000 16 00 00 00 00 -- -- -- -- -- -- -- -- -- -- -- |..... | 17:40:17.113545 usbus1.2 SUBM-INTR-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=1 frame[0] READ 10 bytes ---DTrace log--- dtrace: script './dt-ukbd.d' matched 35 probes CPU ID FUNCTION:NAME <...detaching...> 6 14388 ukbd_intr_callback:entry 5 14372 ukbd_detach:entry 5 14370 ukbd_disable:entry 5 14396 ukbd_clear_state:entry 7 14388 ukbd_intr_callback:entry <...attaching ...> 0 14366 ukbd_probe:entry 0 14401 ukbd_attach:entry 0 14396 ukbd_clear_state:entry 0 14364 ukbd_parse_hid:entry 0 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b42 0 14396 ukbd_clear_state:entry 0 14374 ukbd_enable:entry 0 14396 ukbd_clear_state:entry 0 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b07 0 14396 ukbd_clear_state:entry 0 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b14 0 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b42 0 14374 ukbd_enable:entry 0 14366 ukbd_probe:entry 0 14366 ukbd_probe:entry 2 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b42 2 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b42 2 14397 ukbd_ioctl:entry ukbd_ioctl: cmd=20044b42 5 14366 ukbd_probe:entry 5 14403 ukbd_set_leds_callback:entry 7 14403 ukbd_set_leds_callback:entry 7 14388 ukbd_intr_callback:entry 7 14403 ukbd_set_leds_callback:entry 7 14403 ukbd_set_leds_callback:entry 7 14403 ukbd_set_leds_callback:entry 7 14403 ukbd_set_leds_callback:entry ---DTrace script--- #!/usr/sbin/dtrace -s ::ukbd_any_key_pressed:entry {} ::ukbd_start_timer:entry {} ::ukbd_put_key:entry {} ::ukbd_do_poll:entry {} ::ukbd_get_key:entry {} ::ukbd_interrupt:entry {} ::ukbd_event_keyinput:entry {} ::ukbd_timeout:entry {} /*::ukbd_apple_fn:entry {} ::ukbd_apple_swap:entry {}*/ ::ukbd_intr_callback:entry {} ::ukbd_set_leds_callback:entry {} ::ukbd_probe:entry {} ::ukbd_parse_hid:entry {} ::ukbd_attach:entry {} ::ukbd_detach:entry {} ::ukbd_resume:entry {} ::ukbd_configure:entry {} ::ukbd__probe:entry {} ::ukbd_init:entry {} ::ukbd_test_if:entry {} ::ukbd_term:entry {} ::ukbd_intr:entry {} ::ukbd_lock:entry {} ::ukbd_enable:entry {} ::ukbd_disable:entry {} ::ukbd_check:entry {} /*::ukbd_check_char_locked:entry {}*/ ::ukbd_check_char:entry {} ::ukbd_read:entry {} /*::ukbd_read_char_locked:entry {}*/ ::ukbd_read_char:entry {} /*::ukbd_ioctl_locked:entry {}*/ ::ukbd_ioctl:entry {printf("ukbd_ioctl: cmd=%x",arg1);} ::ukbd_clear_state:entry {} ::ukbd_get_state:entry {} ::ukbd_set_state:entry {} ::ukbd_poll:entry {} /*::ukbd_set_leds:entry {}*/ /*::ukbd_set_typematic:entry {}*/ ::ukbd_key2scan:entry {} ::ukbd_driver_load:entry {}