B4J Question jpi4j2 library with non RPI CPU

EvgenyB4A

Active Member
Licensed User
Longtime User
Does jpi4j2 library work with non RPI CPUs under Debian Linux distribution?
Foe example RK3288 CPU.
 

EvgenyB4A

Active Member
Licensed User
Longtime User
I try to use this library with RK3566 chip and get errors at these lines:

131 pi4j.Initialize("pi4j")
132 PinOut.Initialize(pi4j, 3) '18 BCM addresses: https://pi4j.com/documentation/pin-numbering/

The logs:
Waiting for debugger to connect...
Program started.
Feb 16, 2023 6:16:47 AM com.pi4j.Pi4J newAutoContext
INFO: New auto context
Feb 16, 2023 6:16:47 AM com.pi4j.Pi4J newContextBuilder
INFO: New context builder
Feb 16, 2023 6:16:48 AM com.pi4j.platform.impl.DefaultRuntimePlatforms add
INFO: adding platform to managed platform map [id=raspberrypi; name=RaspberryPi Platform; priority=5; class=com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform]
Feb 16, 2023 6:16:59 AM com.pi4j.library.pigpio.impl.PiGpioBase validateResult
WARNING: PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed
Error occurred on line: 132 (Main)
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy8.create(Unknown Source)
at com.pi4j.context.Context.create(Context.java:317)
at com.pi4j.internal.IOCreator.create(IOCreator.java:58)
at com.pi4j.internal.IOCreator.create(IOCreator.java:96)
at com.pi4j.internal.IOCreator.create(IOCreator.java:176)
at anywheresoftware.b4j.objects.Pi4JWrapper$DigitalOutputWrapper.Initialize(Pi4JWrapper.java:79)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:673)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:240)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMetho
dAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:96)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.pi4j.provider.impl.ProviderProxyHandler.invoke(ProviderProxyHandler.java:100)
...
21 more
Caused by: com.pi4j.library.pigpio.PiGpioException: PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed
at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:263)
at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:249)
at com.pi4j.library.pigpio.impl.PiGpioNativeImpl.gpioInitialise(PiGpioNativeImpl.java:95)
at com.pi4j.library.pigpio.PiGpio.initialize(PiGpio.java:146)
at com.pi4j.plugin.pigpio.provider.gpio.digital.PiGpioDigitalOutputProviderImpl.create(PiGpioDigitalOutputProviderImpl.java:60)
at com.pi4j.plugin.pigpio.provider.gpio.digital.PiGpioDigitalOutputProviderImpl.create(PiGpioDigitalOutputProviderImpl.java:41)
... 26 more
 
Upvote 0
Top