Announcement

Collapse
No announcement yet.

Problem PicorePlayer with ELECROW Touch Display 7" 1024x600 with Jivelite

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

    Problem PicorePlayer with ELECROW Touch Display 7" 1024x600 with Jivelite

    Hi,

    here I described how to setup the display in Raspberry Pi OS. It worked well, even with flipped display and touch! But in PicorePlayer I have unfortunately again Problems with correct setup of the display (I think now that touch calibrating even with flipped (180° rotated) works, cause the calibration program ts_calibrate did show up the correct matrix, and was accessible):

    How do I have setup Jivelite for a flipped touch screen 7" 1024x600? The logo came up right and before I was flipping the screen, Jivelite was working too! After a time of doing nothing Jivelite hangs up the complete system, it could not be warm resetted, instead I had to replug the Pi...
    Click image for larger version

Name:	Screenshot_20220104-191404_Gallery.jpg
Views:	2
Size:	97.3 KB
ID:	1578951'# Pic is from 5" screen, but looks the same on 7" #
    Click image for larger version

Name:	20220112_151341.jpg
Views:	1
Size:	243.3 KB
ID:	1578950
    Please give me hints!

    [UPDATE] touch does not work on PiCorePlayer besides calibration tool. it rotates the other way round, and is upside down...


    Greetz Peter
    Last edited by peddanet; 2022-01-12, 15:53. Reason: touch does not work on PiCorePlayer besides calibration tool

    #2
    Solved - it was a bit hairy and works with best guess method ;-)

    First of all:
    • Does anybody know some structured documentation on all the prarameters of the dtoverlay hdmi settings of raspberry Pi?
    • How can I detect the hdmi timings and settings for my very special display and driver, if the selling company does not offer it? Is there some indirect (software) or hardware derived method getting or deriving these values?


    Hi all,

    finally I was able to solve this issue, as expected it was not straight forward, so I hope I won't miss any necessary step to rebuild my solution with a similar display (so I hope the approach is usable):

    Problem
    There is no fitting skin for Jivelite. I did not find a solution to install and USE the other skins in the other packages. The subset of skins was small (7), I did not find the often referenced skin Joggler or Pi Grid Skin. I really stopped, installed, rebooted very often in many combinations. I found "only" these":
    Click image for larger version

Name:	2022-01-12 23_12_13-pCP - Jivelite Tweaks.png
Views:	1
Size:	42.8 KB
ID:	1574149
    According to my testings, you must find a resolution which finally fits to your touch calibration. If you do the calibration with the framebuffer width and height set to 1024x600 and calibrate afterwards with ts_calibrate, the calibration data was not fitting to the resolution of 800x480 in the end of Jivelite. To shrink framebuffer to 800x480 was one major part of the solution.

    Basic Idea for solution
    After reading a lot in different forums my idea was to calibrate the touch and the display for an assisted resolution. The nearest resolution for my 1024x600 display was 800x480. I had to set the framebuffer accordingly and then calibrate the touch with that resolution. Then Jivelite finally starts. There was really no way to operate on the original resolution of 1024x600 and I tried nearly 24 h continuously any combination with excluding...

    So I don't know, but I am happy to find a solution working with touch and display for the ELECROW Touch Display 7" 1024x600 with a resolution of 800x480:

    Change config.txt on Raspberry Pi in /mnt/mmcblk0p1, I have highlighted all changes I have made:
    Code:
    $ c1
    $ m1
    $ vi config.txt
    
    [Press i for insert, and copy the following into the script]
    # For more options and information see
    # http://rpf.io/configtxt
    # Some settings may impact device functionality. See link above for details
    
    # RPi PI0-1-2 are not supported on this image.
    
    [PI02]
    initramfs rootfs-pCP64-13.1.gz,modules-5.10.77-pcpCore-v8.gz followkernel
    kernel kernel51077v8.img
    arm_64bit=1
    
    [PI3]
    initramfs rootfs-pCP64-13.1.gz,modules-5.10.77-pcpCore-v8.gz followkernel
    kernel kernel51077v8.img
    arm_64bit=1
    
    [PI4]
    initramfs rootfs-pCP64-13.1.gz,modules-5.10.77-pcpCore-v8.gz followkernel
    kernel kernel51077v8.img
    arm_64bit=1
    
    [CM4]
    otg_mode=1
    
    [ALL]
    
    cmdline cmdline.txt
    
    # uncomment if you get no picture on HDMI for a default "safe" mode
    #hdmi_safe=1
    
    # uncomment this if your display has a black border of unused pixels visible
    # and your display can output without overscan
    [B]disable_overscan=1[/B]
    
    # uncomment the following to adjust overscan. Use positive numbers if console
    # goes off screen, and negative if there is too much border
    [B]overscan_left=16
    overscan_right=16
    overscan_top=16
    overscan_bottom=16[/B]
    
    # uncomment to force a console size. By default it will be display's size minus
    # overscan.
    [B]framebuffer_width=800
    framebuffer_height=480[/B]
    
    # uncomment if hdmi display is not detected and composite is being output
    
    # uncomment to force a specific HDMI mode (this will force VGA)
    #hdmi_group=1
    #hdmi_mode=1
    
    # uncomment to force a HDMI mode rather than DVI. This can make audio work in
    # DMT (computer monitor) modes
    
    # uncomment to increase signal to HDMI, if you have interference, blanking, or
    # no display
    #config_hdmi_boost=4
    
    # uncomment for composite PAL
    
    #sdtv_mode=2
    
    #----------------------------------------------------
    dtparam=i2c_arm=on,spi=on,i2s=on
    
    #---pCP----------------------------------------------
    # pCP does not use graphics chip by default, free up most memory
    [B]gpu_mem=128[/B]
    initial_turbo=60
    
    # onboard audio overlay
    dtparam=audio=on
    audio_pwm_mode=2
    
    # For Jivelite use with HDMI screens
    # Comment out the lines above
    #   gpu_mem=xx
    dtparam=audio=on
    # Then uncomment the following line.
    #dtoverlay=vc4-kms-v3d
    
    #
    
    #Disable Bluetooth on both rpi3 and rpi0W
    dtoverlay=disable-bt
    
    # uncomment to overclock the arm. 700 MHz is the default.
    #arm_freq=
    #gpu_freq=
    #core_freq=
    #sdram_freq=
    #over_voltage=
    #force_turbo=
    
    # Remove audio hiss
    # disable_audio_dither=1
    
    #If booting from USB or network, enable this option to reduce CPU load looking for a non-existing card.
    #dtparam=sd_poll_once
    #[B]display_rotate=2[/B]
    # Screen rotation 0 => 0 degrees, 2 => 180 degrees
    #lcd_rotate=0
    
    #Custom Configuration Area, for config settings that are not managed by pCP.
    #pCP will retain these settings during insitu-update
    #---Begin-Custom-(Do not alter Begin or End Tags)-----
    [B]max_framebuffer_height=600
    max_framebuffer_width=1024
    max_usb_current=1
    config_hdmi_boost=10
    #config_hdmi_boost=7
    hdmi_group=2
    hdmi_mode=1
    hdmi_mode=88
    hdmi_drive=1
    hdmi_cvt 1024 600 60 6 0 0 0[/B]
    #---End-Custom----------------------------------------
    
    [Press Esc, and exit with Shift-zz]
    Especially all custom changes and the framebuffer, display_rotate changes are in my opinion the essential ones.

    Futhermore one must add a jivelite.sh to the /mnt/mmcblk0p2/tce :

    Code:
    $ ce
    $ sudo vi jivelite.sh
    
    [Press i for insert, and copy the following into the script]
    #!/bin/sh
    
    #EVENTNO=$(cat /proc/bus/input/devices | awk '/QDtech\ MPI7003/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}')
    EVENTNO=$(cat /proc/bus/input/devices | awk '/QDtech MPI7003/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}')
    
    # Define custom JogglerSkin size
    export JL_SCREEN_WIDTH=800
    export JL_SCREEN_HEIGHT=480
    #export JL_SCREEN_WIDTH=1024
    #export JL_SCREEN_HEIGHT=600
    
    export JIVE_NOCURSOR=1
    export SDL_VIDEODRIVER=fbcon
    export SDL_FBDEV=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/$EVENTNO
    export SDL_MOUSEDRV=TSLIB
    
    ## Just debugging info
    echo Starten Jivelite...
    echo Starten Jivelite... > /home/tc/logJivelite.sh.log
    echo JL_SCREEN_WIDTH=${JL_SCREEN_WIDTH}    >> /home/tc/logJivelite.sh.log
    echo JL_SCREEN_HEIGHT=${JL_SCREEN_HEIGHT}    >> /home/tc/logJivelite.sh.log
    echo JIVE_NOCURSOR=${JIVE_NOCURSOR}    >> /home/tc/logJivelite.sh.log
    echo SDL_VIDEODRIVER=${SDL_VIDEODRIVER}    >> /home/tc/logJivelite.sh.log
    echo SDL_FBDEV=${SDL_FBDEV}    >> /home/tc/logJivelite.sh.log
    echo TSLIB_TSDEVICE=${TSLIB_TSDEVICE}    >> /home/tc/logJivelite.sh.log
    echo SDL_MOUSEDRV=${SDL_MOUSEDRV}    >> /home/tc/logJivelite.sh.log
    
    # Set touch calibration file
    TSLIB_CALIBFILE=/usr/local/etc/pointercal
    
    # Jivelite interface framerate
    export JIVE_FRAMERATE=22
    # Set 32bit color
    /usr/sbin/fbset -depth 32
    
    # Set custom screen resolution
    /usr/sbin/fbset -xres 800 -yres 480
    #/usr/sbin/fbset -xres 1024 -yres 600
    
    
    while true; do
        /opt/jivelite/bin/jivelite >> /var/log/jivelite.log 2>&1
        sleep 3
    done
    
    [Press Esc, and exit with Shift-zz]
    
    $ sudo chmod 755 jivelite.sh
    Install via Tweaks Jivelite, set it to "Set Autostart: No" and reboot, either with

    Code:
    $sudo reboot
    or on main page in the browser.

    After reboot one have to calibrate the touch screen with the following command (before Jivelite isn't installed and STOPPED, the command is not available (package touchscreen-5.10.77-pcpCore-v8.tcz ??)):

    Code:
    # find out which event is responsible for your touch, in my case it was one time unbelievably event5 (and I had an ADS7846 controller on event6 ( but was not working)), but this changes from time to time (here event0):
    $ cat /proc/bus/input/devices
    I: Bus=0003 Vendor=0483 Product=5750 Version=0101
    N: Name="QDtech MPI7003"
    P: Phys=usb-3f980000.usb-1.1.3/input0
    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/0003:0483:5750.0001/input/input0
    U: Uniq=瓿적죯耈쌂 青逢¢Ŵࣈʀ㏃ﳘ陂ΐ
    H: Handlers=mouse0 event0
    B: PROP=0
    B: EV=1b
    B: KEY=400 0 0 0 0 0
    B: ABS=10001000003
    B: MSC=10
    
    $ cat /proc/bus/input/devices | awk '/QDtech MPI7003/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}'
    event0
    
    $ ll /dev/fb*
    crw-rw----    1 root     staff      29,   0 Jan  1  1970 /dev/fb0
    
    # put the found event and the found framebuffer device (memory for the display) into the next command
    $  sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/local/bin/ts_calibrate
    
    # Test the result (drag and draw then quit, look if the screen could be fully accessed and all Buttons and so on are visible)
    $ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/local/bin/ts_test
    
    # finally save the results on the web page main "Backup" or via
    $  sudo filetool.sh -b
    Now start on tweaks page on the PicorePlayer web page of your device and set Jivelite to start at each boot (Set Autostart: yes). Press save and reboot. Done!

    The result looks like this, I am enjoying the sound after a hard days of tweaking and tricking :
    Click image for larger version

Name:	20220112_235918.jpg
Views:	1
Size:	160.1 KB
ID:	1574150
    Click image for larger version

Name:	20220112_235854(0).jpg
Views:	1
Size:	189.6 KB
ID:	1574151

    if anybody has more detailed information, that let the fog of horror vanish and clarifies how to generally approach a solution for *ANY* display which is offered anywhere in the net, I really would appreciate any comment. If my assumptions are partly wrong please correct!


    -----
    References:
    Last edited by peddanet; 2022-12-28, 12:12. Reason: [update pi] option was obsolete for my configuration

    Comment


      #3
      Default calibrations are set for the 800x480 raspberry pi display. And that is the resolution required for the Grid and joggler skins

      Everything else requires a lot of manual setup. Screen makers are notorious for poor documentation, so there are guides similar to what you have posted, but every screen is different.
      piCorePlayer a small player for the Raspberry Pi in RAM.
      Homepage: https://www.picoreplayer.org

      Please donate if you like the piCorePlayer

      Comment


        #4
        dtoverlay, hdmi-timings and so on - Where to look for?

        Hi Paul,
        may I ask you a question?

        I totally understood the policy here, but could you tell me where to find for example the description of these parameters (especially the bold ones):

        ====
        display_rotate=2
        max_usb_current=1
        hdmi_force_hotplug=1
        config_hdmi_boost=7
        hdmi_group=2
        hdmi_mode=1
        hdmi_mode=88

        hdmi_drive=1
        hdmi_cvt 1024 600 60 6 0 0 0
        ====
        hdmi_group=2
        hdmi_mode=87
        hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3
        =====
        dtoverlay=piscreen,speed=24000000,rotate=90
        =====

        Why do they sometimes apply, sometimes not (for example dtoverlay=[...]rotate=180 did not work as far as my experiences). What is the related driver and what its API? Which busses are involved and how to find out which one is served by the disply actually? BTW are there any schematics on the pi?

        And if you see the hdmi timings, how would you achieve to derive them from what? Guessing??

        Happy to look forward your answer!

        BR Peter

        Originally posted by paul- View Post
        Default calibrations are set for the 800x480 raspberry pi display. And that is the resolution required for the Grid and joggler skins

        Everything else requires a lot of manual setup. Screen makers are notorious for poor documentation, so there are guides similar to what you have posted, but every screen is different.

        Comment


          #5
          Originally posted by peddanet View Post
          Hi Paul,
          may I ask you a question?

          I totally understood the policy here, but could you tell me where to find for example the description of these parameters (especially the bold ones):

          ====
          display_rotate=2
          max_usb_current=1
          hdmi_force_hotplug=1
          config_hdmi_boost=7
          hdmi_group=2
          hdmi_mode=1
          hdmi_mode=88

          hdmi_drive=1
          hdmi_cvt 1024 600 60 6 0 0 0
          ====
          hdmi_group=2
          hdmi_mode=87
          hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3
          =====
          dtoverlay=piscreen,speed=24000000,rotate=90
          =====

          Why do they sometimes apply, sometimes not (for example dtoverlay=[...]rotate=180 did not work as far as my experiences). What is the related driver and what its API? Which busses are involved and how to find out which one is served by the disply actually? BTW are there any schematics on the pi?

          And if you see the hdmi timings, how would you achieve to derive them from what? Guessing??

          Happy to look forward your answer!

          BR Peter
          Here would be a good place to start:

          https://www.raspberrypi.com/document...#video-options

          Comment


            #6
            @Yatsushiro
            Thank you, terrific! I really did not see this before!

            Originally posted by Yatsushiro View Post
            Here would be a good place to start:

            https://www.raspberrypi.com/document...#video-options

            Comment


              #7
              Interesting you have hdmi and a spi screen configured. Why is the piscreen entry there if your screen is hdmi?
              piCorePlayer a small player for the Raspberry Pi in RAM.
              Homepage: https://www.picoreplayer.org

              Please donate if you like the piCorePlayer

              Comment


                #8
                Originally posted by paul- View Post
                Interesting you have hdmi and a spi screen configured. Why is the piscreen entry there if your screen is hdmi?
                Hi Paul,

                I did not see that so clearly as I have copied and pasted without really knowing what parts belong to which technology! So could you explain me, where what lines are mixed up and belong either to SPI or HDMI (I have definitely here an HDMI, but also have solutions with a SPI, and as I assume, both running on more or less the same config files (did not check that especially, only from memory !!)...

                Comment


                  #9
                  Update PiCorePlayer to 8.2.0 led to changes in configuration

                  Update from 8.1.0 to 8.2.0 went flawlessly via the web GUI (Main Page -> pcpUpdates):
                  • Minor Update Button
                  • Full Update Button (inkl. some dialogs and 2x reboot (sometimes only 1 time reboot (other devices of mine))


                  After that doing on my four devices, everything went fine, besides my Elecrow 7" radio (this one!), the touch was upside-down. Recalibrating with ts_calibrate did not solve the issue. So I worked on the options and compared them to my former made changes (see above in the thread).


                  Options changed slightly in config.txt (m1/c1/vi config.txt):
                  After updating to picoreplayer 8.2.0 option display_rotate=2 was proven to be obsolete. lcd_rotate=0 did the swap of the touch matrix (this issue arose after update from v8.1.0 and did funnily not affect the graphics itself funnily (because that is what you first assume reading this option, for touch you do the ts_calibrate, my assumption. However the calibration was alright, and issue of "upside down" touch after upate wasn't solved!
                  However I test lcd_rotate=0 (so uncomment it in my proposition down below!) and I did not check if display_rotate does the same job (uncommented below, but now deleted) :
                  • delete/comment display_rotate (was after deleted automatically after update)
                  • comment in/change lcd_rotate=0 (was set automatically to 2 after update)
                  Last edited by peddanet; 2022-12-28, 12:25. Reason: minor change

                  Comment


                    #10
                    Originally posted by paul- View Post
                    Interesting you have hdmi and a spi screen configured. Why is the piscreen entry there if your screen is hdmi?
                    I owed you a good answer to your question!!
                    Meanwhile I changed the config and I updated piCorePlayer to v8.2.0 (so then config also changes besides the custom made changes!). I refer here to my custom made changes regarding hdmi and spi:

                    I use HDMI settings:

                    SPI settings commented out/delete it:
                    Code:
                    #dtoverlay=piscreen,speed=24000000,rotate=90
                    HDMI Settings:
                    Code:
                    max_framebuffer_height=600
                    max_framebuffer_width=1024
                    max_usb_current=1
                    config_hdmi_boost=10
                    hdmi_group=2
                    hdmi_mode=1
                    hdmi_mode=88
                    hdmi_drive=1
                    So now I got back to your comment: Sorry to confuse you and me. But I had 4 different devices, and somehow I messed the information here in this thread unfortunately. So this 7" device is directly connected via HDMI and USB (for touch) into the Pi 3b, so no specific settings via SPI!

                    I will correct my settings above in the starting of the thread! I will also open a new thread for my 5" device, which is connected differently (via DSI - Display Serial Interface). i did not find a specification for DSI, as it is closed source, but as it is the only connection, it is clear that it connects both Touch and Display (maybe only from Pi3 above).

                    Comment


                      #11
                      Hi Peter,
                      I am struggling since10 days with exactly same device you have successfully installed:

                      [email protected]:/mnt/mmcblk0p1$ cat /proc/bus/input/devices
                      I: Bus=0003 Vendor=0484 Product=5750 Version=0101
                      N: Name="QDtech MPI7003 Touchscreen"
                      P: Phys=usb-0000:01:00.0-1.2/input0
                      S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0484:5750.0001/input/input0
                      U: Uniq=
                      H: Handlers=mouse0 event0
                      B: PROP=0
                      B: EV=1b
                      B: KEY=400 0 0 0 0 0 0 0 0 0 0
                      B: ABS=100 3
                      B: MSC=10



                      I exactly followed your instruction, unfortunately i am stuck from first day on following problem: any touch results on same place (coordinates) on the display - example: TS-Calibrate fails:

                      sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/loc
                      al/bin/ts_calibrate
                      xres = 800, yres = 480
                      Took 1 samples...
                      Top left : X = 1024 Y = 600
                      Took 1 samples...
                      Top right : X = 1024 Y = 600
                      Took 1 samples...
                      Bot right : X = 1024 Y = 600
                      Took 1 samples...
                      Bot left : X = 1024 Y = 600
                      Took 1 samples...
                      Center : X = 1024 Y = 600
                      ts_calibrate: determinant is too small -- 0.000000
                      Calibration failed.

                      Please, provide provide me your Pointercal file from your device, I would try to use it in RO mode to force my device from dead point. I spent hours on Google, there are several identical cases, but no solution, except one case who did it with false Pointercal file. Unfortunately, i am not able to find it more .. In case you would send me PM, i am speaking German.
                      Many thanks in advance
                      Kveto Jansík​

                      Comment


                        #12
                        It appears you have a screen or a driver problem. This has nothing to do with ts_calibrate not being able to calibrate. I would run ts_test to see if you get different values anywhere on your screen. You can read about the TS lib here. https://github.com/libts/tslib
                        Last edited by paul-; Yesterday, 22:54.
                        piCorePlayer a small player for the Raspberry Pi in RAM.
                        Homepage: https://www.picoreplayer.org

                        Please donate if you like the piCorePlayer

                        Comment


                          #13
                          I am afraid you are right. I read the git you mentioned already. I found driver on the site http://www.lcdwiki.com/10.1inch_HDMI_Display-H, which is exactly the same device. Due to the fact, I am very old noob (74y), I tried but probably did not manage install the driver properly. Instruction are:
                          Code:
                          sudo rm -rf LCD-show
                          
                          git clone https://github.com/goodtft/LCD-show.git
                          chmod -R 755 LCD-show
                          cd LCD-show/
                          and install just :
                          sudo ./LCD7H-show
                          I did everything on my pCP, but without any effect. I tried display with with Bullseye image, no problem at all, flawlessly! Those LCD7H-show file is just simple script, i do not understand how it should change something in Kernel.It is my 4th player I built and now I am on dead end.
                          If you can provide any hint, i would be grateful.

                          Comment


                            #14
                            Those install scripts are for Raspberry Pi OS not piCore.

                            Comment


                              #15
                              Can you provide any advice how to get and install driver on tinyCore? I tried register on tinyCore forum, there are 5 (!) different tests whether you are human, I didn't manage last test due to sliders, which I cannot move (on different browsers). This LCD display seems to be very good - for my players I tried different LCDs, official 7 inch, which is poor, Waveshare 7 inch C which is ugly and now I stuck without silver line.

                              Comment

                              Working...
                              X