Qt USB mouse

475 views
Skip to first unread message

Eduardo Gabriel

unread,
Mar 29, 2011, 4:06:36 PM3/29/11
to mini...@googlegroups.com
Hello everybody,

I'm trying to use a USB mouse on an application made ​​in QT.

My touchscreen is working but the mouse shows no sign of life.

Using the command "cat / dev/input/event1 | hexdump" and "cat
/ dev/input/mouse0 | hexdump "I found that the system is receiving
the mouse data.

In variable QWS_MOUSE_PROTO already tried almost everything.

QWS_MOUSE_PROTO = "IntelliMouse: / dev/input/mouse0"
QWS_MOUSE_PROTO = "Microsof: / dev/input/mouse0"
QWS_MOUSE_PROTO = "MouseMan: / dev/input/mouse0"
QWS_MOUSE_PROTO = Auto: / dev/input/mouse0 "
QWS_MOUSE_PROTO = "tslib: / dev/input/mouse0"

Nothing worked.

Inside buildroot - Qt Mouse driver, I have only the driver
tslib selected.

Once compiled with the options PC and tslib enabled and
Qt programs including giving examples not working properly
"segmentation fault" as soon as he opens the main window.

From what I have researched I am not alone with this problem.

Does anyone have any idea how to configure a USB mouse to be used in Qt

Best Regards, Eduardo Gabriel.

Vitor Boschi

unread,
Mar 29, 2011, 4:59:25 PM3/29/11
to mini...@googlegroups.com
Try issuing the command "echo 2 > /proc/cpu/alignment" and then running the app. This should solve the segfault problem.

Vitor

Pankaj Chawla

unread,
Mar 30, 2011, 12:31:09 AM3/30/11
to mini...@googlegroups.com
Which -qt-mouse-* options did you use with your configure script?

Thanks
Pankaj

davef

unread,
Mar 30, 2011, 3:28:13 AM3/30/11
to mini2440
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mouse1
tslib:/dev/input/touchscreen0"

davef

unread,
Mar 30, 2011, 3:35:24 AM3/30/11
to mini2440
You have to determine whether you have Mouse0 or Mouse1 or ? by using
dmesg (I think).

davef

unread,
Mar 30, 2011, 3:44:35 AM3/30/11
to mini2440
http://www.armadeus.com/wiki/index.php?title=Qt/Embedded

For the mouse.

Dave

On Mar 30, 8:28 pm, davef <dave_fest...@hotmail.com> wrote:

Eduardo Gabriel

unread,
Mar 30, 2011, 9:07:20 AM3/30/11
to mini...@googlegroups.com
Ok, lets go.

-qt-mouse-pc is my option, now I have PC and tslib installed. The
commmand "echo 2 > /proc/cpu/alignment" solved the segmentation fault
problem.

I followed the link instructions. Installing PS/2 drivers inside kernel and etc.

As I already said my mouse is mounted in /dev/input/mouse0 . I checked
it using cat /dev/input/mouse0 | hexdump

I use "cat /sys/class/input/mouse0/device/name" to see the driver name
and it's "MosArt Optical Driver"

So i tried export QWS_MOUSE_PROTO="MosArt Optical
Driver:/dev/input/mouse0 tslib:/dev/input/event0" and then
export QWS_MOUSE_PROTO="MosArt:/dev/input/mouse0 tslib:/dev/input/event0"

After, all that I already have tried:

QWS_MOUSE_PROTO = "IntelliMouse: / dev/input/mouse0"
QWS_MOUSE_PROTO = "Microsof: / dev/input/mouse0"
QWS_MOUSE_PROTO = "MouseMan: / dev/input/mouse0"
QWS_MOUSE_PROTO = Auto: / dev/input/mouse0 "
QWS_MOUSE_PROTO = "tslib: / dev/input/mouse0"

The mouse still doesn't work inside Qt programs.

Thanks for the help.

Best Regards, Eduardo Gabriel

davef

unread,
Mar 30, 2011, 8:50:03 PM3/30/11
to mini2440
There was some discussion about whether your:

export QWS_MOUSE_PROTO="MosArt:/dev/input/mouse0 tslib:/dev/input/
event0"

should be:

export QWS_MOUSE_PROTO="MosArt:/dev/input/mouse0 tslib:/dev/input/
touchscreen0"

I think on FriendlyArm.net. Also, I never installed any PS2 drivers.

Good luck.

Dave

Eduardo Gabriel

unread,
Mar 31, 2011, 7:23:18 AM3/31/11
to mini...@googlegroups.com
Davef,

My touchscreen is working. No problem with tslib:/dev/input/event0"

I tried MosArt:/dev/input/mouse0 and it doesn't work.

Again, the mouse is working using cat /dev/input/mouse0. It's not a
driver problem, Qt just does not get this data.

Incredible how is hard set a mouse in Qt.

I have exhausted my efforts, I do not know what else to try.

Best Regards.

Jordi Binefa - electronics.cat

unread,
Apr 3, 2011, 5:54:49 PM4/3/11
to mini2440
Have you tried : export QWS_MOUSE_PROTO="TSLIB:/dev/input/event0 USB:/
dev/input/mice" ?

More information at http://qt.electronics.cat/mini6410/mini6410_003.html

Good luck,

Jordi

Eduardo Gabriel

unread,
Apr 4, 2011, 8:44:23 AM4/4/11
to mini...@googlegroups.com
Jordi,

I tried and got a strange behavior.

The mouse still does not work and any movement I make with the mouse
makes the touchscreen stops working.

Thanks for the help.

Best Regards, Eduardo Gabriel.

Reply all
Reply to author
Forward
0 new messages