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.

Using Keypad on dm365evm when running Android.

Hi all,

                I have ported android 2.3 on dm365evm.Thus the kernel used is 2.6.32 which is available in devkit provided by TI.

I am also getting the homescreen .as i dont have onboard LCD , i want to use the keypad provided on the board atleast to access the neccessary activities.

FYI :i have alraedy enabled the keypad driver i.e davinci_keyscan in kernel.

and also the device entry nodes are created , in /dev/input0 and can be accessable via /proc/class/event0

Kindly suggest me how to access gpio keys/keypad on dm365evm when andoid is running on it.

THANKS AND REGARDS

ROHIT Y SHANBHAG

BANGALORE

  • Hi Rohit,

    You can connect USB mouse/Keyboard to test functionality.

    Run getevent command and check  whether you getting keypad events on console.

    The <keypad driver name>.kl should be present in /system/user/keylayout folder of your filesystem to make keypad work with Android.

    Please refer to following link and add <keypad driver name >.kl file in /system/user/keylayout folder of your filesystem and try.

    http://gitorious.org/rowboat/vendor-ti-omap3evm/blobs/rowboat-gingerbread/TWL4030_Keypad.kl

    Regards,

    Pankaj Bharadiya

     

  • Good Mroning Pankaj ,

                          I had done some modification as by reading the code, value and input parameters which will be recorded in /dev/input0 for each key, when pressed.

    we have 16 GPIO keys connected in matrix  style .

    I had done some modification regarding the TWL4030_keypad.kl which was in /system/usr/keypad/.

    This is as per my modification :-

    I had modified the OMAP3EVM keylayout to DM365EVM Keylayout

    -------------------------------------------------------------------------

    #DM365EVM keylayout

    key 139   MENU                          WAKE_DROPPED
    key 74    BACK                            WAKE_DROPPED
    key 80    DPAD_UP                    WAKE_DROPPED
    key 28    HOME                           WAKE
    key 108   EXPLORER               WAKE
    key 78    VOLUME_UP
    key 105   DPAD_LEFT              WAKE_DROPPED
    key 79    DPAD_CENTER         WAKE_DROPPED
    key 106   DPAD_RIGHT           WAKE_DROPPED
    key 103   SEARCH                     WAKE
    key 168   VOLUME_DOWN
    key 208      SOFT_LEFT            WAKE_DROPPED
    key 128   DPAD_DOWN          WAKE_DROPPED
    key 164   SOFT_RIGHT           WAKE_DROPPED
    #key 105   POWER                  WAKE

    ---------------------------------------------------------------------------------------------

    FYI : 1) I read the code values by cd  /sys/proc/

                                                               and cat kmsg.

              2) The key 139   MENU                          WAKE_DROPPED

                               139 is the code of  menu button on the board (SW14). Am i entering the key value correct ? if not then what is the keyvalue here?

    I have done this, but i am not able to operate the keypad, also some keys work for a while like , if i press Right button , the screen may navigate to right and left  navigate to left, but it wont work all the time.

    Can you please guide me in this issue.

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

  • Hi Rohit,

    You can map any key for a specific function.

    Please look at your keypad driver code for key codes and update KL with your key codes as per functionality needed.

    Regards,

    Pankaj Bharadiya

  • Hi pankaj ,

                          THANKS SO MUCH FOR YOUR GUIDANCE...

    well, gpio are also working , as we want some flexibility and concerned with the norman operation , we are working with the usb keyboard and its very fast comparitively to GPIO keypad.

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

  • Hi Pankaj,

                      I edited my .kl and .kcm files. Recompiled and copied files to    /system/usr/keylayout  and /system/usr/keychars.

    When iam using iam getting alphanumberic values correct with some default symbols. Whereas i want my own keypad symbols to display. Can u suggest me in this issue.

    Thanks in advance

    Regards

    Pooja.

  • Hi pooja ,

                       Can you send me your .kl and .kcm files ?

    For best accessing your android , Try connecting USB keyboard to your target board.

    THANKS AND REGARDS

    ROHIT Y SHANBHAG

    BANGALORE

  • Hi Rohit,

      I tested with my USB Keyboard, it was working fine.

    Attcahing herewith files plz check it...

    7573.adp5588_kl.txt

    2664.adp5588-keys_kcm.txt

    Please help me out ,thanks in advance.

    Regards

    Pooja

  • Hi pooja

                       Which target board you are using ?

    REGARDS

    ROHIT Y SHANBHAG

  • Good Morning Rohit,

                                         We are using Texas AM1808 Target board.

    I have my keyboard with 2characters on each key

    •  Some keys with alphanumeric type
    • Some with alphabets and special symbols
    • We are getting caps,small, some default characters with Shift button holding.
    • Iam not getting symbols what i mapped in .kcm file. Default symbols are displaying as in Qwerty.
    • Where as iam getting all other keys display correct according to my keypad except symbols.

    Regards

    Pooja.

  • Hi Pooja ,

                        Well, i went through your kcm and kl code ,
    I had ported gingerbread on dm365evm recently , and the keypad is working fine with all special symbols !

    Can u please tell me which all keys wont work ? i will analyse it and will get back to you !

    REGARDS

    ROHIT Y SHANBHAG