User avatar
ds18s20
Posts: 83
Joined: Fri Dec 23, 2011 5:44 am
Location: San Francisco

Identify hardware version from within Raspbian

Wed May 27, 2015 9:32 pm

HI everyone,

Is there a way to Identify hardware version from within Raspbian?

By hardware version I do NOT mean the firmware level or the kernel;

I mean the bare metal which could be "+" model or the "2" model of the PCB

For example right now I could do:
  • pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version
    May 23 2015 16:42:55
    Copyright (c) 2012 Broadcom
    version 29d1114a122b6ef70bdfb7d4db3dd28bdfc38ac2 (clean) (release)
But that doesn't tell me which bare metal PCB this is running on?

Thank you
~B

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Identify hardware version from within Raspbian

Wed May 27, 2015 9:36 pm

http://elinux.org/RPi_HardwareHistory
First thing on the page.
There are 10 types of people: those who understand binary and those who don't.

User avatar
ds18s20
Posts: 83
Joined: Fri Dec 23, 2011 5:44 am
Location: San Francisco

Re: Identify hardware version from within Raspbian

Wed May 27, 2015 9:46 pm

Thank you @kusti8 !

Works and the story checks out; my printed revision is corresponding to the actual PCB.

Code: Select all

Hardware        : BCM2709
Revision        : a21041

User avatar
AndyD
Posts: 2337
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia

Re: Identify hardware version from within Raspbian

Wed May 27, 2015 9:52 pm

kusti8 wrote:http://elinux.org/RPi_HardwareHistory
First thing on the page.
There are a couple of revisions missing from that page. I wrote some code when the Pi 2 was released. The Readme has some tables of revisions that I believe are up to date.

kaspbar
Posts: 20
Joined: Tue Nov 03, 2015 5:40 pm

Re: Identify hardware version from within Raspbian

Fri Nov 17, 2017 7:55 am

sudo apt-get update
sudo apt-get install lshw
sudo lshw # lists all kinds of info for your hardware

User avatar
DougieLawson
Posts: 42288
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Identify hardware version from within Raspbian

Fri Nov 17, 2017 8:03 am

cat /proc/cpuinfo
cat /sys/firmware/devicetree/base/model
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
jahboater
Posts: 8355
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Identify hardware version from within Raspbian

Fri Nov 17, 2017 8:06 am

See

/proc/device-tree/model

This file contains a NUL terminated text string like this:
Raspberry Pi 3 Model B Rev 1.2
Ooops, sorry Dougie for the cross post. Its the same as the /sys file.

User avatar
bensimmo
Posts: 5746
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Identify hardware version from within Raspbian

Fri Nov 17, 2017 9:36 am

pinout
Should also work, you can also use it remotely with pigpio/gpiozero pin factories.

Return to “Raspberry Pi OS”