No announcement yet.

4DCAPE-70T GPIO key-map ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DCAPE-70T GPIO key-map ?

    I'm wondering if it's possible to change the current configuration of the front buttons/key-map? I'd like to change a few of the buttons say from left/right to F11/F12. Is this possible?

    I'm running one of the Ubuntu editions. Everything seems to work, I'm just unsure where the said 'key-map file' is. Can someone point me in the right direction?

    Thanks in advance!

  • #2
    Bump! any suggestions? Weeks out and no response. I even noticed the same results for a similar question asked... Great support on this product, NOT. You'd think asking this question on a forum dedicated to this product, I would find some real answers... But, I guess I seek to find better resolve elsewhere.
    AT LEAST I've discovered one thing....
    I know NOT TO, incorporate this garbage into any future projects. Seems questions, have no simple answers around here. So unprofessional....


    • #3

      I can only apologise for the delay in getting back to you. It may have been researched through various BBB forums with no result.

      Your question is not related to a physical hardware problem and is more a software issue.

      We produce the hardware 4DCAPE70T which is fitted to the hardware pin's on the BBB, we have no control over the various OS's that can be installed on the BBB which is why we may not have an answer to software or configuration issues.

      I will continue to try to find an answer to your problem.

      Best regards



      • #4

        Thank you for the response. Well I certainly don't want to come off as rude. I just figured I'd have at-least got that response the first week... Anyhow, now I know someone does view these forums. I have to ask... IF you guys only design the hardware thats fine. What file currently maps the set of buttons already active? I'd like to have a look and see what's what. I'm sure when you guys designed the carrier board for the BBB to LCD you didn't just willy-nilly the GPIO connections. I'm sure they went to specific pins. From there what maps the up,down,left,right,enter restart,power? Maybe I can just figure it out with that answer... Something maps those keys. Thanks.


        • #5

          It's fine, I understand the frustration.

          In the datasheet page 8, there is a circuit diagram which shows the hardware pins that the switches are connected to which may be useful.

          I hope this helps

          Best regards



          • #6

            Thanks again for the prompt response.

            I came across the schematic already..

            Okay, I'll ask this question in another fashion...

            When your 4D systems engineer was designing this on Eagle, Altium, whatever, ect... Where did he/she get their reference for what GPIO ports to hook/route into?? I'm sure it wasn't a guess.

            Each switch pulls to ground..
            sys reset- T1-reset
            GPIO15- T2-left

            Where did that information come from?? HOW did your engineer know UP,DOWN,LEFT,RIGHT,ENTER??? As far as GPIO's are concerned?

            There is a missing link of information here... I'd like to know how GPIO 15,16,17,3 were decided on? SOOOO again, how did you know say GPIO17 was Right on the keyboard? Where is this reference to GPIO-to key-press?

            Thanks in advance!


            • #7

              The GPIO used are based on the reference design from CircuitCo (Beaglebones main CAPE supplier at the time). Ref. LCD4/LCD7

              The GPIO is set in overlays from memory, which are built into the kernel. So its not something we can change. If you do want to change it, I believe you download the kernel source, and make the modifications required and rebuild the kernel to your requirements.
              This is something we cant really help you with though, so you will need to seek assistance from the beaglebone forums I am sorry, as we cant support their software.

              Maybe this post will help you:



            • #8
              I'm just responding to inform folks of the method that I've taken to change the 5-button functions for the LCD cape.

              This is something that should be 'common knowledge' for a company making such a product. How can you sell this LCD and provide ZERO software support?


              The short answer in fixing this problem is nothing more then modifying the u-boot overlay(S) All the answer's I needed came from working threw another product/project. I had to back-burner this for a few months until I personally gained the knowledge to fix the issue. AGAIN, something 4D systems should be far more proficient at doing. Honestly you guys should have at-least 'ONE' person on payroll that can solve and answer these more advance question's with ease. There is really no excuse, for stupid... Time to hire better EE's period. I WILL NOT buy another 4D product because of this simple issue, oh which I had to resolve myself. Simply unacceptable, and beyond unprofessional.

              Lets start here.. HOW TO CHANGE THE 5-BUTTONs..
              OMG, are you 4D guys learning anything yet? .... Probably not, So I'll continue to spell it out for you..

              I'm working with kernel/image
              Kernel: 4.4.113-ti-r145
              microSD/Standalone: (lxqt-2gb) (All BeagleBone Variants & PocketBeagle) < It's linked about half-way down the page. BUT any newer kernel past my reference SHOULD WORK*** but if it doesn't I'm not helping support it. JUST point you in the right direction. This image woked right out the box with the 7inLCD and all stock buttons/LED functions.
              Check your current BB image/ then kernel

              cat /etc/dogtag
     Debian Image 2018-02-01
              uname -a
              Linux beaglebone 4.4.113-ti-r145 #1 SMP Mon Jan 29 19:44:54 UTC 2018 armv7l GNU/Linux

              -Now starting from the top of that linked BBB u-boot-overlays.

              sudo apt-get update
              sudo apt-get install ti-pru-cgt-installer

              grab kernal headers

              sudo apt-get install linux-headers-`uname -r`

              Then grab build-essentials & overlays

              sudo apt-get install build-essential git-core device-tree-compiler

              Download overlays
              git clone

              Alright you're about halfway there now... You're all set to re-configure these buttons.

              dmesg | grep cape

              This will show an output of
              [ 1.179420] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
              [ 1.179573] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
              [ 1.179585] gpio-of-helper ocp:cape-universal: ready
              [ 2.740787] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,000C,1215BBBK0727'
              [ 2.748147] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
              [ 2.795713] bone_capemgr bone_capemgr: slot #0: '4D 7.0 LCD CAPE- 4DCAPE-70T ,00A3,4D SYSTEMS ,BB-BONE-LCD7-01'
              [ 2.863516] bone_capemgr bone_capemgr: slot #1: No cape found
              [ 2.903710] bone_capemgr bone_capemgr: slot #2: No cape found
              [ 2.958333] bone_capemgr bone_capemgr: slot #3: No cape found
              [ 2.965097] bone_capemgr bone_capemgr: initialized OK.
              [ 3.093699] bone_capemgr bone_capemgr: slot #0: dtbo 'BB-BONE-LCD7-01-00A3.dtbo' loaded; overlay id #0

              Oh.... All the work someone aside the company that makes it should be doing.... OR providing proper documentation for....

              Nevertheless, this shows us, BB-BONE-LCD7-01-00A3.dtbo is the overlay used. NOW we need to modify this overlay.


              then modify the BB-BONE-LCD7-01-00A3.dts

              vi BB-BONE-LCD7-01-00A3.dts

              you should have this towards the bottom. I just changed the linux,code <xx>

              gpio_keys {
              compatible = "gpio-keys";
              pinctrl-names = "default";
              pinctrl-0 = <&bb_lcd_keymap_pins>;

              #address-cells = <1>;
              #size-cells = <0>;

              [email protected] {
              debounce_interval = <50>;
              linux,code = <88>;
              label = "left";
              gpios = <&gpio1 16 0x1>;
              [email protected] {
              debounce_interval = <50>;
              linux,code = <87>;
              label = "right";
              gpios = <&gpio1 17 0x1>;
              [email protected] {
              debounce_interval = <50>;
              linux,code = <1>;
              label = "up";
              gpios = <&gpio1 19 0x1>;
              [email protected] {
              debounce_interval = <50>;
              linux,code = <15>;
              label = "down";
              gpios = <&gpio3 16 0x1>;
              [email protected] {
              debounce_interval = <50>;
              linux,code = <56>;
              label = "enter";
              gpios = <&gpio0 3 0x1>;

              I've linked to a quick reference for linux key code table

              Change the linux,code<xx> to the values you need. I left mine as an example. F12,F11,ESC, TAB, &ALT

              Save the file as-is already named.

              Okay, time to build your new .dtbo file and install it

              cd ~//


              lastly a quick mod to the boot file uEnv.txt
              cd /boot
              sudo vi uEnv.txt

              my file as MODIFIED.



              ###U-Boot Overlays###
              ###Master Enable
              ###Overide capes with eeprom
              ###Additional custom capes
              ###Custom Cape
              ###Disable auto loading of virtual capes (emmc/video/wireless/adc)
              ###PRUSS OPTIONS
              ###pru_rproc (4.4.x-ti kernel)
              ###pru_uio (4.4.x-ti & mainline/bone kernel)
              ###Cape Universal Enable
              ###Debug: disable uboot autoload of Cape
              ###U-Boot fdt tweaks... (60000 = 384KB)
              ###U-Boot Overlays###

              cmdline=coherent_pool=1M net.ifnames=0 cape_universal=disable

              #In the event of edid real failures, uncomment this next line:
              #cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:[email protected]

              ##enable Generic eMMC Flasher:
              ##make sure, these tools are installed: dosfstools rsync

              SAVE the file and reboot... You should have successfully re-programmed the 5 buttons on the front of the screen. WAS this this the correct way of doing it???? I'm not even close to sure. BUT I really don't care. Everything works. The product will now ship, this is OUT OF MY LIFE! and same with 4D-systems. goodness.


              OH and PS your forum time-out on re-login sucks! We lost the good first write-up. and now I don't care.
              Last edited by Tammy-turUp; 12 February 2018, 02:08 PM.