Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 2712|Reply: 2

How to detect Orange model IN SOFTWARE?

[Copy link]

2

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2017-5-23 05:18:56 | Show all posts |Read mode
How can I detect which model of the Orange I'm using, in software?

6

Threads

32

Posts

626

Credits

Senior member

Rank: 4

Credits
626
Post time 2017-5-27 03:00:09 | Show all posts
Edited by bozden at 2017-5-27 03:07

I use Armbian. In any distro you may check /etc/*-release files...

I use it like this:
  1. [ $(grep -i 'orangepi' /etc/armbian-release) ]      && IS_ORANGEPI=1
  2. [ $(grep -i 'orangepizero' /etc/armbian-release) ]  && IS_ORANGEPIZERO=1
  3. [ $(grep -i 'orangepione' /etc/armbian-release) ]   && IS_ORANGEPIONE=1
Copy the Code

Note: There are no standards for these *-release files. So you may like to use if-then-else structures for distro's also.
OPi's: 3 Zero, 4 One, 1 Plus, 1 PC2, 1 cam
OPi on transit: 1 One, 1 2G-IOT, 1 2G IOT Touch LCD
3 RPi 3, 1 RPi 2, 3 RPi cam

2

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
 Author| Post time 2017-6-1 05:09:13 | Show all posts
Hi Bozden, and thanks for your reply. However, I'm not looking to detect the distro, I'm trying to detect the hardware. Raspberry Pi boards can be identified by checking the revision value at /proc/cpuinfo, but the Orange Pi devs - in their infinite wisdom - decided to leave that field at 0000 for every board. It's the kind of stupidity I've come to expect from them.
Am I to assume therefore that detecting the board version is literally impossible?
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2020-9-24 16:57 GMT+8 , Processed in 0.029425 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list