Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2013 18:56:12 -0800
From:      Yuri <yuri@rawbw.com>
To:        freebsd-usb@FreeBSD.org
Subject:   Why my USB keyboard doesn't generate scancodes?
Message-ID:  <5104974C.803@rawbw.com>

next in thread | raw e-mail | index | archive | help
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 {}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5104974C.803>