Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 29,422
» Latest member: fnosai
» Forum threads: 16,178
» Forum posts: 116,806

Full Statistics

Latest Threads
booting is looping
Forum: PineNote Software
Last Post: jabi27
6 hours ago
» Replies: 2
» Views: 27
Can’t login to Linux
Forum: Linux on Pinebook Pro
Last Post: fnosai
7 hours ago
» Replies: 0
» Views: 21
* /lib64 is a symbolic li...
Forum: PineNote Software
Last Post: jabi27
9 hours ago
» Replies: 2
» Views: 44
Invalid Signature by m-we...
Forum: PineNote Software
Last Post: Francus
07-25-2025, 05:26 AM
» Replies: 0
» Views: 57
Pinetab2 not starting
Forum: PineTab Hardware
Last Post: biketool
07-25-2025, 03:04 AM
» Replies: 12
» Views: 6,612
incorporate a multimeter ...
Forum: General
Last Post: angelaeng
07-24-2025, 10:41 PM
» Replies: 1
» Views: 287
invalid signatures
Forum: Getting Started
Last Post: Dendrocalamus64
07-24-2025, 08:35 PM
» Replies: 2
» Views: 221
Pinebook problem
Forum: General Discussion on Pinebook Pro
Last Post: mikehenson
07-24-2025, 07:28 AM
» Replies: 1
» Views: 96
? Introducing RoutineHero...
Forum: General Discussion on PineTime
Last Post: oscar-gardiazabal
07-24-2025, 03:25 AM
» Replies: 0
» Views: 72
pinetab2 danctnix broken ...
Forum: PineTab Software
Last Post: acruhl
07-23-2025, 06:27 PM
» Replies: 6
» Views: 304

 
  help with LCD touch configuration using tslib
Posted by: Learnincurve - 02-06-2017, 02:30 AM - Forum: Armbian - No Replies

Hi,

  I bought a Pine64+ board and screen, with a view to using it as a Squeezebox Touch replacement through a USB dac. The board ticks a lot of the hardware boxes for a Squeezebox Touch, with dedicated ethernet and USB ports/busses.

Armbian runs out of the box and supports the touchscreen - at least with legacy 3.10.104 kernel. With mainline kernel (4.10 at time of writing) touchscreen support is available through the generic "goodix" module, but this requires some extra configuration.  I have not yet evaluated the mainline kernel's readiness to run the system that I have in mind.

Using Armbian legacy  (3.10.104), I have installed the packaged Squeezelite from the Armbian repository and Jivelite compiles and runs without errors using

https://github.com/sindrom91/LuaJIT/tree/ARM64

Athough touch events work perfectly in Xfce, they are "all over the place" in Jivelite, so I'm trying to create a tslib/SDL calibration.


Just now I'm struggling with
"tslib: Selected device is not a touchscreen (must support ABS and KEY event types)"

Googling throws up one or two bits of advice, such as:

From http://http://www.cubieforums.com/index....v.html#new:

Quote:Check if input-raw.c has:
    if ((ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit)) < 0 ||
       !(absbit[BIT_WORD(ABS_X)] & BIT_MASK(ABS_X)) ||
       !(absbit[BIT_WORD(ABS_Y)] & BIT_MASK(ABS_Y))) {
      /*fprintf(stderr, "tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)\n");
      return -1;*/
    }

if not, edit the file and comment the lines."


and 
from http://stackoverflow.com/questions/11937...-calibrate:

Quote:Try to add

input_dev = input_allocate_device();
[..]
set_bit(EV_ABS, input_dev->evbit);
set_bit(EV_KEY, input_dev->evbit);
So that the tslib sees the device as supporting both EV_ABS and EV_KEY events (even if it does not actually send both of those).

(I'm assuming this should also be in input-raw.c)

If I look at my own input-raw.c, I see:

Code:
static int check_fd(struct tslib_input *i)
{
        struct tsdev *ts = i->module.dev;
        int version;
        long evbit[BITS_TO_LONGS(EV_CNT)];
        long absbit[BITS_TO_LONGS(ABS_CNT)];
        long keybit[BITS_TO_LONGS(KEY_CNT)];
        long synbit[BITS_TO_LONGS(SYN_CNT)];

        if (ioctl(ts->fd, EVIOCGVERSION, &version) < 0) {
                fprintf(stderr, "tslib: Selected device is not a Linux input event device\n");
                return -1;
        }

        /* support version EV_VERSION 0x010000 and 0x010001
         * this check causes more troubles than it solves here */
        if (version < EV_VERSION)
                fprintf(stderr, "tslib: Warning: Selected device uses a different version of the event protocol than tslib was compiled for\n");

        if ( (ioctl(ts->fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) ||
                !(evbit[BIT_WORD(EV_ABS)] & BIT_MASK(EV_ABS)) ||
                !(evbit[BIT_WORD(EV_KEY)] & BIT_MASK(EV_KEY)) ) {
                fprintf(stderr, "tslib: Selected device is not a touchscreen (must support ABS and KEY event types)\n");
                return -1;
        }

        if ((ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit)) < 0 ||
            !(absbit[BIT_WORD(ABS_X)] & BIT_MASK(ABS_X)) ||
            !(absbit[BIT_WORD(ABS_Y)] & BIT_MASK(ABS_Y))) {
                if (!(absbit[BIT_WORD(ABS_MT_POSITION_X)] & BIT_MASK(ABS_MT_POSITION_X)) ||
                    !(absbit[BIT_WORD(ABS_MT_POSITION_Y)] & BIT_MASK(ABS_MT_POSITION_Y))) {
                        fprintf(stderr, "tslib: Selected device is not a touchscreen (must support ABS_X/Y or ABS_MT_POSITION_X/Y events)\n");
                        return -1;
                }
        }

        /* Since some touchscreens (eg. infrared) physically can't measure pressure,
         * the input system doesn't report it on those. Tslib relies on pressure, thus
         * we set it to constant 255. It's still controlled by BTN_TOUCH/BTN_LEFT -
         * when not touched, the pressure is forced to 0. */
        if (!(absbit[BIT_WORD(ABS_PRESSURE)] & BIT_MASK(ABS_PRESSURE)))
                i->no_pressure = 1;

        if ((ioctl(ts->fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) ||
                !(keybit[BIT_WORD(BTN_TOUCH)] & BIT_MASK(BTN_TOUCH) ||
                  keybit[BIT_WORD(BTN_LEFT)] & BIT_MASK(BTN_LEFT))) {
                fprintf(stderr, "tslib: Selected device is not a touchscreen (must support BTN_TOUCH or BTN_LEFT events)\n");
                return -1;
        }

        /* Remember whether we have a multitouch device. We need to know for ABS_X,
         * ABS_Y and ABS_PRESSURE data. */
        if ((absbit[BIT_WORD(ABS_MT_POSITION_X)] & BIT_MASK(ABS_MT_POSITION_X)) &&
            (absbit[BIT_WORD(ABS_MT_POSITION_Y)] & BIT_MASK(ABS_MT_POSITION_Y)))
                i->mt = 1;

        /* remember if we have a device that doesn't support pressure. We have to
         * set pressure ourselves in this case. */
        if (i->mt && !(absbit[BIT_WORD(ABS_MT_PRESSURE)] & BIT_MASK(ABS_MT_PRESSURE)))
                i->no_pressure = 1;

        if (evbit[BIT_WORD(EV_SYN)] & BIT_MASK(EV_SYN))
                i->using_syn = 1;

        if ((ioctl(ts->fd, EVIOCGBIT(EV_SYN, sizeof(synbit)), synbit)) == -1)
                fprintf(stderr, "tslib: ioctl error\n");

        /* remember whether we have a multitouch type A device */
        if (i->mt && synbit[BIT_WORD(SYN_MT_REPORT)] & BIT_MASK(SYN_MT_REPORT) &&
            !(absbit[BIT_WORD(ABS_MT_SLOT)] & BIT_MASK(ABS_MT_SLOT)))
                i->type_a = 1;

        if (i->grab_events == GRAB_EVENTS_WANTED) {
                if (ioctl(ts->fd, EVIOCGRAB, (void *)1)) {
                        fprintf(stderr, "tslib: Unable to grab selected input device\n");
                        return -1;
                }
                i->grab_events = GRAB_EVENTS_ACTIVE;
        }

        return ts->fd;
}

                 


and I can't see why the test is failing as
  • TS_INFO_FILE=/sys/devices/virtual/input/input6/uevent:
          I: Bus=0018 Vendor=dead Product=beef Version=28bb
            N: Name="gt9xxf_ts"
            P: Phys=input/goodix-ts
            S: Sysfs=/devices/virtual/input/input6
            U: Uniq=
            H: Handlers=event5 autohotplug cpufreq_interactive 
            B: PROP=2
            B: EV=b
            B: KEY=400 0 0 0 0 0
            B: ABS=265000000000000
  • # evtest /dev/input/event5
            Input driver version is 1.0.1
            Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb
            Input device name: "gt9xxf_ts"
            Supported events:
            Event type 0 (EV_SYN)
            Event type 1 (EV_KEY)
                Event code 330 (BTN_TOUCH)
            Event type 3 (EV_ABS)
                Event code 48 (ABS_MT_TOUCH_MAJOR)
                    Value      0
                    Min        0
                    Max      255
                Event code 50 (ABS_MT_WIDTH_MAJOR)
                    Value      0
                    Min        0
                    Max      255
                Event code 53 (ABS_MT_POSITION_X)
                    Value      0
                    Min        0
                    Max     1024
                Event code 54 (ABS_MT_POSITION_Y)
                    Value      0
                    Min        0
                    Max      600
                Event code 57 (ABS_MT_TRACKING_ID)
                    Value      0
                    Min        0
                    Max      255
            Properties:
                Property type 1 (INPUT_PROP_DIRECT)

Can anyone point me in the right direction to getting the device calibrated?

I figure that if I (with help) can get this working, it might be an excellent and cheap squeezebox touch alternative.

BR.

--Marius-


  Multiple Pine64s on Network Fail
Posted by: JCMPine64 - 02-05-2017, 08:08 PM - Forum: General Discussion on PINE A64(+) - Replies (2)

I have been having a heck of a time trying to get 2 Pine64s to work on the same LAN. 

Router - Verizon ActionTec - I know, I know.  It sucks.

Pine64 1
Hostname: Pine64Server2
Static IP: 192.168.1.100
OS: Ubuntu headless

This works fine.  When I first plug it in after flashing the OS, it comes up as just an address (like 192.168.1.8) or I think it used to come up as "Pine64." I change the hostname (and hosts) and set the static IP and it works great. 

Here's where things get wonky.  When I try to add a second Pine64, flashed with the same OS, two things happen (or don't happen):
Pine 64 2
Hostname: Pine64 (default)
IP: DHCP
OS: Ubuntu headless

When I look on the router, suddenly my original Pine64 at 192.168.1.100 is named "Pine64" and I can't see the new Pine64 listed on the router and I can't Putty into it.

Am I doing something wrong?

Thanks


  How is the battery Supposed to be mounted in the PlayBox enclosure?
Posted by: dbarbee - 02-05-2017, 05:33 PM - Forum: Enclosures - Replies (2)

How is the battery Supposed to be mounted in the PlayBox enclosure?

I figured out the rest, but the battery seems to be a mystery. It doesn't fit under the extra panel that mounts on the side of the case opposite the card. Is supposed to be slid under and held in place by the board itself? Double sided taped to that panel?

Any suggestions?


  pine vr
Posted by: rxb - 02-05-2017, 04:26 PM - Forum: Pine A64 Projects, Ideas and Tutorials - No Replies

with an extension cable  and a simple goggle mount for the lcd
a sensor set (gyro-meter, 3 axis accelerometer, etc etc).

then produce a stereoscopic view. and you have a VR system which costs 1/8th of the next least expensive option

you could 3d print the goggles but they probably wouldnt be super comfy ... should have counterweights opposite the screen to keep it from wanting to tilt forward 

anyway to make a goggle harness that holds the lcd screen + an extension 40pin cable) should cost very little, infact you could mount the pine64 and battery behind the head, for a single helmet unit, putting 2 batteries in series would allow 1 to be hot swap-able.


  Would the SOPINE modules work if they were put into a standard SODIMM RAM slot?
Posted by: Wiooooo - 02-05-2017, 12:19 PM - Forum: Getting Started - Replies (4)

Yeah If I put a module of SOPINE in a standard motherboard, would it work as a processor/RAM? I'd like to put 8 of them in a server motherboardWink


  partition editor
Posted by: rxb - 02-04-2017, 09:21 PM - Forum: General Discussion on PINE A64(+) - Replies (3)

when i try and adjust any of the partition sizes gparted has a cow because there is 1 partition that spans across 4 or 5 in all of the android releases.

is there a partition editor which can deal with this and not have a fit about it?

<edit>

seems like this problem gets solved by flashing with etcher instead of DD (even on DD images). i dont understand why, the images worked in the pine 64 but had overlapping partitions when burnt with DD


  New to Pine64
Posted by: Logan5 - 02-04-2017, 04:17 PM - Forum: Getting Started - Replies (9)

I originally ordered a Banana Pi and received a DOA. I then purchased the Pine64. only took 2 days to door, gave me enough to re-burn my micro SD so I would be ready. Literally 3 min's to hook up and boot to ubuntu. Blue tooth broken and kodi was unuseable, so I downloaded RemixOS and love it. works great 10X better. Is for an SunBrite outdoor TV on our Lanai.


Video 7" LCD wooden framen enclosure for Pine64 *UPDATED WITH
Posted by: killor - 02-03-2017, 08:11 AM - Forum: Enclosures - Replies (12)

Hello everyone!!

I have designed and built a enclosure model to house the 7 "LCD Touch screen and the Pine64 computer.
It is made of birch wood.
[Image: 91jUZ07XnTL._SL1500_.jpg]

In principle you do not need to use glue to put the pieces together. Only 8 screws and nuts.

It has two lower and one upper lid For easy access
[Image: 91klnNb2UiL._SL1500_.jpg]

At the bottom of the enclosure , the LIPO battery can be housed.

[Image: 91ng7dIdN3L._SL1500_.jpg]


[Image: 91i3ylg0gUL._SL1500_.jpg]
It has the perfect angle to see the screen, in landscape or vertical mode ..
To read ebook, etc ...

It has small openings for ventilation.
[Image: 91ob8%2Burj3L._SL1500_.jpg]
We have made holes for you to screw, one mini fan of 25mm x10mm 5VDC very common

The pieces are not sanded or varnished.

So you can give your personalized touch.

We will try to make a video of the process of mounting, So that it is available for all those who need help.

So if you are interested, they are available in AMAZON
7" LCD Touch screen wooden frame and pine 64 case


I hope you like it...

Thanks to the Pine64 team for their support To carry out this new project. Heart


  LIRC remote cpntrol
Posted by: trans0 - 02-02-2017, 10:44 PM - Forum: Pine A64 Hardware, Accessories and POT - Replies (3)

Hi , I had LIRC running on raspberry pi, it is really usefull,  But I can't make it work with PINE a64 with debian,  have anybody can share of it? thanks


  How to modify HOSTS file
Posted by: rvalecruz - 02-01-2017, 07:34 PM - Forum: Android on Pine A64(+) - Replies (1)

I am trying to modify the "hosts" file so my Pine64 can be identified on my network with something other than "localhost".  However, when I bring up the file properties, there is no Change button to allow me to change the permissions.  Ideas?