Discussion:
Logitech m310 mouse issues
(too old to reply)
a***@gmail.com
2012-12-07 09:38:29 UTC
Permalink
well i tried plan 9 today on my raspberry pi and my mouse cursor
wont move. anyone think they can help? o BTW the buttons on mouse
work though
Richard Miller
2012-12-07 10:35:11 UTC
Permalink
Post by a***@gmail.com
well i tried plan 9 today on my raspberry pi and my mouse cursor
wont move.
You can get some debugging information from the mouse driver which
might help diagnose what's going on. Please try this:

1. Edit cmdline.txt on the SD card DOS partition, to remove the
parameter 'user=glenda' and add a parameter 'kbargs=-k'. This
will prevent the mouse driver auto-loading at boot time, and
prevent the auto-login to glenda's rio desktop.

2. When you reboot you'll be prompted for boot parameters. Reply
'local' to the "root is from" prompt, and any username you like
(except glenda) to the "user" prompt.

3. The Pi should boot to a text screen. Execute the command
usb/kb -md
to load the usb mouse driver with debugging. Don't touch the
mouse yet!

4. You should see some information about the mouse's configuration.
On my ancient wired Logitech mouse I get this:

setting first config
report descriptor:
0x05 0x01 0x09 0x02 0xa1 0x01 0x09 0x01
0xa1 0x00 0x05 0x09 0x19 0x01 0x29 0x03
0x15 0x00 0x25 0x01 0x95 0x03 0x75 0x01
0x81 0x02 0x95 0x01 0x75 0x05 0x81 0x03
0x05 0x01 0x09 0x30 0x09 0x31 0x09 0x38
0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x03
0x81 0x06 0xc0 0xc0
count 0x3 nbits 1
kind 0x1 v 0x0
kind 0x1 v 0x0
kind 0x1 v 0x0

count 0x1 nbits 5
kind 0x0 v 0x0

count 0x3 nbits 8
kind 0x2 v 0x0
kind 0x3 v 0x0
kind 0x4 v 0x0

The "kind 0x2" and "kind 0x3" are the magic numbers which enable the
driver to find the X and Y mouse movement values. Do you get these in
your report?

5. Now wiggle the mouse a bit. Do you get any reports of mouse
information on the screen, with "kind 0x2" and "kind 0x3" values?
Boo
2013-03-01 10:33:47 UTC
Permalink
Hi Richard,

I've done this and got the following:

usb/kb: no unhandled devices found

My mouse moves only Up-Down when I move it Left-Right.
And slightly Right-only by clicking the buttons.

I have this mouse: http://trust.com/15345
Richard Miller
2013-03-01 10:51:54 UTC
Permalink
Post by Boo
My mouse moves only Up-Down when I move it Left-Right.
And slightly Right-only by clicking the buttons.
Are you using the latest (13 Jan) 9pi kernel image?

Can you get some debugging output from the report descriptor
parsing (by adding 'kbargs=-d' and removing 'user=glenda' in
the command line in cmdline.txt), and send them to me? I'll
see if I can diagnose the cause.
Boo
2013-03-04 10:11:23 UTC
Permalink
Post by Richard Miller
Post by Boo
My mouse moves only Up-Down when I move it Left-Right.
And slightly Right-only by clicking the buttons.
Are you using the latest (13 Jan) 9pi kernel image?
Can you get some debugging output from the report descriptor
parsing (by adding 'kbargs=-d' and removing 'user=glenda' in
the command line in cmdline.txt), and send them to me? I'll
see if I can diagnose the cause.
Hi Richard,

Thanks for your reply.
I'm using the latest 9pi kernel (23 Jan) from your contrib dir.
When I add 'kbargs=-d' to the cmdline.txt nothing is changed. I see the same screen like it was before.

But I was able to get some info, by adding 'kbargs=-k' to the cmdline.txt. Please, see the photo of my screen: Loading Image...

Thank you.
Richard Miller
2013-03-04 11:47:46 UTC
Permalink
Post by Boo
But I was able to get some info, by adding 'kbargs=-k' to the cmdline.txt.
That stops the kernel usb daemon from starting the mouse driver automatically,
so you have the opportunity to start it by hand with 'usb/kb -d'. Once you've
started that, it seizes control of the usb endpoint so the subsequent 'usb/kb'
commands tell you "no unhandled devices".

The "setting first config" and "setting boot protocol" messages indicate that
the attempt to set the mouse into HID report mode fails, so the driver falls
back to boot protocol which every device with CSP 3.1.2 should support. Either
your mouse has a different notion of boot protocol from what the driver's
author expected, or the raspberry pi's somewhat problematic USB hardware is
losing some input characters and causing the protocol to get out of sync.

In my contrib area there is now a usb-kb program. If you try that in place
of usb/kb, with argument '-ddd' for lots of debugging, it should tell you
exactly which command failed in the attempt to set HID report protocol, and
will also dump the raw data read from the mouse in boot protocol.
Richard Miller
2012-12-07 12:37:45 UTC
Permalink
I think the problem may be incorrect handling of the default "boot protocol"
for the usb mouse. If so, I have a new kernel which should fix it. Please
could you try this:

1. Download http://plan9.bell-labs.com/sources/contrib/miller/9pi and copy
it to the DOS partition on your SD card.

2. Restore the original cmdline.txt if you've been experimenting with it
(by copying from cmdline-demo.txt), and try booting. If the mouse cursor
still doesn't move,

3. Edit cmdline.txt and add the parameter 'kbargs=-b' to force the use of
the boot protocol.

Is that better?
Gorka Guardiola
2012-12-07 12:53:53 UTC
Permalink
Post by Richard Miller
I think the problem may be incorrect handling of the default "boot protocol"
for the usb mouse. If so, I have a new kernel which should fix it. Please
By your previous description it is not really the boot protocol.
Like a year ago we got some new mice for which the boot protocol would hang after a while, so I bit the bullet and wrote a parser for the report descriptor.
So the usb mouse is not using the boot
protocol by default any more.

This sounds like a bug either in the descriptor or in the parser, so yes, maybe just forcing the boot protocol might fix it.

Someone reported another problem too and I have the bug report waiting for me to have some time to look into it. This may be related. I haven't encountered any problem myself and I have tried in like a 50 mice :-S.

G.
Richard Miller
2012-12-07 13:32:59 UTC
Permalink
Post by Gorka Guardiola
So the usb mouse is not using the boot
protocol by default any more.
Not by default, but various failures can make it switch to the boot
protocol.
Richard Miller
2012-12-14 10:21:05 UTC
Permalink
I've submitted a patch usbmouse-reportproto which corrects an
error in the parsing of usb HID report descriptors. This should
allow Logitech (and perhaps some other) mice to work, without
having to force them into boot protocol with 'kbargs=-b'.

I've put up a new raspberry pi kernel in /n/sources/contrib/miller/9pi
with this correction. The problem wasn't specific to raspberry pi
though - it seems that until now there haven't been many native
Plan 9 users with Logitech wireless mice.
va3yh
2012-12-07 16:07:12 UTC
Permalink
Post by Richard Miller
I think the problem may be incorrect handling of the default "boot protocol"
for the usb mouse. If so, I have a new kernel which should fix it. Please
1. Download http://plan9.bell-labs.com/sources/contrib/miller/9pi and copy
it to the DOS partition on your SD card.
I can report that the stock 9pi does not work with my wireless mouse (HP)
but the above 9pi works.

Thanks

Now that I have plan 9 running in the Pi,
how do I find out its IP and ssh into it from other OS ?
--
va3yh
Bence Fábián
2012-12-07 16:18:34 UTC
Permalink
netstat -i

however it's plan9. you can do better. check out drawterm.
Post by va3yh
Post by Richard Miller
I think the problem may be incorrect handling of the default "boot protocol"
for the usb mouse. If so, I have a new kernel which should fix it.
Please
1. Download http://plan9.bell-labs.com/**sources/contrib/miller/9pi<http://plan9.bell-labs.com/sources/contrib/miller/9pi>and copy
it to the DOS partition on your SD card.
I can report that the stock 9pi does not work with my wireless mouse (HP)
but the above 9pi works.
Thanks
Now that I have plan 9 running in the Pi,
how do I find out its IP and ssh into it from other OS ?
--
va3yh
Thomas Cenova
2012-12-10 09:37:05 UTC
Permalink
Post by Richard Miller
I think the problem may be incorrect handling of the default "boot protocol"
for the usb mouse. If so, I have a new kernel which should fix it. Please
1. Download http://plan9.bell-labs.com/sources/contrib/miller/9pi and copy
it to the DOS partition on your SD card.
2. Restore the original cmdline.txt if you've been experimenting with it
(by copying from cmdline-demo.txt), and try booting. If the mouse cursor
still doesn't move,
3. Edit cmdline.txt and add the parameter 'kbargs=-b' to force the use of
the boot protocol.
Is that better?
thank you sooooo much!!! the new kernel fixed it! now on to learning
about using plan 9....
Chris Sexton
2012-12-10 09:37:16 UTC
Permalink
Hi Richard,

I've been talking to you over on the bendyworks blog post and have finally =
made it over here. Upon closer inspection, I had typo'd on my first attempt=
s with the kbargs=3D-b option and that is working just great for my Logitec=
h wireless mouse AND the wired mouse. Sorry for the confusion and THANKS!
Richard Miller
2012-12-10 11:34:45 UTC
Permalink
I had typo'd on my first attempts with the kbargs=-b option
and that is working just great for my Logitech wireless
mouse AND the wired mouse.
That's good to know. I'll update the mouse driver on the 9pi
image today.
Continue reading on narkive:
Loading...