Announcement

Collapse
No announcement yet.

Screen Resolution and key mapping (4DCAPE-43+Beaglebone Black+Android+Kernel 3.8)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Screen Resolution and key mapping (4DCAPE-43+Beaglebone Black+Android+Kernel 3.8)

    I have the Andrew Henderson Linux Kernel 3.8 Android JB distribution installed on beaglebone black. I looking to make some improvement the install.

    Screen Resolution

    As you would see from the attached picture the image doesn't use the complete screen. There is an unused strip on the right side. I was wondering if you have any advise on how the get this issue resolved.

    Click image for larger version

Name:	IMG_3854.JPG
Views:	5
Size:	327.9 KB
ID:	40786

    I have modified video=720x480-16@60 parameter on uEnv.txt file. I used 480x272 but did have much success. I used the 16 bit color depth and 60Hz refresh rate. Not really sure if the last two parameters are correct.

    Key Mapping

    The key mapping doesn't work for the Android install. Can you please point me to sources that I could get the key mapping working?

    Thank you
    Attached Files
    Last edited by mahengunawardena; 16th September 2014, 12:04 AM.

  • #2
    Hello

    Sorry, you are going to have to ask Andrew Henderson I am sorry...

    I have his contact details, I will make contact with him and see if he can sign onto the forum and help you with this

    Regards
    James

    Comment


    • #3
      Let's tackle this one piece at a time:

      Originally posted by mahengunawardena View Post
      As you would see from the attached picture the image doesn't use the complete screen. There is an unused strip on the right side. I was wondering if you have any advise on how the get this issue resolved.
      That black bar is a portion of the bar that holds the basic Android control icons. You can actually use a mouse to click the very edge of the screen and hit the main four icons (back, home, menu, search). You can also touch the very edge of the screen and the 43t's touchscreen will allow you to do the same thing. There are a number of properties that are set in the config.xml for the Android image. Among those options is the following:

      Code:
      <bool name="config_showNavigationBar">true</bool>
      If you change that "true" to "false", the black bar will no longer appear.

      Originally posted by mahengunawardena View Post
      I have modified video=720x480-16@60 parameter on uEnv.txt file. I used 480x272 but did have much success. I used the 16 bit color depth and 60Hz refresh rate. Not really sure if the last two parameters are correct.
      If you are using an LCD cape, remove the "video=..." option entirely. The resolution is automatically set when the TILCDC video driver is allocated to the LCD cape's device tree entry. This is also the same device tree entry that will configure the buttons on the LCD display, so you must remove the "video=..." option for the LCD cape's buttons to work. Forcing the video resolution via the "video=" option also tends to make the touchscreen not work on the various LCD capes.

      Originally posted by mahengunawardena View Post
      The key mapping doesn't work for the Android install. Can you please point me to sources that I could get the key mapping working?
      The problem that you are seeing is because you are missing the proper Android key layout file. Since everyone's configuration can be different, I don't enable one by default in my Android image.

      Use your FTDI cable to connect to your BBB system while the LCD cape is attached. It is a very tight fit (since the top of the FTDI connector pushes against the bottom of the cape board), but do your best. Because I do so much cape work that requires the use of the FTDI connection for troubleshooting, I like to insert these guys into place to give more space for the FTDI cable under the cape:

      http://www.adafruit.com/products/706

      Boot your Android system and use the FTDI cable to "cd" into /system/usr/keylayout:

      Code:
      root@android:/ # cd /system/usr/keylayout
      Next, run "getevent":

      Code:
      root@android:/system/usr/keylayout # getevent
      could not get driver version for /dev/input/mice, Not a typewriter
      could not get driver version for /dev/input/mouse0, Not a typewriter
      add device 1: /dev/input/event1
        name:     "ti-tsc"
      could not get driver version for /dev/input/mouse1, Not a typewriter
      add device 2: /dev/input/event2
        name:     "PixArt USB Optical Mouse"
      add device 3: /dev/input/event3
        name:     "gpio_keys.13"
      add device 4: /dev/input/event0
        name:     "tps65217_pwr_but"
      The output here will vary, depending upon what capes and devices you have plugged in. I have a USB mouse plugged in here, for example (as device 2). The touchscreen is device 1 (I have a touchscreen-enabled display), device 3 are the buttons on the cape, and device 4 is a power button. The important thing to note is the full name of your gpio_keys.X device. Next, press one of the buttons on your cape. You'll see something like this:

      Code:
      /dev/input/event3: 0001 0069 00000001
      /dev/input/event3: 0000 0000 00000000
      /dev/input/event3: 0001 0069 00000000
      /dev/input/event3: 0000 0000 00000000
      If you see that (or something similar), you're in good shape. Press control-C to break out of getevent. Next, take a look at the gpio-keys.kl file in the current directory:

      Code:
      root@android:/system/usr/keylayout # cat gpio-keys.kl
      # Beaglebone LCD Cape  GPIO KEYPAD keylayout
      key 105   BACK               WAKE
      key 106   HOME               WAKE
      key 103   MENU               WAKE
      key 108   SEARCH             WAKE
      key 28    POWER              WAKE
      These are the events that are mapped to various keycodes. The buttons on the LCD cape trigger GPIOs that create these keycodes. Now that you know how Android sees your LCD cape (as device "gpio_keys.X"), you'll need to copy the reference gpio-keys.kl file to the proper name that matches that of your LCD cape. In my example, my cape was seen as gpio_keys.13, so I had to copy my gpio-keys.kl file to gpio_keys_13.kl:

      Code:
      root@android:/system/usr/keylayout # cp gpio-keys.kl gpio_keys_13.kl
      root@android:/system/usr/keylayout # chmod 644 gpio_keys_13.kl
      root@android:/system/usr/keylayout # ls -l gpio_keys_13.kl
      -rw-r--r-- root     log           215 2000-01-01 00:09 gpio_keys_13.kl
      root@android:/system/usr/keylayout # sync
      Shut off the power to your BBB, turn it back on, and now the buttons on your LCD should be working with Android.

      Comment


      • #4
        All,

        Key Mapping

        Key Mapping suggestion works as suggested. Thank you for the response.

        Screen Resolution

        The screen Resolution/Navigation bar didn't work as suggested. I will create a separate topic for this issue.

        Mahendra

        Last edited by mahengunawardena; 18th September 2014, 01:54 AM.

        Comment

        Working...
        X