Reply
Thread Tools
Posts: 23 | Thanked: 2 times | Joined on Aug 2007
#31
Hello, Benson:

Sorry, I follow your instruction, but mouse still cannot work.

evrouter and mouse+poll could work, and no error message.

Here, I list what I do:

1, write following code to /home/user/.verouterrc
Code:
Window ""
"Mouse" "" any key/272 "XButton/1"
"Mouse" "" any key/273 "XButton/3"
"Mouse" "" any key/274 "XButton/2"
"Mouse" "" any rel/8/1 "XKey/Up"
"Mouse" "" any rel/8/-1 "XKey/Down"
2, copy your evrouter and mouse_poll to /bin, and
Code:
/home/user # chmod +x /bin/evrouter
/home/user # chmod +x /bin/mouse_poll
3, build mouse.sh with your code (partly):
Code:
#!/bin/sh
killall evrouter mouse_poll
rm /tmp/.evrouter\:0.0
for devfile in /dev/input/event*
do
sudo /bin/chmod a+r $devfile
done 
mouse_poll `evrouter /dev/input/event* |head -6 | grep Mouse| cut -d: -f2`&
4, connect mouse to N800

5, Running mouse.sh, and I got following message in xterm:
Code:
/home/user # chmod +x mouse.sh
/home/user # ./mouse.sh 
killall: evrouter: no process killed
killall: mouse_poll: no process killed
/home/user # usage: mouse_poll event-device - probably /dev/input/evdev0
Finally, my mouse still cannot work (I have made mouse cursor visible).



Could you help me?

Last edited by casparmin; 2008-02-29 at 09:13.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#32
Try just running
Code:
evrouter /dev/input/event*
and post the output. I have it matching on the string "Mouse" in the device name; perhaps yours doesn't have that in its name...

Oh, and here's a tip: as soon as you plug the mouse in, and get informed that it's unsupported, click the USB icon in the statusbar, and choose disconnect. That stops it from trying to mount a filesystem and coming back with the dialog, as well as freeing space in your statusbar. It will not hinder the operation of the mouse at all.

Glad my compiled images worked; I'll update that now.
 

The Following User Says Thank You to Benson For This Useful Post:
Posts: 101 | Thanked: 54 times | Joined on Jul 2007
#33
Hi,

I have the same situation as casparmin. I see the cursor but my mouse doesn't work.
I use a usb wireless keybord / mouse system and the call of
evrouter /dev/input/event*
only shows my keyboard (which works fine).
So I think the mouse isn't well initialised (though paired with the usb mouse/keyboard receiver).
So I connected a true usb mouse and it was shown via evrouter and....

....it works !

Thanks for that great trick!

asys3

Last edited by asys3; 2008-02-29 at 21:40.
 
Posts: 23 | Thanked: 2 times | Joined on Aug 2007
#34
Yes, I have got mouse working on my N800 with OS2008.

Problems about Benson's script:
Code:
#!/bin/sh
killall evrouter mouse_poll
rm /tmp/.evrouter\:0.0
for devfile in /dev/input/event*; do
sudo /bin/chmod a+r $devfile
done 
mouse_poll `evrouter /dev/input/event* |head -6 | grep Mouse| cut -d: -f2`&
while [ "x`grep Mouse  /proc/bus/input/devices`" != x ]; do
sleep 10
done
killall evrouter mouse_poll
1,There cannot contain blanks before "sudo".

2, I think "head -6" isn't necessary. Sometimes, my mouse has been recognized, but there are more than 6 devices connected to my N800.

3, "Mouse" may not be a key word of your mouse devices. You can firstly use following command to find your own word to replace "Mouse":
Code:
evrouter -D /dev/input/events*
This command will list all of your input devices, and you can find a appropriate word to describe your mouse.

Thanks for Benson providing compiled evrouter, mouse_poll and script!
 

The Following 2 Users Say Thank You to casparmin For This Useful Post:
Posts: 12 | Thanked: 2 times | Joined on Mar 2008
#35
Also got a mouse working thanks to information provided in this thread. However, I did notice the same issue I had with VNC where I couldn't get access to the applications from the left bar by clicking and other areas of the ui seemed to have a similar problem.

I didn't see any mention of this from others in the thread and I was able to get around it by following the instructions in the wiki about using x11vnc. See the link:

http://maemo.org/community/wiki/how_...800_from_a_pc/

Note the warning about making a mistake modifying x-server.

Anyway, just wanted to pass this along.

Mike
 

The Following User Says Thank You to mikebell For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#36
Originally Posted by casparmin View Post
Yes, I have got mouse working on my N800 with OS2008.

Problems about Benson's script:
Code:
#!/bin/sh
killall evrouter mouse_poll
rm /tmp/.evrouter\:0.0
for devfile in /dev/input/event*; do
sudo /bin/chmod a+r $devfile
done 
mouse_poll `evrouter /dev/input/event* |head -6 | grep Mouse| cut -d: -f2`&
while [ "x`grep Mouse  /proc/bus/input/devices`" != x ]; do
sleep 10
done
killall evrouter mouse_poll
1,There cannot contain blanks before "sudo".
Why can't there be?
  1. There's no reason; the shell skips leading spaces anyway.
  2. It is in fact working on mine, with indentation exactly as I posted it.
Did you actually observe some trouble that was removed by de-indenting the loops?
2, I think "head -6" isn't necessary. Sometimes, my mouse has been recognized, but there are more than 6 devices connected to my N800.
That's a horrid kludge; because evrouter doesn't terminate immediately, grep and cut don't terminate, so the backquote substitution doesn't finish, so mouse_poll doesn't start. I need to fix this by identifying the proper device from a separate evrouter -D, or from /proc/bus/input/devices. But it will only be a problem if you have more than 6 input devices connected; there's 4 in the N800, so it's fine unless you have more than a mouse and keyboard hooked up. (And thumb-drives, etc. have no effect)
3, "Mouse" may not be a key word of your mouse devices. You can firstly use following command to find your own word to replace "Mouse":
Code:
evrouter -D /dev/input/events*
This command will list all of your input devices, and you can find a appropriate word to describe your mouse.
Yes, but that word gets used twice, there and in the condition of the while. And over in the .evrouterrc... So change it all of those places... Better still, it should be a variable defined once, and used wherever necessary. I'll probably get a smoother version posted Monday or so.
Thanks for Benson providing compiled evrouter, mouse_poll and script!
Happy to help, and thanks for the useful criticism!

I'll have that new version (with 2 and 3 fixed/improved) ASAP. Anyone who needed to use a different string (than "Mouse") could post the device name from evrouter -D here; those patterns are all regexps, so if I have a list, I can make it match as many devices as you can give me...

Last edited by Benson; 2008-03-07 at 17:26.
 

The Following User Says Thank You to Benson For This Useful Post:
Posts: 101 | Thanked: 54 times | Joined on Jul 2007
#37
Hi Benson,

i looked for some keyboard / tochball or trackball sets on CeBIT in Hannover and found some nice and small keyboards from keysonic.
One is a bluetooth and one a usb combination of a keyboard and a touchpad.
I also tested a keyboard from activekey.

All I could find out is that the usb firmware reports the keyboard well and conneting it to N800/N810.
But the touchpad doesn't work at all.

Evrouter reports 'touchpad' or similar strings, so I replaced mouse with sth. that identifies it better - but it doesn't work :-(

Can you tell me if your programs are a workaround against the not included mouse support in the kernel / x-server?
So would be a solution via a kernel /x-server modification support probably more (touchpad) devices ?

Your solution works well here with a attached usb hub and standard usb keyboard / usb mouse.

Thanks a lot !
asys3
 
Posts: 101 | Thanked: 54 times | Joined on Jul 2007
#38
Hi Benson,

I connected a chesen USB to PS/2 converter to my ps/2 keyboard/trackball combination (cherry ml4400).

evrouter reports the chesen usb adapter as:
NOKIA:/home/user ROOT#evrouter /dev/input/event*
device 0: /dev/input/event0: Internal keyboard
device 1: /dev/input/event1: retu-pwrbutton
device 2: /dev/input/event2: retu-headset
device 3: /dev/input/event3: TSC2301 touchscreen
device 4: /dev/input/event4: CHESEN PS2 to USB Converter
device 5: /dev/input/event5: CHESEN PS2 to USB Converter


mouse_poll works fine on event5 if I call mouse_poll 5 directly.
So in your script I have to modify the last grep, too, because
cat /proc/bus/input/devices
says
-----
....
I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-musb_hdrc-1/input0
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=7

I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-musb_hdrc-1/input1
S: Sysfs=/class/input/input5
H: Handlers=kbd mouse0 event5
B: EV=7
B: KEY=1f001f 0 20000 3878 d801d101 1e0000 0 0 0
B: REL=103
------
So I modify your script to grep for mouse0 and it works.

But sometimes I couldn't escape from the terminal from which I call the script.
Do you know why?


Regards,
asys3
 
Posts: 23 | Thanked: 2 times | Joined on Aug 2007
#39
Originally Posted by Benson View Post
Why can't there be?
  1. There's no reason; the shell skips leading spaces anyway.
  2. It is in fact working on mine, with indentation exactly as I posted it.
Yes, I also want to know why the code cannot work on my n800. Let me do some test for this problem.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#40
Originally Posted by asys3 View Post
Evrouter reports 'touchpad' or similar strings, so I replaced mouse with sth. that identifies it better - but it doesn't work :-(
If the string includes 'touchpad', then put 'touchpad' instead of 'Mouse'; all you need is something that matches some part of the name; mine called itself 'USB Mouse', so 'Mouse' matched that. (They're really regexps rather than plain text matching, if you know what that is; and they're case sensitive.) Be sure and replace it in the .evrouterrc and 2 places in the script above...
Can you tell me if your programs are a workaround against the not included mouse support in the kernel / x-server?
So would be a solution via a kernel /x-server modification support probably more (touchpad) devices ?
The kernel's cool. The X server is missing mouse support, and this is a workaround for that. Fixing it probably would not support more devices, but it would make things easier, and less CPU usage.
Originally Posted by asys3 View Post
Hi Benson,

I connected a chesen USB to PS/2 converter to my ps/2 keyboard/trackball combination (cherry ml4400).

evrouter reports the chesen usb adapter as:
NOKIA:/home/user ROOT#evrouter /dev/input/event*
device 0: /dev/input/event0: Internal keyboard
device 1: /dev/input/event1: retu-pwrbutton
device 2: /dev/input/event2: retu-headset
device 3: /dev/input/event3: TSC2301 touchscreen
device 4: /dev/input/event4: CHESEN PS2 to USB Converter
device 5: /dev/input/event5: CHESEN PS2 to USB Converter


mouse_poll works fine on event5 if I call mouse_poll 5 directly.
Yeah, but doing it directly ain't so hot, because that may show up at a different device number if you connect another device, or even (it seems) sometimes when you just disconnect and reconnect the same device. That's why I'm grepping around. It looks, though, like some jerk at CHESEN didn't think that different ID strings for the mouse and keyboard ports would be nice, so it's gonna be hard to avoid... Oh, wait, I think I know what to do.
So in your script I have to modify the last grep, too, because
cat /proc/bus/input/devices
says
-----
....
I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-musb_hdrc-1/input0
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=7

I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-musb_hdrc-1/input1
S: Sysfs=/class/input/input5
H: Handlers=kbd mouse0 event5
B: EV=7
B: KEY=1f001f 0 20000 3878 d801d101 1e0000 0 0 0
B: REL=103
------
So I modify your script to grep for mouse0 and it works.
Yes, it would; again, I was trying to match on the name. This would break if you had two mice; but I'm not sure that's really a case to worry about.

Several (all?) of the issues you mentioned so far will be removed by my new script, which I'll probably have up this evening.
But sometimes I couldn't escape from the terminal from which I call the script.
Do you know why?
[/QUOTE]
No Not much clue on that. Wait.. I think it might matter whether you unplug the mouse from the adapter (works) or the whole shebang from the N800 (sometimes seems to cause trouble). (If you're using a auto-switching adapter; I'm using one from jolouis, and I've seen this. I don't know how it would work with manual mode switching.)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 02:37.