Microsoft IntelliMouse with kernel 2.6.18 and patch-2.6.18-mh1 is broken (fix provided)
Subsystems (3)
I was happily running older version of kernel patch, I believe patch-2.6.15-mh2, which allowed me to enable additional buttons on Microsoft IntelliMouse Explorer for Bluetooth.
The only issues that I could not solve satisfactory is resumption from sleep, initial boot, and timeout, requiring me to reset the mouse every time by pressing small button on its bottom.
I decided to give a try to the latest kernel 2.6.18 with Fedora Core 5 and patch-2.6.18-mh1 with latest bluez tools. The start was promising: unpatched kernel 2.6.18 with FC5 and bluez 2.25 enables IntelliMouse via Boot protocol with the resumption from sleep working! This is an improvement from earlier versions. This doesn't brong the closure, though, because the boot protocol lacks the support for scroll wheel and additional buttons.
So I upgraded to bluez 3.5 but this didn't make any difference.
I then patched the kernel with patch-2.6.18-mh1. This killed the mouse: the cursor would not move.
After many hours I finally was able to solve the problem by using the previous patch-2.6.15-mh2 against the 2.6.18 kernel. I am attaching that patch. Note that it will produce a few harmless warnings.
The good news is that this is the configuration that enables fully functional IntelliMouse.
Here is the rest of steps needed to fix the resumption from the sleep.
* set this in the rc.local:
/usr/local/sbin/hcid
/usr/local/bin/hidd -t 10 --connect 00:50:F2:E8:E0:71 --server /usr/local/sbin/hciconfig hci0 down
usleep 500000
/usr/local/sbin/hciconfig hci0 up
* Set this in the "sleep script":
before sleep:
/usr/local/bin/hidd --killall
echo disable > /proc/acpi/ibm/bluetooth
/sbin/rmmod hci_usb
after sleep:
/sbin/modprobe hci_usb
echo enable > /proc/acpi/ibm/bluetooth
Sleep steps above may not be needed at all with your hardware and distribution.
Many people suggested to use "hidd --connect 00:50:F2:E8:E0:71" alone. It never work for me. hciconfig hci0 down/up made the difference.
I hope this helps.
include/net/bluetooth/l2cap.h +24 -25
@@ -76,32 +76,32 @@/* L2CAP structures */ struct l2cap_hdr { -__u16 len; -__u16 cid; +__le16 len; +__le16 cid; } __attribute__ ((packed));#define L2CAP_HDR_SIZE 4struct l2cap_cmd_hdr {__u8 code;__u8 ident; -__u16 len; +__le16 len; } __attribute__ ((packed));#define L2CAP_CMD_HDR_SIZE 4struct l2cap_cmd_rej { -__u16 reason; +__le16 reason; } __attribute__ ((packed));struct l2cap_conn_req { -__u16 psm; -__u16 scid; +__le16 psm; +__le16 scid; } __attribute__ ((packed));struct l2cap_conn_rsp { -__u16 dcid; -__u16 scid; -__u16 result; -__u16 status; +__le16 dcid; +__le16 scid; +__le16 result; +__le16 status; } __attribute__ ((packed));/* connect result */
@@ -117,15 +117,15 @@#define L2CAP_CS_AUTHOR_PEND 0x0002struct l2cap_conf_req { -__u16 dcid; -__u16 flags; +__le16 dcid; +__le16 flags;__u8 data[0 ]; } __attribute__ ((packed));struct l2cap_conf_rsp { -__u16 scid; -__u16 flags; -__u16 result; +__le16 scid; +__le16 flags; +__le16 result;__u8 data[0 ]; } __attribute__ ((packed));
@@ -147,23 +147,23 @@#define L2CAP_CONF_MAX_SIZE 22struct l2cap_disconn_req { -__u16 dcid; -__u16 scid; +__le16 dcid; +__le16 scid; } __attribute__ ((packed));struct l2cap_disconn_rsp { -__u16 dcid; -__u16 scid; +__le16 dcid; +__le16 scid; } __attribute__ ((packed));struct l2cap_info_req { -__u16 type; +__le16 type;__u8 data[0 ]; } __attribute__ ((packed));struct l2cap_info_rsp { -__u16 type; -__u16 result; +__le16 type; +__le16 result;__u8 data[0 ]; } __attribute__ ((packed));
@@ -205,7 +205,8 @@struct l2cap_pinfo {struct bt_sock bt; -__u16 psm; +__le16 psm; +__le16 sport;__u16 dcid;__u16 scid;
@@ -221,8 +222,6 @@__u8 ident; -__u16 sport; -struct l2cap_conn *conn;struct sock *next_c;struct sock *prev_c;
Only in linux-2.6.16.20/: Module.symvers
net/bluetooth/bnep/bnep.h +14 -14
@@ -86,29 +86,29 @@#define BNEP_EXT_HEADER 0x80struct bnep_setup_conn_req { -__u8 type; -__u8 ctrl; -__u8 uuid_size; -__u8 service[0 ]; +__u8 type; +__u8 ctrl; +__u8 uuid_size; +__u8 service[0 ]; } __attribute__((packed));struct bnep_set_filter_req { -__u8 type; -__u8 ctrl; -__u16 len; -__u8 list[0 ]; +__u8 type; +__u8 ctrl; +__le16 len; +__u8 list[0 ]; } __attribute__((packed));struct bnep_control_rsp { -__u8 type; -__u8 ctrl; -__u16 resp; +__u8 type; +__u8 ctrl; +__le16 resp; } __attribute__((packed));struct bnep_ext_hdr { -__u8 type; -__u8 len; -__u8 data[0 ]; +__u8 type; +__u8 len; +__u8 data[0 ]; } __attribute__((packed));/* BNEP ioctl defines */
net/bluetooth/hidp/core.c +102 -5
173 lines not on this page · raw message
Only in linux-2.6.16.20/net/bluetooth/hidp: hid.c
Only in linux-2.6.16.20/net/bluetooth/hidp: hid.h
net/bluetooth/hidp/hidp.h +3 -2
@@ -86,7 +86,7 @@int intr_sock;// Connteted interrupt socket __u16 parser;__u16 rd_size; -__u8 *rd_data; +__u8 __user *rd_data;__u8 country;__u8 subclass;__u16 vendor;
@@ -143,7 +143,8 @@unsigned char keys[8 ];unsigned char leds; -struct input_dev *input; +struct input_dev *input; +struct hid_device *hid;struct timer_list timer;
net/bluetooth/hidp/Makefile +1 -1
@@ -4,4 +4,4 @@ obj-$(CONFIG_BT_HIDP) += hidp.o -hidp-objs := core.o sock.o +hidp-objs := core.o sock.o hid.o
net/bluetooth/l2cap.c +26 -24
164 lines not on this page · raw message
net/bluetooth/hidp/hid.c +1686 -0
1,686 lines not on this page · raw message
net/bluetooth/hidp/hid.h +350 -0
350 lines not on this page · raw message
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 18 -EXTRAVERSION = +EXTRAVERSION = -mh1aj NAME=Avast! A bilge rat! # *DOCUMENTATION*
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel