Skip to contentSkip to conversation

Logitech Bluetooth Mx900+keyboard support.

Bluez-users Terence Rudkin 6 participants 24 messages Jan 18, 2004 – Jan 31, 2004 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

Based on the archives, about a month ago, support for this did not exist. That is because of not being able to switch from HID to HCI
mode. I am using the keyboard an mouse but would like to use the
Bluetooth hub to connect my Palm T3.

Has there been any progress on getting this to work? Is there something I can do to help progress this?

Signature · 9 lines
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
maintainer
#1 lore raw

Hi Terence,

Quoted 8 lines

Based on the archives, about a month ago, support for this did not exist. That is because of not being able to switch from HID to HCI
mode. I am using the keyboard an mouse but would like to use the
Bluetooth hub to connect my Palm T3.

Has there been any progress on getting this to work? Is there something I can do to help progress this?

read the archives again. The hid2hci program from CVS supports the Logitech Bluetooth hub.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw

Hmmm another util available only in CVS.

Marcel when will you finally release a new version of BlueZ supporting HID???

Michal

Dne ne 18. ledna 2004 21:44 Marcel Holtmann napsal(a):

Quoted 21 lines

Hi Terence,

Quoted 8 lines

Based on the archives, about a month ago, support for this did not exist. That is because of not being able to switch from HID to HCI
mode. I am using the keyboard an mouse but would like to use the
Bluetooth hub to connect my Palm T3.

Has there been any progress on getting this to work? Is there something I can do to help progress this?

read the archives again. The hid2hci program from CVS supports the Logitech Bluetooth hub.

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Hi Michal,

Quoted 1 line

Marcel when will you finally release a new version of BlueZ supporting HID???

when the library is ready and all programs are ported to the new library. I want to have the same level of functionality as we have now.

However if you find a way to retrieve the complete HID report descriptor with the current SDP library, we can include a bthid version for the current libs.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw
In reply to Marcel Holtmann
Quoted 10 lines · Marcel Holtmann
Quoted 2 lines

Has there been any progress on getting this to work

read the archives again. The hid2hci program from CVS supports the Logitech Bluetooth hub.

Regards

Marcel

Guess I did not get far enough. Thanks

#5 lore raw
In reply to Marcel Holtmann

Marcel,

Thank you for pointing me to hid2hci

I have downloaded and compiled hid2hci. (gcc -Wall hid2hci.c -o hid2hci )
Running it I get:

trudkin Last rc=1 07:43:17 /space/Bluez
$> ./hid2hci -0
Switching device 046d:c703 to HCI mode was successful
trudkin Last rc=0 07:43:20 /space/Bluez
$> ./hid2hci -0
Switching device 046d:c703 to HCI mode was successful
trudkin Last rc=0 07:43:22 /space/Bluez
$> ./hid2hci -1
No devices in HID mode found
trudkin Last rc=1 07:43:26 /space/Bluez
$>
I can set to HCI twice and cannot reset to HID. Leads me to believe that it did not take. I think all the right mods are loaded and hcid is running.

#> lsmod |grep hci

usb-uhci               26380   0  (unused)
hci_usb                 9752   0  (unused)
bluez                  40324   1  (autoclean) [sco rfcomm l2cap hci_usb]
usbcore                79168   1  [usb-uhci hci_usb hid]
ohci1394               29128   0  (unused)
ieee1394              204612   0  [sbp2 ohci1394]

What am I missing?

Quoted 18 lines · Marcel Holtmann

Hi Terence,

Quoted 8 lines

Based on the archives, about a month ago, support for this did not exist. That is because of not being able to switch from HID to HCI
mode. I am using the keyboard an mouse but would like to use the
Bluetooth hub to connect my Palm T3.

Has there been any progress on getting this to work? Is there something I can do to help progress this?

read the archives again. The hid2hci program from CVS supports the Logitech Bluetooth hub.

Regards

Marcel

maintainer
#6 lore raw

Hi Terence,

Quoted 16 lines

Running it I get:

trudkin Last rc=1 07:43:17 /space/Bluez
$> ./hid2hci -0
Switching device 046d:c703 to HCI mode was successful
trudkin Last rc=0 07:43:20 /space/Bluez
$> ./hid2hci -0
Switching device 046d:c703 to HCI mode was successful
trudkin Last rc=0 07:43:22 /space/Bluez
$> ./hid2hci -1
No devices in HID mode found
trudkin Last rc=1 07:43:26 /space/Bluez
$>
I can set to HCI twice and cannot reset to HID. Leads me to believe that it did not take. I think all the right mods are loaded and hcid is running.

do you have patched the USB HID driver?

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#7 lore raw

Marcel,

Quoted 1 line · Marcel Holtmann

do you have patched the USB HID driver?

I am not sure.

I cvs'ed the Makefile. Modified the SRCDIRS to include libs2 and
utils2, removed hciemu. Did a make update, to get every thing. Then
made all the dirs and installed the executables generated.

Still the same error.s Do I need something else to get the USB HID
driver?

Thanks for your support!

#8 lore raw

Hi Terence,

Quoted 2 lines
Quoted 1 line

do you have patched the USB HID driver?

I am not sure.

Look at the thread:

http://sourceforge.net/mailarchive/message.php?msg_id=6881178

You need to patch your kernel for having hid2hci working. Note also that at this time, you can only switch from hid to hci, and not from hci to hid.

Hope this help.

Good day.

Olivier

Signature · 5 lines
Olivier Bornet                 |      français : http://puck.ch/f
Swiss Ice Hockey Results       |      english  : http://puck.ch/e
http://puck.ch/                |      deutsch  : http://puck.ch/g
[email protected]         |      italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://wwwkeys.pgp.net
maintainer
#9 lore raw

Hi Olivier,

Quoted 7 lines

Look at the thread:

   http://sourceforge.net/mailarchive/message.php?msg_id=6881178

You need to patch your kernel for having hid2hci working. Note also that at this time, you can only switch from hid to hci, and not from hci to hid.

at the moment nobody is quite sure if this patch is really correct and don't break any other devices, but it is working for our needs and I included it into my latest -mh patches for the 2.4 series.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#10 lore raw

Marcel,

I finally had a chance to patch kernel and try hid2hci with this patch
kernel. I still got success. but hcitool dev never reported any
devices. I looked at the code in hid2hci, my diff is below.

I first made the change at 204. And found that the /dev/usb/hid was not opening. Finding me /dev to be /dev/usb I changed line 79 to match my file structure.

Now I get
hciconfig
hci0: Type: USB

        BD Address: 00:07:61:07:ED:A9 ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:131 acl:0 sco:0 events:14 errors:0
        TX bytes:32 acl:0 sco:0 commands:13 errors:0

But not input from mouse and keyboard.

#> cvs diff hid2hci.c
Index: hid2hci.c
===================================================================
RCS file: /cvsroot/bluez/utils2/hid/hid2hci.c,v retrieving revision 1.3
diff -r1.3 hid2hci.c
79c79
< static char hidpath[PATH_MAX + 1] = "/dev/usb/hid";
---

Quoted 1 line

static char hidpath[PATH_MAX + 1] = "/dev/usb";

204c204
< int i, fd, err = 0;
---

Quoted 1 line
      int i, fd, err = -1;
Quoted 18 lines · Marcel Holtmann

Hi Olivier,

Quoted 7 lines

Look at the thread:

   http://sourceforge.net/mailarchive/message.php?msg_id=6881178

You need to patch your kernel for having hid2hci working. Note also that at this time, you can only switch from hid to hci, and not from hci to hid.

at the moment nobody is quite sure if this patch is really correct and don't break any other devices, but it is working for our needs and I included it into my latest -mh patches for the 2.4 series.

Regards

Marcel

maintainer
#11 lore raw

Hi Terence,

Quoted 7 lines

I finally had a chance to patch kernel and try hid2hci with this patch
kernel. I still got success. but hcitool dev never reported any
devices. I looked at the code in hid2hci, my diff is below.

I first made the change at 204. And found that the /dev/usb/hid was not opening. Finding me /dev to be /dev/usb I changed line 79 to match my file structure.

be more specific and make a unified diff.

Quoted 9 lines

Now I get
hciconfig
hci0: Type: USB

        BD Address: 00:07:61:07:ED:A9 ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:131 acl:0 sco:0 events:14 errors:0
        TX bytes:32 acl:0 sco:0 commands:13 errors:0

But not input from mouse and keyboard.

The dongle is now in HCI mode and this means that you have to handle the HID protocol by yourself. Run the bthid daemon.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#12 lore raw
Quoted 11 lines · Marcel Holtmann

Hi Terence,

Quoted 7 lines

I finally had a chance to patch kernel and try hid2hci with this patch
kernel. I still got success. but hcitool dev never reported any
devices. I looked at the code in hid2hci, my diff is below.

I first made the change at 204. And found that the /dev/usb/hid was not opening. Finding me /dev to be /dev/usb I changed line 79 to match my file structure.

be more specific and make a unified diff.

I reviewed the code. I focused on this section of code in switch_logitech(...)

{
    char devname[PATH_MAX + 1];
    int i, fd, err = 0;
    for (i = 0; i < 16; i++) {
...
	sprintf(devname, "%s/hiddev%d", hidpath, i);
	fd = open(devname, O_RDWR);
	if (fd < 0)
		continue;

...
It occurred to me that open() could fail the 16 times and not report that to the caller. So i init'ed err to -1. This is fine because if the open() works then err will be set based on the ioctl() or send_report() calls. But if open() fails all 16 time then the caller is advised that something is wrong.

Once I confirmed that in fact I was failing when I called hid2hci I went to understand why. This was I had for dev dirtree.
/dev/usb/hiddev
not
/dev/usb/hid/hiddev
as set in hidpath. So to work on my system I needed to change the hidpath.

While this works on my system. What other systems might it break? A
dynamic function to pull the correct value? Or is there a naming authority, a header file, where this can be found?

$> diff -dur hid2hci.c.orig hid2hci.c

hid2hci.c 2004-01-27 12:59:29.000000000 -0700 renamed from hid2hci.c.orig 2004-01-27 12:57:42.000000000 -0700 +2 -2
@@ -76,7 +76,7 @@
 #define USB_DIR_OUT            0x00
  
  
-static char hidpath[PATH_MAX + 1] = "/dev/usb/hid";
+static char hidpath[PATH_MAX + 1] = "/dev/usb";
  
 struct hiddev_devinfo {
        unsigned int bustype;
@@ -201,7 +201,7 @@
 static int switch_logitech(struct device_info *dev)
 {
        char devname[PATH_MAX + 1];
-       int i, fd, err = 0;
+       int i, fd, err = -1;
  
        for (i = 0; i < 16; i++) {
                struct hiddev_devinfo dinfo;
Quoted 3 lines

Marcel

maintainer
#13 lore raw

Hi Terence,

Quoted 26 lines

I reviewed the code. I focused on this section of code in switch_logitech(...)

{
    char devname[PATH_MAX + 1];
    int i, fd, err = 0;
    for (i = 0; i < 16; i++) {
...
	sprintf(devname, "%s/hiddev%d", hidpath, i);
	fd = open(devname, O_RDWR);
	if (fd < 0)
		continue;

...
It occurred to me that open() could fail the 16 times and not report that to the caller. So i init'ed err to -1. This is fine because if the open() works then err will be set based on the ioctl() or send_report() calls. But if open() fails all 16 time then the caller is advised that something is wrong.

Once I confirmed that in fact I was failing when I called hid2hci I went to understand why. This was I had for dev dirtree.
/dev/usb/hiddev
not
/dev/usb/hid/hiddev
as set in hidpath. So to work on my system I needed to change the hidpath.

Quoted 3 lines

While this works on my system. What other systems might it break? A
dynamic function to pull the correct value? Or is there a naming authority, a header file, where this can be found?

I used the devfs path, because my Debian Sid has no default device node for it. What is your system?

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#14 lore raw

Hi Marcel,

Quoted 2 lines · Marcel Holtmann

I used the devfs path, because my Debian Sid has no default device node for it. What is your system?

The most recent is Fedora, with the 2.6.1 kernel

Quoted 4 lines

Regards

Marcel

Thanks for all the help!

maintainer
#15 lore raw

Hi Terence,

Quoted 3 lines
Quoted 2 lines

I used the devfs path, because my Debian Sid has no default device node for it. What is your system?

The most recent is Fedora, with the 2.6.1 kernel

please try this patch.

Regards

Marcel

Index: hid2hci.c
===================================================================
RCS file: /cvsroot/bluez/utils2/hid/hid2hci.c,v
retrieving revision 1.3

hid2hci.c +7 -3
diff -u -r1.3 hid2hci.c
@@ -76,7 +76,7 @@
 #define USB_DIR_OUT		0x00
 
 
-static char hidpath[PATH_MAX + 1] = "/dev/usb/hid";
+static char hidpath[PATH_MAX + 1] = "/dev/usb";
 
 struct hiddev_devinfo {
 	unsigned int bustype;
@@ -211,8 +211,12 @@
 
 		sprintf(devname, "%s/hiddev%d", hidpath, i);
 		fd = open(devname, O_RDWR);
-		if (fd < 0)
-			continue;
+		if (fd < 0) {
+			sprintf(devname, "%s/hid/hiddev%d", hidpath, i);
+			fd = open(devname, O_RDWR);
+			if (fd < 0)
+				continue;
+		}
 
 		memset(&dinfo, 0, sizeof(dinfo));
 		err = ioctl(fd, HIDIOCGDEVINFO, &dinfo);
#16 lore raw

Hi Marcel,

Patch works fine. But if neither path exist then it will silently fail. while not having /dev/usb should not be an issue, but ya never know. Presetting err to -1 resolves this.

Quoted 11 lines · Marcel Holtmann

Hi Terence,

Quoted 3 lines
Quoted 2 lines

I used the devfs path, because my Debian Sid has no default device node for it. What is your system?

The most recent is Fedora, with the 2.6.1 kernel

please try this patch.

Regards

Marcel

maintainer
#17 lore raw

Hi Terence,

Quoted 3 lines

Patch works fine. But if neither path exist then it will silently fail. while not having /dev/usb should not be an issue, but ya never know. Presetting err to -1 resolves this.

I included this fix an committed it to the CVS. Everything should now work fine. Thanks.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#18 lore raw
In reply to Marcel Holtmann

Marcel, et al,

The keyboard and mouse now work! The last issue on getting them to work was I needed to umount/mount the /proc/bus/usb file system.

Actually just umount and reinsert the USB devices. I restarted hcid and bthid after umount'ing and before the insert. Getting the right modules in /etc/modules should be all that is needed.

I'll get the steps needed I used put together as an addendum the the MX900 page referenced eariler

Now to get the Tungsten T3 talking (passcode not exchanging) , but that a different thread.

Thanks again, Marcel, for all the help!!

TR

#19 lore raw

T3 Was Re: [Bluez-users] Logitech Bluetooth Mx900+keyboard support.

Quoted 4 lines

Now to get the Tungsten T3 talking (passcode not exchanging) , but that a different thread.

I have just done so if you have a problem give me a shout. The only thing I cant do now is look up computers on my internal subnet. I have no idea how to fix this yet. I wanted to be able to control my slimp3 web interface so if you get this working then give me a shout.

I have a three line script at home that works, so if you have any problems then I will mail it to you.

Gareth

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#20 lore raw

Re: T3 Was Re: [Bluez-users] Logitech Bluetooth Mx900+keyboard support.

Gareth,

Thanks for the offer, got it up. Cleaned up the hcid.conf file to make it work.

As to not getting out of you own sunbet. the script found here
http://www.ibiblio.org/mdw/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-2.4.X
may be of assist.

Quoted 12 lines · Gareth Reakes
Quoted 2 lines

Now to get the Tungsten T3 talking (passcode not exchanging) , but that a different thread.

I have just done so if you have a problem give me a shout. The only thing I cant do now is look up computers on my internal subnet. I have no idea how to fix this yet. I wanted to be able to control my slimp3 web interface so if you get this working then give me a shout.

I have a three line script at home that works, so if you have any problems then I will mail it to you.

Gareth

Signature · 9 lines
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
#21 lore raw
In reply to Terence Rudkin

Hi Terence (and Marcel),

I'm the maintainer of the MX900 page, so you can submit your changes directly to me, I have some people waiting on my update.

Marcel, let me know when the CVS repo is updated.

Nothing urgent, my MX900 right button died, and I sent it to repair, I should have it back in a few days.

Regs,
Charles

Quoted 11 lines · Terence Rudkin

Marcel, et al,

The keyboard and mouse now work! The last issue on getting them to work was I needed to umount/mount the /proc/bus/usb file system.

Actually just umount and reinsert the USB devices. I restarted hcid and bthid after umount'ing and before the insert. Getting the right modules in /etc/modules should be all that is needed.

I'll get the steps needed I used put together as an addendum the the MX900 page referenced eariler

...

maintainer
#22 lore raw

Hi Charles,

Quoted 4 lines

I'm the maintainer of the MX900 page, so you can submit your changes directly to me, I have some people waiting on my update.

Marcel, let me know when the CVS repo is updated.

it is already there.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#23 lore raw
In reply to Terence Rudkin

Hi Terence,

Quoted 3 lines

I cvs'ed the Makefile. Modified the SRCDIRS to include libs2 and
utils2, removed hciemu. Did a make update, to get every thing. Then
made all the dirs and installed the executables generated.

if you want to use libs2 and utils2 from CVS follow my steps I posted to the mailing list or take a look at this howto

	http://www.bueche.ch/comp/mx900/mx900.html

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users