please choosego to mobile | Continue to access the PC version
View: 6953|Reply: 1

pi4j v2 on Orange Pi 3 (Ubuntu)

[Copy link]

1

threads

1

posts

35

credits

Novice

Rank: 1

credits
35
Published in 2022-1-24 12:33:37 | Show all floors |Read mode
Edited by BS.orangepi at 2022-1-24 13:22

Hi!
I was writing a program that worked in Raspberry PI4 with UART and GPIO. The application is written in Java. The application coped with its functions.
Due to the difficult situation, it was decided to switch to Chinese analogues of single-board computers. According to the possibilities, I liked Orange Pi 3.
On the website (https://pi4j.com/about/new-in-v2 /) it is written that Orange Pi is supported.
According to the instructions, I installed pi4j v2 ( curl -sSl https://pi4j.com/v2/install | sudo bash)
I wrote a test application for flashing 1 LED to check the library. But during execution I see the following error:

Caused by: java.lang.UnsatisfiedLinkError: Pi4J was unable to extract and load the native library [/lib/aarch64/libpi4j-pigpio.so] from the embedded resources inside this JAR [/home/orangepi/CheckUart.jar]. to a temporary location on this system. You can alternatively define the 'pi4j.library.path' system property to override this behavior and specify the library path.
at com.pi4j.library.pigpio.util.NativeLibraryLoader.load(NativeLibraryLoader.java:170)
at com.pi4j.library.pigpio.internal.PIGPIO.<clinit>(PIGPIO.java:74)
at com.pi4j.library.pigpio.impl.PiGpioNativeImpl.gpioInitialise(PiGpioNativeImpl.java:91)
at com.pi4j.library.pigpio.PiGpio.initialize(PiGpio.java:146)

File "libpi4j-pigpio.so" not anywhere. Where can I find it?
What am I doing wrong?
Are there alternative ways to work with UART and GPIO in Java?

Sorry for my English.


0

threads

1

posts

6

credits

Novice

Rank: 1

credits
6
Published in 2022-2-11 16:56:27 | Show all floors
Unfortunately, your information is not correct, at the moment it says the following:

Other Platforms – Other platforms such as Odroid, BananaPi, NanoPi, OrangePi, etc. have been removed and will no longer be supported. The challenge with supporting these additional platforms is that Pi4J depends on the underlying WiringPi project and WiringPi ports for these other platforms is not well supported by the various SoC vendors or community. The various WiringPi ports for these other platforms are also inconsistent causing inconsistent features and functionality of Pi4J. Additionally, regression testing of bug fixes and new features in Pi4J is compounded with each additional supported platform.

I would also really like to use OrangePI for my Java projects, but at the moment I can't find a suitable framework for that.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list