Jerky MX900 mouse movement with 2.6.7-mh1, hidp and hidd
Hi,
I have a Logitech Cordless Desktop Bluetooth (an MX900 mouse and an Elite keyboard). Earlier I used them in HCI mode by using hid2hci, hcid and bthid but Marcelo Holtmann hinted it might be a good idea to try the hidp kernel module and hidd instead.
I'm now running kernel 2.6.7-mh1 and I have the hidp module loaded and hidd running. The keyboard works fine but mouse movement is very jerky. There pointer lags behind and stops for approximately 100ms (or whatever) every 0.5 seconds. This happens both on the console with GPM and in X.
What might be the problem? The mouse movement was smooth with bthid. To get things up and running I'm modprobing uhci-hcd, bluetooth and hidp, uinput and hci_usb, then running hid2hci, bringing hci0 up with hciconfig hci0 up and finally starting hidd with hidd -i hci0 --server.
The system is a hyperthreaded P4 system running on a i865 motherboard. Hidp vermagic says 2.6.7-mh1 SMP preempt PENTIUM4 gcc-3.4.
Regards,
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 11 lines
I have a Logitech Cordless Desktop Bluetooth (an MX900 mouse and an Elite keyboard). Earlier I used them in HCI mode by using hid2hci, hcid and bthid but Marcelo Holtmann hinted it might be a good idea to try the hidp kernel module and hidd instead.
I'm now running kernel 2.6.7-mh1 and I have the hidp module loaded and hidd running. The keyboard works fine but mouse movement is very jerky. There pointer lags behind and stops for approximately 100ms (or whatever) every 0.5 seconds. This happens both on the console with GPM and in X.
Quoted 4 lines
What might be the problem? The mouse movement was smooth with bthid. To get things up and running I'm modprobing uhci-hcd, bluetooth and hidp, uinput and
hci_usb, then running hid2hci, bringing hci0 up with hciconfig hci0 up and finally starting hidd with hidd -i hci0 --server.
the combination of hidp + hidd works much better for me than bthid and I wrote both implementations. Do you enabled role switch and sniff mode support? Show us the output of "hciconfig -a".
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
Quoted 6 lines · Marcel Holtmann
Quoted 5 lines
I'm now running kernel 2.6.7-mh1 and I have the hidp module loaded and hidd running. The keyboard works fine but mouse movement is very jerky. There pointer lags behind and stops for approximately 100ms (or whatever) every 0.5 seconds. This happens both on the console with GPM and in X.
Do you enabled role switch and sniff mode support?
No, I didn't. Should I, and if so, how?
Quoted 1 line
Show us the output of "hciconfig -a".
Here goes (BD addresses removed :)
hci0: Type: USB
BD Address: ..:..:..:..:..:.. ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:289613 acl:17357 sco:0 events:121 errors:0
TX bytes:1569 acl:60 sco:0 commands:26 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'BlueZ (0)'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Ver: 1.1 (0x1) HCI Rev: 0x34e LMP Ver: 1.1 (0x1) LMP Subver:0x34e
Manufacturer: Cambridge Silicon Radio (10)
For the mouse hcitool info gives me:
Requesting information ...
BD Address: ..:..:..:..:..:..
Device Name: Logitech MX900 Mouse
LMP Version: 1.1 (0x1) LMP Subversion: 0x350
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xfc 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role
switch>
<hold mode> <sniff mode> <park state> <RSSI> <channel
quality>
<SCO link> <HV2 packets> <HV3 packets> <u-law log>
<A-law log>
<CVSD> <paging scheme> <power control> <transparent SCO>
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 3 lines
Quoted 1 line
Do you enabled role switch and sniff mode support?
No, I didn't. Should I, and if so, how?
you really should, because I have seen that HID devices don't really like if they can't switch into sniff mode. And if you don't enable role switch your host can't become the master and so can't join your mouse and keyboard into one piconet. Thus you get a scatternet and this can cause troubles.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 7 lines · Marcel Holtmann
Quoted 2 lines
Quoted 1 line
Do you enabled role switch and sniff mode support?
No, I didn't. Should I, and if so, how?
you really should, because I have seen that HID devices don't really like if they can't switch into sniff mode. And if you don't enable role switch your host can't become the master and so can't join your mouse and keyboard into one piconet. Thus you get a scatternet and this can cause troubles.
I'm sorry but I don't know how. Could someone tell me?
hcitool con shows the keyboard and the mouse as follows:
Connections:
> ACL ..:..:..:..:..:.. handle 44 state 1 lm MASTER
> ACL ..:..:..:..:..:.. handle 41 state 1 lm MASTERI don't even know whether the device(s) are in the correct mode or not. I've been trying to gather bits and pieces of information together but so far no luck. I tried "hcitool cmd 0x02 0x0003" which, according to
http://www.lisha.ufsc.br/~guto/teaching/ish/ine5346-2003-1/work/bluetooth/hci_commands.html
MIGHT put a device to "sniff mode" but at least nothing changed.
Thanks,
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
edit your hcid.conf and modify:
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
#
#lp hold,sniff;
#
lp hold,sniff,park,rswitch;
Michal
Quoted 26 lines · Vesa Halttunen
Quoted 9 lines · Marcel Holtmann
Quoted 3 lines
Quoted 1 line
Do you enabled role switch and sniff mode support?
No, I didn't. Should I, and if so, how?
you really should, because I have seen that HID devices don't really like if they can't switch into sniff mode. And if you don't enable role switch your host can't become the master and so can't join your mouse and keyboard into one piconet. Thus you get a scatternet and this can cause troubles.
I'm sorry but I don't know how. Could someone tell me?
hcitool con shows the keyboard and the mouse as follows:
Connections:
> ACL ..:..:..:..:..:.. handle 44 state 1 lm MASTER > ACL ..:..:..:..:..:.. handle 41 state 1 lm MASTERI don't even know whether the device(s) are in the correct mode or not. I've been trying to gather bits and pieces of information together but so far no luck. I tried "hcitool cmd
0x020x0003" which, according to
http://www.lisha.ufsc.br/~guto/teaching/ish/ine5346-2003-1/work/bluetooth/h
ci_commands.html MIGHT put a device to "sniff mode" but at least nothing changed.
Quoted 3 lines
Thanks,
-Vesa
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 7 lines
Quoted 5 lines
you really should, because I have seen that HID devices don't really like if they can't switch into sniff mode. And if you don't enable role switch your host can't become the master and so can't join your mouse and keyboard into one piconet. Thus you get a scatternet and this can cause troubles.
I'm sorry but I don't know how. Could someone tell me?
actually if you use the default hcid.conf from bluez-utils-2.7 and startup hcid this should be all done at device init. If not, then you must use "hciconfig hci0 lp ..." for it.
hci0: Type: USB
BD Address: 00:02:xx:xx:xx:xx ACL MTU: 384:8 SCO MTU: 64:8 Link policy: RSWITCH HOLD SNIFF PARK
Quoted 4 lines
hcitool con shows the keyboard and the mouse as follows:
Connections:> ACL ..:..:..:..:..:.. handle 44 state 1 lm MASTER > ACL ..:..:..:..:..:.. handle 41 state 1 lm MASTER
This is the outgoing case and that is never a problem. But the devices reconnect and then you will see two slaves and this means scatternet.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
Quoted 3 lines · Marcel Holtmann
actually if you use the default hcid.conf from bluez-utils-2.7 and startup hcid this should be all done at device init. If not, then you must use "hciconfig hci0 lp ..." for it.
ah, yes. Role switching and sniff mode were already enabled in my hcid.conf.
Quoted 3 lines
hci0: Type: USB
BD Address: 00:02:xx:xx:xx:xx ACL MTU: 384:8 SCO MTU: 64:8 Link policy: RSWITCH HOLD SNIFF PARK
That's what my Link policy says as well with "hciconfig hci0 lp".
Quoted 6 lines
Quoted 4 lines
hcitool con shows the keyboard and the mouse as follows:
Connections:> ACL ..:..:..:..:..:.. handle 44 state 1 lm MASTER > ACL ..:..:..:..:..:.. handle 41 state 1 lm MASTERThis is the outgoing case and that is never a problem. But the devices reconnect and then you will see two slaves and this means scatternet.
OK. I disconnected the devices and saw them reconnect and for a second they were marked as SLAVEs but then became MASTERs. I guess that's how it should be?
So... everything seems to be fine, but still, mouse movement is jerky. I tried switching hyperthreading off because I couldn't think of anything else but this didn't help.
Any suggestions? :)
Thanks,
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 5 lines
Quoted 3 lines
hci0: Type: USB
BD Address: 00:02:xx:xx:xx:xx ACL MTU: 384:8 SCO MTU: 64:8 Link policy: RSWITCH HOLD SNIFF PARKThat's what my Link policy says as well with "hciconfig hci0 lp".
that is good.
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
hcitool con shows the keyboard and the mouse as follows:
Connections:> ACL ..:..:..:..:..:.. handle 44 state 1 lm MASTER > ACL ..:..:..:..:..:.. handle 41 state 1 lm MASTERThis is the outgoing case and that is never a problem. But the devices reconnect and then you will see two slaves and this means scatternet.
OK. I disconnected the devices and saw them reconnect and for a second they were marked as SLAVEs but then became MASTERs. I guess that's how it should be?
Yes, perfect.
Quoted 3 lines
So... everything seems to be fine, but still, mouse movement is jerky. I tried switching hyperthreading off because I couldn't think of anything else but this didn't help.
Do you tried the mouse alone? Actually I don't know what's the problem here. Please try an UP kernel so I can be sure that this is no locking problem or so.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
Quoted 3 lines · Marcel Holtmann
Do you tried the mouse alone? Actually I don't know what's the problem here. Please try an UP kernel so I can be sure that this is no locking problem or so.
I removed the batteries from the keyboard and compiled an UP kernel (and ran it without HT) but still the same problem. Duh :I
Thanks for your help. If you find a solution, please let me know. Until then I guess I'll just have to use bthid.
Regards,
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 6 lines
Quoted 3 lines
Do you tried the mouse alone? Actually I don't know what's the problem here. Please try an UP kernel so I can be sure that this is no locking problem or so.
I removed the batteries from the keyboard and compiled an UP kernel (and ran it without HT) but still the same problem. Duh :I
I recharged the batteries of my MX900 and I don't have any problem with it. The mouse is working perfect with my setup.
Quoted 2 lines
Thanks for your help. If you find a solution, please let me know. Until then I guess I'll just have to use bthid.
This is not a good idea, because my plan is to delete the bthid :(
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 2 lines · Marcel Holtmann
I recharged the batteries of my MX900 and I don't have any problem with it. The mouse is working perfect with my setup.
Uhhuh. This is embarrassing.
It turned out that I wasn't running hcid at all. I commented it out since I thought it isn't necessary with hidd. I was wrong.
Everything works fine now - no need for bthid. Thanks again for help. :)
-Vesa
Signature · 13 lines
· Vesa Halttunen - http://www.jormas.com/~vesuri/ · ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Vesa,
Quoted 9 lines
Quoted 2 lines
I recharged the batteries of my MX900 and I don't have any problem with it. The mouse is working perfect with my setup.
Uhhuh. This is embarrassing.
It turned out that I wasn't running hcid at all. I commented it out since I thought it isn't necessary with hidd. I was wrong.
Everything works fine now - no need for bthid. Thanks again for help. :)
I didn't see how this was connected to hcid, but if it works, everything is fine. Have fun with it.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users