Giter VIP home page Giter VIP logo

Comments (17)

fherrera124 avatar fherrera124 commented on June 9, 2024 1

Hi, just tested the GlcdST7920HWExample.java example. I can confirm that the issue was solved. Thanks.

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

I left this out intentionally as I believe it should be a part of a separate higher level UI toolkit/framework built on top of this library. I have already started the development on the UI toolkit, just didn't have enough time to complete the development.

You can check out the LcdMenu on the development branch to get some ideas on how to implement a Menu system of your own.

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Thanks, I'll give a try with my st7920 lcd.

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Trying to run the example code for st7920 lcd I'm getting the error: Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libucgdisp1701098975227377638.so: libgpiodcxx.so.1: cannot open shared object file: No such file or directory.
I have already installed libgpiod, any ideas of what could be wrong or missing?

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

Looks like its not able to find the native library, can you provide more information about the environment you are running the code from? (e.g. SBC model, linux kernel version, libgpiod version, java jdk etc)

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

I'm running the code in Raspbian, I managed to solve the error, I forgotten to add the c++ bindings when compiling libgpiod. But now when trying to run the example code I'm getting:

java: symbol lookup error: /tmp/libucgdisp5742213074358605241.so: undefined symbol: _ZN5gpiod4chipC1ERKSsi

I don't know what that means. Did I compile libgpiod the right way?:

~/libgpiod-1.3 $ ./autogen.sh --enable-tools=yes --enable-bindings-cxx --prefix=/usr/local --host=arm-linux-gnueabihf CFLAGS="-I/usr/src/linux-headers-$(uname -r)/include/uapi -I/usr/src/linux-headers-$(uname -r)/include -Iinclude -fPIC" ac_cv_func_malloc_0_nonnull=yes

java version "1.8.0_201"
kernel version 4.14.98-v7+

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

Can you try to use v1.2 of libgpiod, see if that works

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Same result :/

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

Can you post the output of ldd /tmp/libucgdisp*.so

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Here is the output:

    linux-vdso.so.1 (0x7edb8000)
    /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x7661a000)
    libgpiod.so.2 => /usr/local/lib/libgpiod.so.2 (0x76602000)
    libgpiodcxx.so.1 => /usr/local/lib/libgpiodcxx.so.1 (0x765e5000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x7649d000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x7641e000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x763f1000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x762b2000)
    /lib/ld-linux-armhf.so.3 (0x76f90000)

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Can you reproduce this issue?

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Sorry to bother you, after running successfully mvn install, what would be the right command to run the st7920 example? I'm having problems with maven not finding arm libraries.

from ucgdisplay.

fherrera124 avatar fherrera124 commented on June 9, 2024

Nevermind, got it working with the command:

mvn exec:java -pl examples/drivers/glcd -Dexec.mainClass="com.ibasco.ucgdisplay.examples.glcd.GlcdST7920Example"

Altough I still cannot use the imported repository from maven.

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

Sorry for the delay, i'm still in the process of re-building my dev environment (something screwed up) and might take some time. I will post an update once I get everything up and running, see if I am able to re-produce this issue.

from ucgdisplay.

EliasGabrielsson avatar EliasGabrielsson commented on June 9, 2024

I was trying out your project as it looked promising. I though stumbled upon the same error as @elganzua124 have experienced.

Error symptom: /usr/bin/java: symbol lookup error: /tmp/libucgdisp1131636424129721253.so: undefined symbol: _ZN5gpiod4chipC1ERKSsi

Output of ldd /tmp/libucgdisp*.so:

	linux-vdso.so.1 (0xbefdf000)
	/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6623000)
	libgpiod.so.2 => /usr/local/lib/libgpiod.so.2 (0xb65f6000)
	libgpiodcxx.so.1 => /usr/local/lib/libgpiodcxx.so.1 (0xb65d9000)
	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6492000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6410000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb63e3000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6295000)
	/lib/ld-linux-armhf.so.3 (0xb6f98000)

Tried with: libgpiod version: commit 1f0d078c83643352a8d2bd1b947f29b44406088e ~1.4.x and tag v1.2. The compilation of libgpiod was configured with: ./autogen.sh --enable-tools=yes --enable-bindings-cxx --prefix=/usr/local

The display controller used is an SDD1309. Configured as following:

        GlcdPinMapConfig RPi = new GlcdPinMapConfig()
                .map(GlcdPin.SPI_CLOCK, 14)
                .map(GlcdPin.SPI_MOSI, 12)
                .map(GlcdPin.RESET, 6)
                .map(GlcdPin.DC, 5)
                .map(GlcdPin.CS, 10);

        System.out.println( "Hello World!" );
        GlcdConfig config = GlcdConfigBuilder.create()
                .rotation(GlcdRotation.ROTATION_NONE)
                .busInterface(GlcdBusInterface.SPI_HW_4WIRE)
                .transportDevice("/dev/spidev0.0")
                .gpioDevice("/dev/gpiochip0")
                .display(Glcd.SSD1309.D_128x64_NONAME0)
                .pinMap(RPi)
                .build();
        GlcdDriver driver = new GlcdDriver(config);
        driver.setCursor(0, 10);
        driver.setFont(GlcdFont.FONT_6X12_MR);
        driver.clearBuffer();
        driver.drawString("Hello World");
        driver.sendBuffer();

The hardware is a Raspberry Pi 4.

from ucgdisplay.

ribasco avatar ribasco commented on June 9, 2024

@elganzua124, @EliasGabrielsson I have made the necessary changes that should fix the issues you previously encountered (latest version is 1.5.2-alpha). In your spare time, could you run another test to confirm if everything is working on your end? Appreciate any feedback

from ucgdisplay.

EliasGabrielsson avatar EliasGabrielsson commented on June 9, 2024

Hi Rafael!
I will give it a go during the holiday and post the results 👍

from ucgdisplay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.