This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

qt embedded mouse problem

Other Parts Discussed in Thread: AM3517

I'm using the new AM3517 SDK - 4.0.1.0 and it comes with qt 4.6.3.  

My problem is that after compiling my new application I can't get the mouse to work.  The screen works because it was calibrated when the matrix application started and the environment variables are set.  

I found that for the mouse to work the QWS_MOUSE_PROTO had to be changed from Tslib:/dev/input/touchscreen0 to auto:/dev/input/mice which did not work.

After attempting that i checked the kernel to make sure the mouse interface and mice were selected and that was true.  

I also noticed that when doing cat /dev/input/event3 i can see the mouse commands when moved.  I also tried replacing /dev/input/mice to /dev/input/event3 and that didn't work either.  

Any ideas how I may be able to get this work?

  • Hi Rodrigo,

    It sounds like you have done everything right.  Please double check on this page and let me know if you still are having problems:

    http://processors.wiki.ti.com/index.php/How_to_use_a_Mouse_instead_of_the_Touchscreen_with_Matrix

    The default kernel configuration will not work, you actually have to change the mouse settings.

    You can ignore the last step "Cursor Enable", that has been changed in the matrix_gui source to always have the mouse enabled.

  • Hi Jeff,

    Thanks for your response.  But I again checked the kernel, the Mouse Interface and Mice were enabled.  I also rebuilt the kernel and when changing the QWS_MOUSE_PROTO to mice it still did not work.

    I ran the following commands to check the kernel as well as build it:

    - cd to ti-sdk-am3517-evm-4.0.1.0/psp/linux-2.6.32-psp03.00.01.06.sdk

    - make menuconfig and made sure Mouse Interface and Mice were enabled

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517_evm_defconfig

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

    I copied the uImage file to my tftboot directory and restarted the board.  Once the environment variables had changed i ran my application and the mouse still didn't work.

    This are my environment variables :

    TSLIB_TSDEVICE=/dev/input/touchscreen0 MAIL=/var/mail/root OLDPWD=/home/root HOME=/home/root PS1=\u@\h:\w\$ LOGNAME=root TERM=linux PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin SHELL=/bin/sh PWD=/home/root/tooltips2_board_2 TZ=UTC QWS_MOUSE_PROTO=Auto:/dev/input/mice EDITOR=/bin/vi

    Is there something I need to do to my QT code for this to work?  Or is my environment not set properly?

    Thanks,

    Rodrigo

     

  • Rodrigo,

    I can only think of two things that may be keeping the mouse from working.

    1. The Host USB on the AM3517 is High Speed (HS) only.  Are you using a powered HS hub inbetween your EVM and your mouse.  The mouse plugged directly in to the USB Host connector will not work without a Hub. A HS Hub will allow the Low Speed (LS) mouse to work. 

    2. According to the SDK version you specified, the Matrix Gui project in your SDK should have the Cursor enabled, but you can check:

    /home/user//ti-sdk-am3517-evm-4.0.1.0/example-applications/matrix-gui-e-1.3/main.cpp 

    and verify the following code is commented out:

    //Commented out to enable the mouse

    //    QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));

  • Hi Jeff,

    I have a 2.0 usb hub which i believe is High Speed.  

    I also looked at the file you mentioned and that line is commented out.

    This is what is located within my input folder

    ls /dev/input/

    by-id         event0        event2        touchscreen0

    by-path       event1        event3

    Does that look right?  also when I do a cat /dev/input/event3 and move the mouse i can see activity on the screen, don't know if that gives any information.

    The closest I saw to a mouse movement was when i did export QWS_MOUSE_PROTO=LinuxTP:/dev/input/event3  When i moved the mouse the cursor disappeared.  Any ideas how i can make this work?

    Thanks,

    Rodrigo

  • Rodrigo,

    No that does not look right.  I have brought up a board and enabled mouse, this is what I see:

     

    root@am3517-evm:/dev/input# ls

    by-id         event0        mice          mouse1

    by-path       event1        mouse0        touchscreen0

    mice,mouse1 and event1 are all active.

    Just to make sure we are in sync what is your kernel version, I'm using 2.6.32 from the AM3517SDK

    You indicated you are using TFTP to get the kernel from /tftpboot correct.

     

     


     

  • Jeff,

    For some reason mine is different, I went in the menuconfig within ti-sdk-am3517-evm-4.0.1.0/psp/linux-2.6.32-psp03.00.01.06.sdk which is the same 2.6.32 that you are  using.

    Can you tell me what configurations you see when doing a make menuconfig?  

    Is there something more than just mouse interface and mice i have to enable?  

    Is there something i need to disable?  

    Is the way I made my uImage in the second post correct?

    Thanks,

    Rodrigo

  • Rodrigo,

    I'm running out of ideas, this will redo everything.

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- am3517_evm_defconfig

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig

    Device Drivers --> Input device support --> [y] Mouse Interface

    Device Drivers --> Input device support --> [y] Mice

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage