Comments (11)
Ok, the problem is resolved. I have downloaded the latest snapshot and now it works.
Thanks for your help,
Rudi
from pi4j-v2.
Hi, did you add the linuxfs-ic2 plugin:
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-linuxfs</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
from pi4j-v2.
In my project i use the following dependencies:
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>${pi4j.version}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-raspberrypi</artifactId>
<version>${pi4j.version}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-pigpio</artifactId>
<version>${pi4j.version}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-linuxfs</artifactId>
<version>${pi4j.version}</version>
</dependency>
from pi4j-v2.
This are the dependencies I use:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- include Pi4J Core -->
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>${pi4j.version}</version>
</dependency>
<!-- include Pi4J Plugins (Platforms and I/O Providers) -->
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-raspberrypi</artifactId>
<version>${pi4j.version}</version>
</dependency>
<!--
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-pigpio</artifactId>
<version>${pi4j.version}</version>
</dependency>
-->
<!-- include provider for linuxfs-i2c -->
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-linuxfs</artifactId>
<version>${pi4j.version}</version>
</dependency>
As you can see, the plugin for pigpio is commented out and this way it works fine. When I remove the comments to include the pigpio-support, then I get the error message I described above
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package lib.armhf in both module com.pi4j.library.pigpio and module com.pi4j.library.linuxfs
To make the program work again, I have to do the following:
- remove or comment out the dependency in the POM-file
- remove the two jar files for the pigpio from the directory on my raspberry
- remove the two jar files for the pigpio from the target/lib-directory on development machine
As I also need to access gpio-ports I am looking for a working solution. I don't understand why this is not working.
Do I use the wrong modules? Maybe there are newer modules available that circumvent or remedy the problem?
Thanks for all help,
Rudi
from pi4j-v2.
Hi, so you can use both pigpio and linuxfs plugins, but i think there is something wrong with the module configuration of the packages. Are you using modules? Do you need to use modules? I'll have to test this and find out what the problems with the modules is, but i'm not yet very versed in this affair...
from pi4j-v2.
Do you by any change have a larger stack trace?
from pi4j-v2.
@rz259 I've found a problem, where the native libraries are in the same directory in the jars for both plugins. I have now changed the directory for the linuxfs native libraries. Can you try again with the latest snapshot version?
from pi4j-v2.
Hello eitch,
unfortunately I do not have a larger stack trace.
How can I download the latest snapshot version? I deleted the files from the raspberry and from the local computer and thus maven downloaded the versions - but unfortunately I can't tell you if they are the newest snapshot.
At any case the files that got downloaded by Maven do not solve the problems, so it would be nice if you could give me a hint how to download the latest snapshot.
Kind regards,
Rudi
from pi4j-v2.
Hi Rudi. Can you check in your maven repository when
.m2/repository/com/pi4j/pi4j-library-linuxfs/2.0-SNAPSHOT/pi4j-library-linuxfs-2.0-SNAPSHOT.jar
was built?
Kind regards
Robert
from pi4j-v2.
Hi Robert,
the jar was built on 2021-07-29 18.35 h (European Summertime).
Thanks for your help,
Rudi
from pi4j-v2.
from pi4j-v2.
Related Issues (20)
- MockSpi.transfer() doesn't allow the tester to provide mock data
- MockSpi logging is hard to read because it is broken up across multiple lines
- Feature request: Method for MockSpi class that allows reading of the entire buffer for testing purposes
- Data read over I2C becomes out of sync over a slower wireless network HOT 1
- Use Socket#setSoTimeout to timeout read requests of GPIO socket implementation HOT 2
- Extend Digital Input and Output implementations in LinuxFS HOT 4
- Unable to obtain data from DHT11 HOT 2
- Is I2C available in this project for output to a 16x2 LCD? HOT 10
- Does Pi4J support the new PI 5? HOT 6
- pi4j-example-minimal doesn't work on Raspberry Pi 5 HOT 1
- New plugin to add support for the new Raspberry Pi 5 HOT 3
- i2cWriteByte is not able to write value greater then 128 0x80 HOT 1
- java.io.IOException: Remote I/O error java.base/java.io.RandomAccessFile.writeBytes(Native Method) HOT 2
- Extend support for Raspberry Pi 5: PWM and SPI
- Merge pi4j-board-info into core library
- [HELP] Raspberry PI 5 HOT 3
- Gracefully handle UnsatisfiedLinkError on newAutoContext
- Some classes are not importable HOT 6
- Unexpected PI_BAD_HANDLE HOT 9
- libpgiod.so 2.6.0 causes core dump on ARMv6 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pi4j-v2.