Announcement

Collapse
No announcement yet.

Touch screen problem on PiCore (bug/ just some tslib setting?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • harashoo
    replied
    Yeah, you are right paul.
    1) I did correctly, that's not it.
    2) Here turned out to be the problem. I edited jivelite.sh via SFTP on windows. When I opened the file in the terminal, it turned out that "^M" was automatically added to each line. Now everything works as it should. Thank you!​

    Leave a comment:


  • paul-
    replied
    Just be aware that pcp_startup will get over written during upgrades.

    nothing looks wrong with what you posted, so the go to answers are
    1). Script is not marked executable.
    2) you edited the script on a windows machine and did not change it to linux line endings when you uploaded.

    Leave a comment:


  • harashoo
    replied
    Thank you paul for answer. I try diffrent, for example:
    Code:
    #!/bin/sh
    
    
    EVENTNO=$(cat /proc/bus/input/devices | awk '/wch.cn USB2IIC_CTP_CONTROL/{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​
    Copy of original etc. and jivelite does not want to run. But when I edited pcp_startup.sh now everything work well:
    Code:
    if [ "$JIVELITE" = "yes" ]; then
        echo -n "${BLUE}Starting Jivelite...${NORMAL}"
        eventno=$( cat /proc/bus/input/devices | awk '/wch.cn USB2IIC_CTP_CONTROL/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}')
        if [ x"" != x"$eventno" ]; then
            export JIVE_NOCURSOR=1
            export TSLIB_TSDEVICE=/dev/input/$eventno
            export SDL_MOUSEDRV=TSLIB
            export SDL_MOUSEDEV=$TSLIB_TSDEVICE
        fi​

    Leave a comment:


  • paul-
    replied
    Please post the output of

    cat /proc/bus/input/devices

    and the contents of your j custom jivelite script.

    Leave a comment:


  • harashoo
    replied
    Hi, guys.
    I'll link to the topic. I have 7" HDMI 1024x600 display. After connecting and installing jivelite, the image displays normally. The touch works but unfortunately not quite correctly. The cursor is shifted and presses in a different place. I ran the calibration and then the test and it looks ok. Unfortunately, after creating custom jivelite.sh (executable) in /mnt/mmcblk0p2/tce/ and backup changes, Jivelite does not want to run. Even though it is the copied original file from /opt/jivelite/bin/jivelite.sh. Any idea what's wrong?

    Leave a comment:


  • kjansik
    replied
    Hi Izocad,

    did you solve the problem?
    Last edited by kjansik; 2023-07-10, 06:46.

    Leave a comment:


  • kjansik
    replied
    I didn't, and it works, so negative.

    Leave a comment:


  • Izocad
    replied
    Originally posted by kjansik

    Hi,

    try to set in jivelite.sh joggler resolution to 800x480:



    and custom resolution:



    Can be set in Tweaks Web GUI also. I would do it in any case!

    Afterward select Joggler skin or 800x480 skin.
    Do I also need to tweak the config.txt to that resolution?

    Leave a comment:


  • kjansik
    replied
    Izocad,

    try to set resolution to Joggler 800x480, as in my post higher....

    Concerning the calibration: if you doubt it is OK, do ts_test.
    Last edited by kjansik; 2023-06-08, 14:54.

    Leave a comment:


  • Izocad
    replied
    Originally posted by paul-
    Yes you are going to want to match the resolution against an available skin 1024x600 is a good resolution.

    As for you jivelite.sh script. The awk command in the EVENTNO line is a search command, so you need enough text to match the line from /proc/bus/input/devices.
    Also make sure your frame buffer is set to the right device. Also, "#" at the beginning of a line is a comment, which doesn't get executed, so make sure those are gone too where you need to set a value.

    Code:
    EVENTNO=$(cat /proc/bus/input/devices | awk '/QDtech/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}')
    export JIVE_NOCURSOR=1
    export SDL_FBDEV=/dev/fb0
    export SDL_MOUSEDRV=TSLIB​
    export TSLIB_TSDEVICE=/dev/input/$EVENTNO
    
    while true;
    do /opt/jivelite/bin/jivelite
    sleep 3
    done
    I'm using the Grid skin 1280x800 so that resolution matches.
    Are there any other things I need to be aware of?

    And are the values I'm getting during calibration correct? The left and right one seem to be the same value.
    Code:
    tc@woonkamer:~$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/local/bin/ts_calibrate
    xres = 1280, yres = 800
    Took 1 samples...
    Top left : X = 1 Y = 0
    Took 4 samples...
    Top right : X = 1 Y = 0
    Took 4 samples...
    Bot right : X = 1279 Y = 0
    Took 4 samples...
    Bot left : X = 1279 Y = 799
    Took 4 samples...
    Center : X = 3 Y = 799
    819.747986 0.070848 -0.676047
    65.047394 0.479983 0.278202
    Calibration constants: 53723004 4643 -44305 4262946 31456 18232 65536​

    Leave a comment:


  • paul-
    replied
    Originally posted by maurizio53

    Is it really so easy? I read many posts about issues... but i will try in few days when i'll receive the display and let you know.
    Yes, pCP is setup to use the official screen by default. About the only thing you have to do is flip the screen 180 depending on how you case is configured. Which that is an option on the tweaks page.

    Leave a comment:


  • kjansik
    replied
    Originally posted by Izocad
    Because I have this screen: https://www.aliexpress.com/item/1005004530893933.html
    Skin is Grid 1280x800

    Code:
    tc@woonkamer:~$ cat /proc/bus/input/devices
    I: Bus=0003 Vendor=0484 Product=5750 Version=0101
    N: Name="QDtech MPI1001"
    P: Phys=usb-3f980000.usb-1/input0
    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/0003:0484:5750.0001/input/input2
    U: Uniq=
    H: Handlers=mouse0 event0
    B: PROP=2
    B: EV=1b
    B: KEY=400 0 0 0 0 0 0 0 0 0 0
    B: ABS=2738000 3
    B: MSC=20
    
    ​
    With these options, have tried any combination on and off but touch is never accurate
    Code:
    export JIVE_NOCURSOR=1
    export SDL_FBDEV=/dev/fb0
    export SDL_MOUSEDRV=TSLIB​
    export TSLIB_TSDEVICE=/dev/input/$EVENTNO​
    Have also tested with only this in the script, which give me the same result:
    Code:
    while true;
    do /opt/jivelite/bin/jivelite
    sleep 3
    done​
    I've tested them all on and off but no combination seems to work without issue.
    What do you have in your script?
    Hi,

    try to set in jivelite.sh joggler resolution to 800x480:

    # Define custom JogglerSkin size
    export JL_SCREEN_WIDTH=800
    export JL_SCREEN_HEIGHT=480
    and custom resolution:

    # Set custom screen resolution
    usr/sbin/fbset -xres 800 -yres 480
    Can be set in Tweaks Web GUI also. I would do it in any case!

    Afterward select Joggler skin or 800x480 skin.

    Leave a comment:


  • maurizio53
    replied
    Originally posted by Paul Webster

    All you need to do is install Jivelite from the pCP web interface. Everything should then work automatically.
    Is it really so easy? I read many posts about issues... but i will try in few days when i'll receive the display and let you know.

    Leave a comment:


  • Paul Webster
    replied
    Originally posted by maurizio53
    Is there a project which can be a guide to use the official raspberry 7 inches display with pCP ?
    All you need to do is install Jivelite from the pCP web interface. Everything should then work automatically.

    Leave a comment:


  • Izocad
    replied
    Originally posted by kjansik
    Check the resolution... Why 1280x800? what skin is set?
    Because I have this screen: https://www.aliexpress.com/item/1005004530893933.html
    Skin is Grid 1280x800

    Code:
    tc@woonkamer:~$ cat /proc/bus/input/devices
    I: Bus=0003 Vendor=0484 Product=5750 Version=0101
    N: Name="QDtech MPI1001"
    P: Phys=usb-3f980000.usb-1/input0
    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/0003:0484:5750.0001/input/input2
    U: Uniq=
    H: Handlers=mouse0 event0
    B: PROP=2
    B: EV=1b
    B: KEY=400 0 0 0 0 0 0 0 0 0 0
    B: ABS=2738000 3
    B: MSC=20
    
    ​
    With these options, have tried any combination on and off but touch is never accurate
    Code:
    export JIVE_NOCURSOR=1
    export SDL_FBDEV=/dev/fb0
    export SDL_MOUSEDRV=TSLIB​
    export TSLIB_TSDEVICE=/dev/input/$EVENTNO​
    Have also tested with only this in the script, which give me the same result:
    Code:
    while true;
    do /opt/jivelite/bin/jivelite
    sleep 3
    done​
    I've tested them all on and off but no combination seems to work without issue.
    What do you have in your script?
    Last edited by Izocad; 2023-06-07, 15:33.

    Leave a comment:

Working...
X
😀
🥰
🤢
😎
😡
👍
👎