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.

Beagleboard-xm run Android GINGERBREAD 2.3.4 prebuild images, sendevent can't work!



Hi all

       I use beagleboard-xm , and get the android pre-build images for Pre-built Images from  http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_4_DevKit_2_1/index_FDS.html 

      In my application, I want to use the sendevent to finish the following work,   move the Cursor to the position, and click.

      The code used to move the cursor

      sendevent /dev/input/event3 2 0 4
      sendevent /dev/input/event3 0 0 0
      sendevent /dev/input/event3 2 1 5
      sendevent /dev/input/event3 0 0 0

      The code used to generate a click

      sendevent /dev/input/event3 4 4 589825
      sendevent /dev/input/event3 1 272 1
      sendevent /dev/input/event3 0 0 0
      sendevent /dev/input/event3 4 4 589825
      sendevent /dev/input/event3 1 272 0
      sendevent /dev/input/event3 0 0 0

       But they all didn't work!

       I test this code in a MTK-android board, it can work correctly!

       Another question:

       I download the source code of Android GINGERBREAD 2.3.4, and want to re-compile the filesystem.  I following the instruction of document TI-Android-GingerBread-2.3.4-DevKit-2.1 DeveloperGuide.pdf. 

           use "make TARGET_PRODUCT= beagleboard OMAPES=5.x -j8", But about 14h later , the compiler still compiling, why use so long time?

     

 

 

  • Have you made sure that you are using the correct device entry for the sendevent?

    Could you give the output for the following command on your beagleboard:

    # ls -l /sys/class/input

  • Hi Vishveshwar Bhat

       Thank you for reply!

        Before use sendevent, I use getevent to get the mouse event and the event command.

         //--------------------------------------------------------------------------------------------

         The content of ls -l /sys/class/input

         / # ls -l /sys/class/input/
    total 0
    lrwxrwxrwx    1 0        0                0 Jan  1 03:12 event0 -> ../../devices/platform/gpio-keys/input/input0/event0
    lrwxrwxrwx    1 0        0                0 Jan  1 03:12 event1 -> ../../devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input1/event1
    lrwxrwxrwx    1 0        0                0 Jan  1 03:15 event2 -> ../../devices/platform/ehci-omap.0/usb1/1-2/1-2.5/1-2.5:1.0/input/input6/event2
    lrwxrwxrwx    1 0        0                0 Jan  1 03:12 input0 -> ../../devices/platform/gpio-keys/input/input0
    lrwxrwxrwx    1 0        0                0 Jan  1 03:12 input1 -> ../../devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input1
    lrwxrwxrwx    1 0        0                0 Jan  1 03:15 input6 -> ../../devices/platform/ehci-omap.0/usb1/1-2/1-2.5/1-2.5:1.0/input/input6
    lrwxrwxrwx    1 0        0                0 Jan  1 03:12 mice -> ../../devices/virtual/input/mice
    lrwxrwxrwx    1 0        0                0 Jan  1 03:15 mouse0 -> ../../devices/platform/ehci-omap.0/usb1/1-2/1-2.5/1-2.5:1.0/input/input6/mouse0

     //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

         I change the usb port ,so this time the mouse event change to event2 , following is the content of getevent when i move mouse and click right and left button

       / # getevent
    add device 1: /dev/input/event2
      name:     "Logitech USB Optical Mouse"
    could not get driver version for /dev/input/mouse0, Not a typewriter
    could not get driver version for /dev/input/mice, Not a typewriter
    add device 2: /dev/input/event0
      name:     "gpio-keys"
    add device 3: /dev/input/event1
      name:     "twl4030_pwrbutton"
    /dev/input/event2: 0002 0000 ffffffff
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0000 ffffffff
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0000 ffffffff
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0000 ffffffff
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0002 0001 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090002
    /dev/input/event2: 0001 0111 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090002
    /dev/input/event2: 0001 0111 00000000
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090001
    /dev/input/event2: 0001 0110 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090001
    /dev/input/event2: 0001 0110 00000000
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090002
    /dev/input/event2: 0001 0111 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090002
    /dev/input/event2: 0001 0111 00000000
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090001
    /dev/input/event2: 0001 0110 00000001
    /dev/input/event2: 0000 0000 00000000
    /dev/input/event2: 0004 0004 00090001

  • This problem is sloved.  Modify the file kernel/driver/input/input.c  , when use sendevent ,the driver just pass the event to device, but no pass the event to the device node under the /dev/input.   Add a statement to pass the event to device node , then use sendevent can move the mouse.

  • Hi,Eric

    I want to know how to add a statement to pass the event to device node? thax