Skip to contentSkip to conversation

hid keyboard events get lost

Bluez-users Konrad Kieling 2 participants 5 messages May 25, 2007 – May 29, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

hi,
i have some problems with getting the ``Freedom Universal Keyboard'' to work. after authentication the keyboard is automatically trying to connect to my computer. however, the connections never work. heres is the output of ``hcidump -V'' (using bluez-utils-3.10.1 and kernel 2.6.16.13):

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

    bdaddr 00:0B:0D:85:30:0B class 0x002540 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:0B:0D:85:30:0B role 0x01
    Role: Slave

.
.
.

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 1 clen 4
      MTU 128
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 1 clen 4
      MTU 128
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 42 reason 0x13
Reason: Remote User Terminated Connection

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

    Disconnect (0x01|0x0006) status 0x00 ncmd 1
Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 42 reason 0x16
Reason: Connection Terminated by Local Host

it seems to have problems in negotiating the mtu size. so i tried and commented out the lines in hidd which set the preferred mtu size,
opts.imtu = HIDP_DEFAULT_MTU;
opts.omtu = HIDP_DEFAULT_MTU;

with this version of hidd the connection works perfectly, and even keystrokes are transferred, as can be seen in the hcidump:
.
.
.

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
< ACL data: handle 43 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 0
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 19 scid 0x0041
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 48
< ACL data: handle 43 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 0
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success

< ACL data: handle 43 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Set protocol: Boot protocol
< ACL data: handle 43 flags 0x02 dlen 7
L2CAP(d): cid 0x0041 len 3 [psm 19]
HIDP: Data: Output report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 5

L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 43 mode 0x02 interval 128
    Mode: Sniff
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 43 mode 0x00 interval 0
    Mode: Active
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

hcidump -X also shows, that the packets indeed contain keycodes. the device is correctly registered in /proc/bus/input/devices and in /sys/class/input/input4. however, the events never arrive in /dev/input/event4. the debugging messages of the hidp kernel module suggest, that they dont even arrive at this module:

  May 25 15:57:38 ed007 kernel: Bluetooth: HIDP (Human Interface
                  Emulation) ver 1.1
  May 25 16:06:13 ed007 hidd[6345]: Bluetooth HID daemon
  May 25 16:06:24 ed007 hcid[5321]: link_key_request
                  (sba=00:03:7A:F0:73:B5, dba=00:0B:0D:85:30:0B)
  May 25 16:06:24 ed007 hidd[6345]: New HID device 00:0B:0D:85:30:0B
                  (Bluetooth Kbd)
  May 25 16:06:24 ed007 kernel: hidp_add_connection:
  May 25 16:06:24 ed007 kernel: __hidp_get_session:
  May 25 16:06:24 ed007 kernel: hidp_add_connection: ctrl mtu 0 intr
                  mtu 0
  May 25 16:06:24 ed007 kernel: input: Bluetooth HID Boot Protocol
                  Device as /class/input/input4
  May 25 16:06:24 ed007 kernel: __hidp_send_ctrl_message: session
                  d972f640 data 00000000 size 0
  May 25 16:06:24 ed007 kernel: hidp_input_event: input d4a1e800 type 17
                  code 0 value 0
  May 25 16:06:24 ed007 kernel: hidp_session: session d972f640
  May 25 16:06:24 ed007 kernel: hidp_process_transmit: session d972f640
  May 25 16:06:24 ed007 kernel: hidp_send_frame: sock db45bb40 data
                  e4fab800 len 1
  May 25 16:06:24 ed007 kernel: hidp_send_frame: sock db45b840 data
                  eca4ba00 len 3
  May 25 16:06:24 ed007 kernel: hidp_process_transmit: session d972f640

does anyone have a clue why the events get lost on their way? or something on this mtu problem?

thanks,
konrad

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#1 lore raw

hello again,
just to let you know: the ``Freedom Universal Keyboard'' is working perfectly now, after applying some minor tweaks to the kernel:

1. something to avoid the long negotiation for the mtu size, i commented out the following lines in l2cap_build_conf_req (net/bluetooth/l2cap.c):

   //	if (pi->imtu != L2CAP_DEFAULT_MTU)
   //		l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);

yes i know, this might not be the way to go, but bt still works with my mobile and the headset. maybe someone has an idea for a cleaner solution?

2. unfortunately the data coming from the keyboard is missing the first byte telling us about keyboard input. in hidp_input_report (net/bluetooth/hidp/core.c) insert the following
lines after variable declaration:

   if ( ( session->input->id.vendor == 0x045e ) &&
        ( session->input->id.product == 0x0403 ) )
     {
     for ( i = 7; i >= 0; i -- ) skb->data[i + 1] = skb->data[i];
     skb->data[0] = 0x01;
     }

again, is there a way to cope with this problem in a more generic way?

ciao,
konrad

Quoted 214 lines · Konrad Kieling

hi,
i have some problems with getting the ``Freedom Universal Keyboard'' to work. after authentication the keyboard is automatically trying to connect to my computer. however, the connections never work. heres is the output of ``hcidump -V'' (using bluez-utils-3.10.1 and kernel 2.6.16.13):

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

    bdaddr 00:0B:0D:85:30:0B class 0x002540 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:0B:0D:85:30:0B role 0x01
    Role: Slave

.
.
.

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 1 clen 4
      MTU 128
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 1 clen 4
      MTU 128
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 42 packets 1

Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 42 reason 0x13
Reason: Remote User Terminated Connection

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

    Disconnect (0x01|0x0006) status 0x00 ncmd 1
Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 42 reason 0x16
Reason: Connection Terminated by Local Host

it seems to have problems in negotiating the mtu size. so i tried and commented out the lines in hidd which set the preferred mtu size,
opts.imtu = HIDP_DEFAULT_MTU;
opts.omtu = HIDP_DEFAULT_MTU;

with this version of hidd the connection works perfectly, and even keystrokes are transferred, as can be seen in the hcidump:
.
.
.

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 48
< ACL data: handle 43 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 0
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 19 scid 0x0041
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 48
< ACL data: handle 43 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 0
Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success

< ACL data: handle 43 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Set protocol: Boot protocol
< ACL data: handle 43 flags 0x02 dlen 7
L2CAP(d): cid 0x0041 len 3 [psm 19]
HIDP: Data: Output report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 5

L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Number of Completed Packets (0x13) plen 5

handle 43 packets 1

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 43 mode 0x02 interval 128
    Mode: Sniff
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

HCI Event: Mode Change (0x14) plen 6

    status 0x00 handle 43 mode 0x00 interval 0
    Mode: Active
Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

Quoted 1 line

ACL data: handle 43 flags 0x02 dlen 13

L2CAP(d): cid 0x0041 len 9 [psm 19]
HIDP: Data: Input report

hcidump -X also shows, that the packets indeed contain keycodes. the device is correctly registered in /proc/bus/input/devices and in /sys/class/input/input4. however, the events never arrive in /dev/input/event4. the debugging messages of the hidp kernel module suggest, that they dont even arrive at this module:

  May 25 15:57:38 ed007 kernel: Bluetooth: HIDP (Human Interface
                  Emulation) ver 1.1
  May 25 16:06:13 ed007 hidd[6345]: Bluetooth HID daemon
  May 25 16:06:24 ed007 hcid[5321]: link_key_request
                  (sba=00:03:7A:F0:73:B5, dba=00:0B:0D:85:30:0B)
  May 25 16:06:24 ed007 hidd[6345]: New HID device 00:0B:0D:85:30:0B
                  (Bluetooth Kbd)
  May 25 16:06:24 ed007 kernel: hidp_add_connection:
  May 25 16:06:24 ed007 kernel: __hidp_get_session:
  May 25 16:06:24 ed007 kernel: hidp_add_connection: ctrl mtu 0 intr
                  mtu 0
  May 25 16:06:24 ed007 kernel: input: Bluetooth HID Boot Protocol
                  Device as /class/input/input4
  May 25 16:06:24 ed007 kernel: __hidp_send_ctrl_message: session
                  d972f640 data 00000000 size 0
  May 25 16:06:24 ed007 kernel: hidp_input_event: input d4a1e800 type 17
                  code 0 value 0
  May 25 16:06:24 ed007 kernel: hidp_session: session d972f640
  May 25 16:06:24 ed007 kernel: hidp_process_transmit: session d972f640
  May 25 16:06:24 ed007 kernel: hidp_send_frame: sock db45bb40 data
                  e4fab800 len 1
  May 25 16:06:24 ed007 kernel: hidp_send_frame: sock db45b840 data
                  eca4ba00 len 3
  May 25 16:06:24 ed007 kernel: hidp_process_transmit: session d972f640
Quoted 5 lines

does anyone have a clue why the events get lost on their way? or something on this mtu problem?

thanks,
konrad

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#2 lore raw

Hi Konrad,

Quoted 26 lines

just to let you know: the ``Freedom Universal Keyboard'' is working perfectly now, after applying some minor tweaks to the kernel:

1. something to avoid the long negotiation for the mtu size, i commented out the following lines in l2cap_build_conf_req (net/bluetooth/l2cap.c):

   //	if (pi->imtu != L2CAP_DEFAULT_MTU)
   //		l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);

yes i know, this might not be the way to go, but bt still works with my mobile and the headset. maybe someone has an idea for a cleaner solution?

2. unfortunately the data coming from the keyboard is missing the first byte telling us about keyboard input. in hidp_input_report (net/bluetooth/hidp/core.c) insert the following
lines after variable declaration:

   if ( ( session->input->id.vendor == 0x045e ) &&
        ( session->input->id.product == 0x0403 ) )
     {
     for ( i = 7; i >= 0; i -- ) skb->data[i + 1] = skb->data[i];
     skb->data[0] = 0x01;
     }
Quoted 2 lines

again, is there a way to cope with this problem in a more generic way?

I need one of these keyboard to actually find the correct to fix this. While it might be likely that we need a HID quirk, I am not happy with any weird changes in L2CAP without understanding the reasons for it.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#3 lore raw

dear marcel,
yes, i totally agree not to screw things up for a non-standard device. however, to understand things better, could you explain to me why l2cap sends more config requests to change the mtu although it already agreed on the one suggested by the keyboard (hcidump is in one of my recent postings), or do i misinterpret what's going on?

all the best,
konrad

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#4 lore raw

Hi Konrad,

Quoted 5 lines

yes, i totally agree not to screw things up for a non-standard device. however, to understand things better, could you explain to me why l2cap sends more config requests to change the mtu although it already agreed on the one suggested by the keyboard (hcidump is in one of my recent postings), or do i misinterpret what's going on?

I removed the L2CAP MTU settings from the input service. So this one should now work for you perfectly fine. However your kernel should some weird behavior with a MTU size of 0. That is strange. Can you test a 2.6.22-rc3 kernel, because that contains a fix for the MTU config setting.

It also contains the full HID report support. This means that the missing report id in front of the report should be handled correctly. If not than we need a quirk for that. My understanding is that even if this is valid according to the HID specification, it is not valid for Bluetooth based HID devices.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users