ScroggHill
Posts: 6
Joined: Sun Feb 26, 2017 11:21 pm

"Unable to determine hardware version"

Wed May 03, 2017 7:43 pm

Hello.

I've run sudo apt-get update & sudo apt-get upgrade on my Rpi 3 tonight (Raspbian Jessie). I rebooted, then tried running a jar file from the console, but got the message "Unable to determine hardware version. I see: Hardware : BCM2835 - expecting BCM2708 or BCM2709. Please report this to [email protected]"

This also happens when trying to run a java program from BlueJ (but only for code using the Pi4J API). I understand from previous posts that this error has occurred with past revisions. What is the best way to go about correcting this?

Many thanks.

ScroggHill
Posts: 6
Joined: Sun Feb 26, 2017 11:21 pm

Re: "Unable to determine hardware version"

Wed May 03, 2017 9:17 pm

Solved by bumping kernel version to 4.4.49

vinny_zone
Posts: 2
Joined: Tue May 09, 2017 1:25 pm

Re: "Unable to determine hardware version"

Tue May 09, 2017 1:33 pm

Hi ScroggHill,
how did you change your kernel version ?
can u pls post steps/commands ?

sorry - m new to raspberry pi

Thanks in advance

User avatar
DougieLawson
Posts: 33616
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: "Unable to determine hardware version"

Tue May 09, 2017 2:01 pm

Have you got the very latest version of WiringPi?

http://wiringpi.com/download-and-install/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

vinny_zone
Posts: 2
Joined: Tue May 09, 2017 1:25 pm

Re: "Unable to determine hardware version"

Tue May 09, 2017 2:19 pm

DougieLawson wrote:Have you got the very latest version of WiringPi?

http://wiringpi.com/download-and-install/
Hi
if you are asking me - then yes, i have the latest version of wiring pi installed but m still getting this error:
**********
Unable to determine hardware version. I see: Hardware : BCM2835
,
- expecting BCM2708 or BCM2709.
*********
After updating my rpi couple of days ago - i have this hardware version now
Hardware : BCM2835
Revision : a22082
Serial : 0000000056f0096a
with kernel version Linux XXXRPi 4.9.25-v7+ #995 SMP Thu May 4 15:52:25 BST 2017 armv7l GNU/Linux.

Any help would be much appreciated.
Thanks

fruitoftheloom
Posts: 17288
Joined: Tue Mar 25, 2014 12:40 pm

Re: "Unable to determine hardware version"

Tue May 09, 2017 2:41 pm

vinny_zone wrote:Hi ScroggHill,
how did you change your kernel version ?
can u pls post steps/commands ?

sorry - m new to raspberry pi

Thanks in advance
Raspbian Jessie update:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
Adieu

ScroggHill
Posts: 6
Joined: Sun Feb 26, 2017 11:21 pm

Re: "Unable to determine hardware version"

Tue May 09, 2017 4:17 pm

Info here on how to change kernel version:

https://tech.enekochan.com/en/2014/03/0 ... -raspbian/

I had this problem with kernel version 4.9.x & the latest version of wiringPi as well. No problem seemingly with kernel 4.4.49 (so far).

mfa298
Posts: 1273
Joined: Tue Apr 22, 2014 11:18 am

Re: "Unable to determine hardware version"

Tue May 09, 2017 7:54 pm

ScroggHill wrote:Hello.

I've run sudo apt-get update & sudo apt-get upgrade on my Rpi 3 tonight (Raspbian Jessie). I rebooted, then tried running a jar file from the console, but got the message "Unable to determine hardware version. I see: Hardware : BCM2835 - expecting BCM2708 or BCM2709. Please report this to [email protected]"

This also happens when trying to run a java program from BlueJ (but only for code using the Pi4J API). I understand from previous posts that this error has occurred with past revisions. What is the best way to go about correcting this?

Many thanks.

You may want to have a read of:
viewtopic.php?f=29&t=167934&start=200#p1144459

tl'dr: WiringPi probably isn't the issue (it was fixed in December) you issue is probably in Pi4J as they're using a fixed and old version. If Pi4J is causing issues you may need to take the issue up with the authors of that (of course make sure you've upgraded everything via apt-get dist-upgrade first)

wbp
Posts: 18
Joined: Sat Mar 30, 2013 12:34 am

Re: "Unable to determine hardware version"

Wed Jun 07, 2017 2:14 am

I had the same error, and I'm not using Pi4J, just WiringPi in a python program. Brand new Pi 2 model B, and I had just run apt-get update/upgrade. Made sure I had latest version of WiringPi. GPIO command works.

Downgraded kernel to 4.4.49 and problem was gone. Thanks ScroggHill for figuring out the bypass and letting us know, it's much appreciated!

Will

skypi
Posts: 85
Joined: Sat Aug 09, 2014 11:48 pm

Re: "Unable to determine hardware version"

Tue Jun 20, 2017 2:51 pm

I confirm I'm getting that same problem, everything at latest versions on jessie-lite pi zero w.

installed python wiringpi library with pip after install of latest wiringpi.

python wiringpi library fails

Unable to determine hardware version. I see: Hardware : BCM2835

the wiringpi gpio utility works OK

megamarky
Posts: 42
Joined: Sun Jun 11, 2017 6:43 am

Re: "Unable to determine hardware version"

Tue Jul 11, 2017 7:25 am

Looks like this is currently an unsolved issue with the Pi4J and maybe other libraries using wiringPI.

My setting was a fresh RaspberryPI Zero with installation from NOOBS_v2_3_0.zip package to install the full Raspbian that came automatically with a kernel 4.9.x that causes this error.

So as the previous posts noted I installed a previous version of the kernel with following:

# Install Kernel version 4.4.50 https://github.com/Hexxeh/rpi-firmware/ ... da56496764

Code: Select all

sudo rpi-update 52241088c1da59a359110d39c1875cda56496764
Here is a topic about the same issue
https://groups.google.com/forum/#!topic ... 7K46g-hmsg

The Pi4J seems to have a development version that fixes this in upcoming development version 1.2
https://github.com/Pi4J/pi4j
GigaBrain.io

cpunk
Posts: 80
Joined: Thu Jun 29, 2017 12:39 pm

Re: "Unable to determine hardware version"

Thu Jul 20, 2017 1:54 pm

Also experienced this today. My platform was as follows:

Code: Select all

uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Results:

- For me, updating to the latest *precompiled* pi4j snapshot does not help. Maybe their binary snapshots are out of date as of today (2017-07-20).

- I would recommend to pi4j developers (they deserve thanks for an otherwise very practical and fancy library) not to play politics in source code. It's open source, whoever is using a clone can edit out the version string check anyway. What we see now is a half-assed anti-knockoff check breaking things out of the blue for everyone using mainline software and hardware. That's not how things are supposed to be happening. :P

- As advised by "megamarky" above, I downgraded my kernel to:

Code: Select all

uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
...ant it works now. :) Will try to re-upgrade later.

User avatar
savageautomate
Posts: 225
Joined: Thu Aug 16, 2012 3:20 pm
Location: USA
Contact: Website

Re: "Unable to determine hardware version"

Fri Aug 04, 2017 3:42 pm

Image

For clarification .....

FWIW .. Pi4J does not implement any hardware/kernel version checking routines in its own code. (at least none that I remember)

The error you are seeing is an error message output by the WiringPi library due to a change in the hardware signature starting with kernel version 4.8.

You can run the following command and see the "Hardware" information displayed by the kernel.

Code: Select all

> cat /proc/cpuinfo
...
Hardware	: BCM2835
However, Gordon updated WiringPi to support this change long ago (December 2016) in WiringPi version 2.36.
(commit: http://git.drogon.net/?p=wiringPi;a=com ... 2fa24e7c95)

And Pi4J included these updates from WiringPi somewhere around January 2017 in Pi4J version 1.2-SNAPSHOT builds.

So why does this issue continue to popup? And why does installing the latest WiringPi on my system not resolve the issues?

Early on in Pi4J development we started embedding (static linking) a pre-compiled version of WiringPi inside the native Pi4J package. We did this because at that time WiringPi was not included in the OS image and many Java programmers new to the embedded world struggled with the WiringPi dependency and making sure compatible versions of Pi4J and WiringPi were in sync.

So (by default) Pi4J does not care or use what version of WiringPi you may have installed on your system. Thus if you are using Pi4J version 1.1 or lower, then you are still using an outdated version of WiringPi. The solution is to upgrade to Pi4J version 1.2-SNAPSHOT. Most users have reported success after upgrading to Pi4J version 1.2-SNAPSHOT. However a small number of users have reported still having this issue after upgrading. For users continuing to experience this issue, I'm not sure what's going wrong and would be happy to help if you can provide some further details on your environment and steps you have attempted to solve the problem.

Another workaround users can try is to tell Pi4J not to use it's embedded WiringPi and instead use the shared WiringPi library installed on your system. Pi4J does optionally support dynamic linking against WiringPi for use cases when a newer or custom version of WiringPi is needed. All you have to do is set the system property:

Code: Select all

pi4j.linking=dynamic
You can also include this in your java command line when launching your java program with the "-D" argument:

Code: Select all

java -Dpi4j.linking=dynamic

Perhaps the biggest help would be to get Pi4J version 1.2 released. Its way overdue. I have been pulled in many directions since the start of 2017 and have not been able to focus on the Pi4J project as much as I would like to. I will make an effort to get version 1.2 released soon.

Thank You,
Robert
Robert Savage | Follow me @savageautomate
http://www.pi4j.com | http://www.pislices.com
http://www.savagehomeautomation.com

User avatar
GeertVc
Posts: 24
Joined: Fri Apr 12, 2013 7:45 am
Location: Belgium

Re: "Unable to determine hardware version"

Sat Aug 05, 2017 7:35 am

Suffered from the same a while ago... For those who still want to keep Pi4j 1.1 and have the issue with the changed CPU hardware name and want to (re)compile Pi4J including the newest version of wiringPi, I've made a small overview on how to do this here: https://groups.google.com/d/msg/pi4j/P7 ... CCrwMgAwAJ.

The build process is done all on the same (virtual) Linux machine, without the need to compile wiringPi on the RPi itself.

Feel free to use...

!!!IMPORTANT!!!: THE ABOVE IS NOT VALID ANYMORE...

You can still follow the instructions in the link I gave to set up your Linux environment, but there's NO need anymore to modify build scripts.

Once you have set up the Linux environment and retrieved the Pi4J git repo (where you will be on the master branch by default), you only have to issue the following command:

Code: Select all

mvn clean install -Pcross-compile,raspberrypi
This should result in compiling in the newest wiringPi stuff into the libpi4j.so library, next to the Pi4J stuff itself.
Last edited by GeertVc on Sun Aug 06, 2017 10:04 am, edited 1 time in total.

cpunk
Posts: 80
Joined: Thu Jun 29, 2017 12:39 pm

Re: "Unable to determine hardware version"

Sat Aug 05, 2017 6:58 pm

Wow, thanks for the detailed info. :) And sorry for "barking up the wrong tree", at the time of writing I didn't figure out that there was library embedding going on, and that simply setting a system property could override it. :) :D

megamarky
Posts: 42
Joined: Sun Jun 11, 2017 6:43 am

Re: "Unable to determine hardware version"

Wed Sep 06, 2017 7:40 am

Thank you Robert for the clarification for the upcoming 1.2-SNAPSHOT
I changed the version to 1.2-SNAPSHOT when using Maven to the POM file and added the additional repository, because the 1.2-SNAPSHOT is not yet in the Maven Repository https://mvnrepository.com/artifact/com.pi4j/pi4j-core

Code: Select all

	
	<repositories>
		<repository>
			<id>pi4j</id>
			<name>pi4j</name>
			<url>https://oss.sonatype.org/content/groups/public</url>
		</repository>
	</repositories>
There seemed to be a problem with one of the .jar packages in the Sonatype repository called pi4j-device-1.2-SNAPSHOT.jar
Eclipse cannot open the JAR and it cannot be extracted, it says the JAR package has "invalid LOC header (bad signature)" in Eclipse.

The other JAR packages worked ok. Is there another place to download the pi4j-device library?
GigaBrain.io

megamarky
Posts: 42
Joined: Sun Jun 11, 2017 6:43 am

Re: "Unable to determine hardware version"

Wed Sep 06, 2017 4:01 pm

There seemed to be a problem with one of the .jar packages in the Sonatype repository called pi4j-device-1.2-SNAPSHOT.jar
Eclipse cannot open the JAR and it cannot be extracted, it says the JAR package has "invalid LOC header (bad signature)" in Eclipse.

The other JAR packages worked ok. Is there another place to download the pi4j-device library?
Sorry no problem in the JAR file, I deleted manually the maven folder and updated the project and it downloaded the newer jar version of the pi4j-device library. Seems the download was corrupt by maven.
GigaBrain.io

petr2
Posts: 3
Joined: Mon Apr 17, 2017 11:05 am

Re: "Unable to determine hardware version"

Thu Sep 21, 2017 5:03 pm

I see this is an active topic, and I have had no joy with installing pi4j 1.2 SNAPSHOT nor with using dynamic linking (java -Dpi4j.linking=dynamic ..)

I am using it on a relatively clean install of jessie-lite on a pi zero. It was installed and everything ran beautifully until I did an apt-get update. First, how can I tell if pi4j 1.2 is installed correctly?

Petr

megamarky
Posts: 42
Joined: Sun Jun 11, 2017 6:43 am

Re: "Unable to determine hardware version"

Mon Sep 25, 2017 8:45 am

petr2 wrote: It was installed and everything ran beautifully until I did an apt-get update. First, how can I tell if pi4j 1.2 is installed correctly?

Petr
You can try running the example applications https://github.com/Pi4J/pi4j/tree/master/pi4j-example and tell us the error message you get from running your application. When running pi4j you should see an error message. Or then you could debug your java program or run the program in verbose mode.

You could see if the application that you run is dependent on the 1.2 version by opening up your jar package with 7zip (or other zip extractor) and looking into the lib folder to see if there's the 1.2 libraries present.

Try to get the error message and write a post for further examination.
GigaBrain.io

megamarky
Posts: 42
Joined: Sun Jun 11, 2017 6:43 am

Re: "Unable to determine hardware version"

Tue Sep 26, 2017 8:40 am

petr2 wrote:
Thu Sep 21, 2017 5:03 pm
I see this is an active topic, and I have had no joy with installing pi4j 1.2 SNAPSHOT nor with using dynamic linking (java -Dpi4j.linking=dynamic ..)

I am using it on a relatively clean install of jessie-lite on a pi zero. It was installed and everything ran beautifully until I did an apt-get update. First, how can I tell if pi4j 1.2 is installed correctly?

Petr
Here is a small TEST script that you can use to test the pi4j 1.2 version. You just simply run the following commands that downloads the pi4j with wget the same that your normal Maven or Gradle packaging system would do and runs the jar example application. Note that this is just for testing purposes, the pi4j jar packages should normally be located inside your application and be packaged by Maven or Gradle. This is just for fast testing.

Code: Select all

wget -O pi4j-core-1.2-SNAPSHOT.jar https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-core/1.2-SNAPSHOT/pi4j-core-1.2-20180423.162750-37.jar
wget -O pi4j-device-1.2-SNAPSHOT.jar https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-device/1.2-SNAPSHOT/pi4j-device-1.2-20170905.153835-34.jar
wget -O pi4j-gpio-extension-1.2-SNAPSHOT.jar https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-gpio-extension/1.2-SNAPSHOT/pi4j-gpio-extension-1.2-20170905.195933-35.jar 
wget -O pi4j-example-1.2-SNAPSHOT.jar https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-example/1.2-SNAPSHOT/pi4j-example-1.2-20180423.162833-37.jar

sudo java -classpath pi4j-example-1.2-SNAPSHOT.jar:pi4j-core-1.2-SNAPSHOT.jar:pi4j-device-1.2-SNAPSHOT.jar:pi4j-gpio-extension-1.2-SNAPSHOT.jar SystemInfoExample
Or then you can run any test in the pi4j example like

Code: Select all

sudo java -classpath pi4j-example-1.2-SNAPSHOT.jar:pi4j-core-1.2-SNAPSHOT.jar:pi4j-device-1.2-SNAPSHOT.jar:pi4j-gpio-extension-1.2-SNAPSHOT.jar GpioTest
I have one RPI Zero also that I will look into upgrading and trying out the 1.2 version also.

__ Updated core and example jar links to working ones __
Last edited by megamarky on Mon Jun 25, 2018 8:24 am, edited 1 time in total.
GigaBrain.io

Brendz
Posts: 2
Joined: Sat Oct 14, 2017 11:37 am

Re: "Unable to determine hardware version"

Sat Oct 14, 2017 12:02 pm

Hello All,
Greetings.. Have Purchased Raspberry Pie 3 Model B. Had all the updates in place after installing Rasbian Pi. Narrowed down to BlueJ as a compiler for writing programs. Earlier was facing the subject as error. After referring to some solutions available on this forum . Bumped kernal version to 4.4.49 from 4.9.41. The subject error stopped appearing but now have a different issue that needs to be resolved.

Details of gpio are as below
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

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

I'm new to raspberry as well as java. I am currently trying to execute some sample java programs available in BlueJ projects folder.
The sample prg I'm trying to execute is LED-Button. No syntax errors have created a jar file with the following library files selected
1) Pi4jcore.jar 2) pi4j-device.jar 3) pi4j-gpio-extension.jar 4) pi4j-service.jar

When executing the jar file at Terminal we get the following errors.

[email protected]:~/Documents/BlueJ_Projects/LED-Button/LedDemo $ sudo java -jar LedDemo.jar
Exception in thread "main" com.pi4j.io.gpio.exception.GpioPinExistsException: This GPIO pin already exists: GPIO 6
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin(GpioControllerImpl.java:552)
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:717)
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:729)
at LED.<init>(LED.java:23)
at LEDTester.flashMorse(LEDTester.java:57)
at LEDTester.main(LEDTester.java:22)

Kindly reply to my query. Any help would be greatly appreciated.

Thank U
Regards
Brendz

User avatar
DougieLawson
Posts: 33616
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: "Unable to determine hardware version"

Sat Oct 14, 2017 11:05 pm

That's a well known bug in Pi4J.
https://github.com/Pi4J/pi4j/issues/349
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

Brendz
Posts: 2
Joined: Sat Oct 14, 2017 11:37 am

Re: "Unable to determine hardware version"

Mon Nov 13, 2017 11:57 am

Hello All,

Faced the above mentioned issue. After a fresh recovery of Rasbian and ran the following terminal commands
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update

After the updates,Upgrades still faced the same.

Using Raspberry Pie 3 Model B

$ gpio -v

GPIO version is

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

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

$ uname -a

Linux raspberrypi 4.9.61-v7+ #1049 SMP Fri Nov 10 15:32:51 GMT 2017 armv7l GNU/Linux


Upgraded to pi4j VERSION 1.2. Here is the link to download version if you are using pi4j version 1.1 or lower then you are still using the outdated version of wiring-Pi for BCM2835

Thank You All for the solutions
Regards
Brenden n Team

DavidMS
Posts: 138
Joined: Fri May 25, 2012 8:48 pm
Contact: Website

Re: "Unable to determine hardware version"

Fri Dec 08, 2017 12:14 am

Hi,

Would it be possible to a easy to follow set of instructions on how to solve this problem ? if I understand the thread correctly upgrading to pi4j VERSION 1.2. should fix the problem.
http://meanderingpi.wordpress.com/
11 Raspberry Pi's and counting....

User avatar
IgorGanapolsky
Posts: 33
Joined: Sun Apr 10, 2016 8:32 pm

Re: "Unable to determine hardware version"

Mon Dec 18, 2017 8:44 pm

skypi wrote:
Tue Jun 20, 2017 2:51 pm
I confirm I'm getting that same problem, everything at latest versions on jessie-lite pi zero w.

installed python wiringpi library with pip after install of latest wiringpi.

python wiringpi library fails

Unable to determine hardware version. I see: Hardware : BCM2835

the wiringpi gpio utility works OK
You need to downgrade your kernel (to 4.4) as described here: https://isahatipoglu.com/2015/09/29/how ... berry-pi2/

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 34 guests