Pi4J / pi4j-v1

DEPRECATED Java I/O library for Raspberry Pi (GPIO, I2C, SPI, UART)
http://www.pi4j.com
Apache License 2.0
1.31k stars 448 forks source link

Not working on Pi Model 4B V1.2 #512

Closed baptmqt closed 3 years ago

baptmqt commented 3 years ago

Pi4J not working on Pi Model 4B V1.2 Revision : c03112 / SoC : BCM2711


gpio version: 2.52
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi 4B, Revision: 02, Memory: 4096MB, Maker: Sony
  * Device tree is enabled.
  *--> Raspberry Pi 4 Model B Rev 1.2
  * This Raspberry Pi supports user-level GPIO access.

root@rpi:/home/home-control# java -jar home-control-1.0-SNAPSHOT-shaded.jar
Unable to determine hardware version. I see: Hardware   : BCM2835
,
 - expecting BCM2708 or BCM2709.
If this is a genuine Raspberry Pi then please report this
to projects@drogon.net. If this is not a Raspberry Pi then you
are on your own as wiringPi is designed to support the
Raspberry Pi ONLY.```
FDelporte commented 3 years ago

Pi4J V1 uses WiringPi under the hoods but has been deprecated. Version 2.52 is the last one and indeed will not support newer versions of the Pi-boards. But still, your board is recognized as a Pi 4B by WiringPi. Strange the Java code throws this error...

eitch commented 3 years ago

You don't need to switch to pi4j v2, just use the pi4j develop/1.4 branch. Furthermore there are branches of wiringPi version 1.60 ( https://github.com/eitch/wiringPi/tree/arm64) which work on Pi 4.

On Fri, 11 Dec 2020 at 08:23, Frank Delporte notifications@github.com wrote:

Pi4J V1 uses WiringPi under the hoods, but has been deprecated. Versio 2.52 is the last one and indeed will not support newer versions of the Pi-boards.

Maybe an idea to switch to https://v2.pi4j.com/ ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Pi4J/pi4j/issues/512#issuecomment-743024215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB35BR3P3RENNOLDF3WIW3SUHCILANCNFSM4UVIK3OA .

-- Robert von Burg eitch@eitchnet.ch dipl. Informatiker in Softwareentwicklung HF / pBac-Eng ODEC software development system & network administration

https://strolch.li

fguiet commented 3 years ago

Hi,

You can use the workraound, I have described here : #510

Seeya Fred

savageautomate commented 3 years ago

That error definitely seems like an outdated version of WiringPi ... or it could be an older version of Pi4J where the WiringPi library was statically compiled. Either way, I have fully tested the GPIO inputs and outputs on RPi4B for the upcoming Pi4J v1.3 release. Everything is working properly and the Pi4J v1.3-SNAPSHOT build/artifacts are available now and the full release is coming in the next couple of weeks. Once caveat however, you must install the unofficial v2.60 of the WiringPi library available here: https://github.com/WiringPi/WiringPi

See: