This is a complete and much shorter re-write of an earlier blog entry – a lot has happened in recent months and so what’s the point of keeping stuff online that is no longer useful, right?
Now, why would we want to revisit the Orange Pi PC?
Well, because having falling in love with Raspberry Pi 2 as an IOT tool I could buy 3 Orange Pi PCs for the price of the Raspberry Pi 2 if only it worked.
I should say right at the start – I’m not interested in a pretty interface for another media centre – I’m after a low-cost box that I can talk to remotely. It must run the following:
- Apache of similar with PHP
- Node and Node-Red
- SCP remote access
Why that combination? Well, first things first – I’d love to run NGINX but I’ve not had a lot of luck there with my combination of software and Apache is ok. Secondly – I control stuff around the house and need Node-Red as the central controller – it’s also a great thing to have generally. Thirdly, Mosquitto – that’s how I control most of my stuff – and I need the websockets version. Finally SQL-Lite – having read some horror stories about the amount of writing that MYSQL does and bearing in mind we’re using SD memory here with limited writes, I’ve settled on SQL-Lite – and that needs PHPLiteAdmin to administer it hence the need for Apache etc. SCP for remote access to get to files without having to hook a monitor up – and Webmin – well I just like Webmin for updating stuff.
I have all of this running on the Pi 2 – but of course that’s £30 a pop. Investigating the Orange Pi was a means to save costs. Too good to be true? Well, if you read the original article (now scrapped) you’ll know I had LOTS of issues and eventually gave up. All of that has changed. Currently I have everything running except for serial ports – and I’m sure that is just a minor issue – and I’ve not yet tested sound…. part of that is because one particular Node-Red node – IVONA refuses to install on the Orange Pi – again – I think that is likely solvable.
Performance: So how does this 2-pints-of-beer computer stack up against the mighty Raspberry Pi2 ?
With both the Orange Pi and the Raspberry Pi running winSCP and Kitty terminals… I went for sysbench…
apt-get install sysbench
and ran this test
sysbench –test=cpu –cpu-max-prime=20000 run
Both systems have similar software on them.
The guys must’ve been testing this on a desktop as his test took 23 seconds (it did get a little warm, I think a little heat-sink on that processor might be a good idea)!!!!
After a couple of minutes I was just about dying of boredom when…..
I really had expected the RPi to come back first. Minutes later and I was checking to see if the RPi had crashed – but no, a quick change of directory in WinSCP showed it was still running.. nothing on the terminal however… as I was coming back from making coffee I noted the Raspberry Pi 2 had returned – with – wait for it 1,171 seconds!!
So – a working system for my control stuff, complete with a full operating system with various graphical tools – and all for under £12 inc shipping ??
February 2016: I took the latest Debian Jessie and scripts and after bringing everything as up to date as possible, I began my umpteenth attempt to get a working Orange Pi. This time I got reliable operation of Node-Red, Apache, Webmin and MQTT.
The ports and WiringPi: Ports at first seemed elusive until I came across this.. http://l0l.org.uk/2013/09/raspberry-pi-running-node-red-wiring-pi-to-pwm-control-a-light/
I installed WiringPi and it worked – at least for simple IO – but the interface for Node simply would not have it. However, as the command line worked – that’s not a big deal.
- gpio mode 14 out
- gpio write 14 1
- gpio write 14 0
Armed with those command line commands – which worked a treat – I only tried a few IO lines…. I used the EXEC function in Node-Red and now I have IO control – which is fine for at least the simpler operations – controlling relays etc.
So here is the information for getting Debian – follow precisely…
Following the instructions give you a working Debian on the Orange Pi, complete with WIFI and other add-ins – but it uses NGIX as against Apache. So in the script I remove this which gives me a basic working system and the rest is a modified and improved version of the original Raspberry Pi script as some stuff simply did not apply to the Orange Pi.
Here for anyone interested is the script.
To be checked. Audio – when I or someone else finds out why npm install node-red-contrib-ivona won’t work – I’ll test the sound.
Serial: – there are 3 UARTs S0, S2 and S3 referred to in /DEV – The Node-Red SERIAL node sees them – but then refused initially to open them by default so there is a permission change in the script to make the ports accessible.
Heat: I do recommend a heat sink on the Orange Pi H3 chip – mine is is fitted and even then it gets too hot to touch for any length of time.
Anyway, recently I found this.. http://www.orangepi.cn/orangepibbsen/forum.php?mod=viewthread&tid=785 and I’ve run that and rebooted and – well, I can’t tell any difference but it’s probably worth running anyway.
Graphics etc: I have turned off the X interface near the end of the script thanks to input from others and I’m using Samsung Evo microSDs now as they are relatively cheap and VERY fast compared to some – no – really a lot faster. 16GB should last a while.
And then the shocker, I updated the WIFI info as per Pi-Zero blog a couple of entries back – disconnected the Ethernet lead, plugged in a standard WIFI dongle, rebooted and… nothing.
Plugged the Ethernet back in and took a look with IFCONFIG – turns out that for some reason WLAN0 was perfectly intact but called WLAN2 – I now have a running Orange Pi with WIFI! But the WIFI setup is not covered in the script as this is all being done with an Ethernet cable.
Just need to sort out that IVONA node which won’t work – and we’ve a winner by the look of it. Help appreciated with the latter.
May 2016: Bear in mind that since this article was written we now have the Raspberry Pi 3 which probably competes head on with this model on speed. Add to that MUCH better support on the Raspberry Pi AND the fact that they now have a backup program built-in as standard AND PIGPIO – ask yourself if the saving in initial cost is worth it.