Roseapple Pi and Wiring Nirvana

Lemon PiYes, you’ve heard it all now, we have Raspberry Pi, Orange Pi, Nano Pi and... Roseapple  Pi.

A long time ago when I first wrote about this board, there was a price tag of $35 (I believe it was called the Lemon Pi - same board, different marketing - hence the image on the right) - well, it is £44 now from AliEspress - who are not known for being expensive.... so is it any better than the Raspberry Pi for example?

Well, this board stands out a mile – it has three USB ports just like the Raspberry Pi – BUT – one of them is USB3  - which could be a game-changer when it comes to using external memory or hard drives!!!

The board ticks boxes for me  - it has both CPU and GPU (Imagination Technologies PowerVR SGX544),  3.5mm audio out (and that also supports TV out for very old people) , microSD  DC5v in on a micro-usb, Ethernet, 3 USBs and a standard HDMI video output – so no accessories needed here. It also has the 40 pin RPI compatible pinout.

The quad-core Cortex A9 Arm processor is supported by 2GB  and according to the spec there’s the possibility of up to 7 UARTS!!!

For video they claim they can handle up to 4K*2K video (H.264). There is supposedly an IR Receiver (but I could not find it) and finally the board is 85mm by 56mm.


This board also has Android 5.1.1 available but to be honest I’m sitting back on Android and waiting for it to be properly supported i.e.  Android 7 as you might find on the expensive (except last week when it was on sale for £35) KiKey from LeMaker - which actually DOES handle Android 7.

I decided after my success with other boards to go with Armbian – So I put – it on an SD, plugged it in, plugged in the HDMI and…  it all worked – I could see with a port scanner that it was  called “RoseapplePi” and the display came up – winSCP was just fine.

I installed my own script without a single hitch!! which gives me Node-Red, Apache, SQLite and Webmin along with Mosquitto – all worked well and significantly the speech synth software IVONA which gave me so much trouble  elsewhere – installed without issue.

Using the same criteria for testing as I did with the Orange Pi and Raspberry Pi, here are the times taken to complete the system tests.

  • Orange Pi 488 seconds
  • RoseApple Pi 544 seconds
  • Raspberry Pi 2 1,171 seconds

So armed with Node-Red – I checked the /DEV directory and could only find one serial port – ttlS2.  I tried to access that with the serial node –and the usual permissions issue came up – so learning from my experiments with the Orange file – I simply gave /dev/ttlS2 full read/write/execute permission.  I did a test with the output connected to the input (this is the 4 way connector near the twin USB sockets – pins 1 and 2)  and did a little test- VOILA – serial IO - but that is a lot less than I'd expected (still - Raspberry Pi only has one serial port).

That out of the way I tackled GPIO. For the Orange Pi I’d managed to get a command line utility working called GPIO – no such utility here until I installed this -  Wiring Pi for the Roseapple Pi.

That was easy and includes the GPIO utility – it was easy enough to find the pin definitions for the Roseapple Pi. Could I go further I wondered? I installed Wiring Pi in Node-Red and rebooted.

I installed Wiring Pi for Node-Red -

I changed the Node-Red (/home/linaro/.node-red/settings.js) settings file..

  functionGlobalContext: {
wpi: require('wiring-pi')

// octalbonescript:require('octalbonescript'),
// jfive:require("johnny-five"),
// j5board:require("johnny-five").Board({repl:false})

and restarted Node-Red… Following instructions here -  (near the bottom – Wiring Pi) I figured I should now be able to get a blink example going.. but no – the simple blink example produced…

Error: setup: arguments['mode'] => ("undefined" in ("wpi", "gpio", "sys", "phys")) === false

Not only THAT but my serial port had stopped working – was this down to a reboot or had Wiring Pi reset it’s permission? I gave it write permissions and restarted Node-Red. I tried the command line GPIO and…

linaro@localhost:/dev$ gpio mode 14 output
Unable to determine hardware version. I see: Hardware   : gs705a
- expecting BCM2708 or BCM2709. Please report this to
linaro@localhost:/dev$ gpio mode 14 out
Unable to determine hardware version. I see: Hardware   : gs705a
- expecting BCM2708 or BCM2709. Please report this to

So – I uninstalled the wiring Pi mods (npm remove wiring-pi) and rebooted – NOW the GPIO command line utility worked – and I even tested it – picking a number at random..

gpio mode 14 output

gpio write 14 1

gpio write 14 0

Sure enough – a LED on a pin half way up the connector – GPIOD14 – toggled on and off.

Referring back to my instructions in the Orange Pi blog item – using the EXEC function and”gpio”


The above works a treat – but clearly, that is only good for slow input and output…. would be better by far if wiring-pi would work natively.

Anyway, I figured it all out the hard way - for simple output…… numbers to pins:

  • Pin 40 GPIO21 gpio nothing default off
  • Pin 38 GPIO20  gpio nothing default off
  • Pin 36 GPIO16  gpio write 27 on
  • Pin 32 GPIO12  gpio write 26 on
  • Pin 26 GPIO7  gpio write 10 on
  • Pin 24 GPIO8  gpio write 11 on
  • Pin 22 GPIO25  gpio write 6 on
  • Pin 18 GPIO24  gpio write 5 on
  • Pin 16 GPIO23 gpio write 4 on
  • Pin 12 GPIO18  nothing default off
  • Pin 10 GPIO15  gpio write 16 on
  • Pin 8 GPIO14 gpio write 15 on
  • Pin 3 GPIO2  gpio write 8 on
  • Pin 5 GPIO3  gpio write 9 on
  • Pin 7 GPIO4  nothing default off
  • Pin 11 GPIO17  nothing default off
  • Pin 13 GPIO27  gpio write 2 on
  • Pin 15 GPIO22  nothing default off
  • Pin 19 GPIO10  gpio write 12 on
  • Pin 21 GPIO9  gpio write 13 on
  • Pin 23 GPIO11  gpio write 14 on
  • Pin 29 GPIO5  gpio write 21 on
  • Pin 31 GPIO6  gpio write 22 on
  • Pin 33 GPIO33  gpio write 23 on
  • Pin 35 GPIO19 nothing default off
  • Pin 37 GPIO26  gpio write 25 on

So all of those pins work using the command line “gpio” – and hence via Node-Red where I tested them – but there has to be a better way.

And how did I check this? Node-Red of course


And the function?

global.set("parp",global.get("parp") ||0);
if (msg.payload=="on")
if (global.get("parp")<40) global.set("parp",global.get("parp")+1); else global.set("parp",0);
msg.payload=global.get("parp") + " on";

if (msg.payload=="off")
msg.payload=global.get("parp") + " off";
if (global.get("parp")>0) global.set("parp",global.get("parp")-1); else global.set("parp",40);

node.status({text: msg.payload});
return msg;

But the REAL magic is here

Here’s where we come to the real point of this update – apart from the pin definitions above - take a look at my similarly updated FriendlyArm M1 article which not only has the pins for THAT board but also now has a solution for general pin control – for non-root users.. – this is what I’ve been waiting for.

Therein you will see a simple C program, easily compiled on the board – honestly – no knowledge needed  (one command-line instruction) and more importantly – the 2 lines necessary to AT LAST make this stuff work for an ordinary user – which means integration into Node-Red.

This now makes at the least, the Roseapple, LeMaker, M1 and NEO usable with Node-Red right down to port level. It has taken me a long time to get this far.

Whether they are right for you compared to the very cheap Orange Pi or the very well supported Raspberry Pi - well that's another matter.


19 thoughts on “Roseapple Pi and Wiring Nirvana

    1. HEY that's not a bad idea - Pete's SBC Museum. I'm sitting here working on the Roseapple - got Debian running, got the serial port running in Node-Red, just about to go and get a GPIO library - looks like pretty crude command line programming of GPIO for now - but IVONA worked first time - so I have speech as well - this one is looking good - and I've written off and asked them what the European/American pricing is - that could make or break the board.

        1. Do you know Vladimir - I think you're a mind-reader - I was just responding to another comment and for a second it flashed through my head to have a Jeremy Clarkson style leaderboard with the best SBC - and then I read your comment!!!!

          Problem is.... its difficult - reliability - compatibility, power.... right now the ONLY board that provides proper access for Node-Red for ports etc is Raspberry Pi. but my favourite speech system - IVONA - works a TREAT on the RoseApple - but when I tried it on some of the other boards - it fell over at the point where it was setting up character sets.. I'm sure that's something trivial but I can't pinpoint it. But having gotten this board running - the next interesting thing will be to see if the setup I've done works with LeMaker Pro as the hardware is very similar.

          1. Pete, I think about museum two your SBCs ago. 🙂
            Btw, if you need technical work for it to be done like installing special wiki or something, gathering typing general data for boards etc, i will help you with pleasure.

        2. If you have in mind how wrong sysbench is (does only prime numbers, tests no memory throughput but compiler switches) you can start with these two links that give you a rough comparison of different SoC CPU performance and hopefully also outlines what's wrong with the whole approach:



          All modern SoC are prone to overheating so real world CPU performance depends on board design (heat dissipation through PCB design and adding/allowing heatsinks) if it's about constant full CPU load. And then there are a few things more to consider: A NAS use case for example is not that much related to CPU horsepower, there IO bandwidth and network throughput matter way more (and so even the slowest SoC out there will easily outperform such featureless SoCs as used on the various RPi that all have just one single USB 2.0 OTG connection to the outside)

          Same with video decoding capabilities (try h.265 on RPi 3 or on a cheap Orange Pi One that is able to decode that stuff HW accelerated without even getting hot) or GPU performance. It depends always on the use case and a table listing moronically/wrongly used CPU benchmarks would just be misleading 🙂

  1. wow, another "following" PI :P...

    had been following Chinese "PI" started with Cubie and stopped at PCduinno. there ware so many releases with poor support that sealed by their NDA BS.

    my love backed to "Real" PI, good forum, and their commitment including many create images for "Real" PI.

    having PI B, and PI 2 😀 including beagleboard.

    1. I never did manage to get a Banana Pi to play with - but now I have Roseapple and Lemaker which apparently are near enough they can probably run the same code... still sitting here working - the Debian for Roseapple looks good - got the serial port running with the same solution as last time - give all permissions to /dev/ttyS2 - can't find the other ttysX - though there should be more of them.... and about to give a GPIO program a shot...

      Sadly NONE of these boards seem to get it - Node-Red has a big future and you have to be able to support the GPIO inc i2c, SPI etc in there... the only one that comes close is Raspberry Pi - though with 2GB RAM this new board may have a future in my office.

      1. bought fire release banana PI 😀
        the support mostly came for us (guinea pig) that work hard to make "works"

        I will stick with "Real" PI with easy to work on IO, and many people supports by creating images and answering question. and kudos to PI foundation too..

        honestly, I am already tired to buy "chinese" pi that would ended up unused :P.
        "real" PI 2 is fast!! :D, you will never regret having PI 2 and known GPIO/I2C/SPI :P..

        any how, thanks for posting new "chinese" PI on your blog,

        hunting another PI 2 and more cheap androidtablet/phone :). regretted not bought two PI 2 when Free shipping was available. shipping is killing the good price:(.

  2. I'm looking for ideas guys...

    AMIXER - so I have sound running on this new board - but the volume control won't work - I use AMIXER - and it is just utterly ignoring me.. I've a vague recollection that someone told me it was the tools in the Debian graphical interface interfering with AMIXER... I wiped them out and LO - Amixer started to work - but unusually I didn't document anything.

    Any experience of this - so sound works - out of the 3.5mm jack - but the usual volume control trick - run an EXE node to execute....

    amixer cset numid=1 --

    With a percentage parameter after it like 100% - is having ZILCH effect on volume and yes I've tried SUDO - anyone any idea what the solution is/was?

  3. No Wifi? No BT? Why bother? USB3 or saving a couple of ££ (which is basically the VAT you are not paying). Not worth the aggravation for the lack of support, and this product being dropped like a hot-potato when the next incarnation comes out.

    1. Well, that's fair enough - in my case I'm not interested in WIFI or Bluetooth for these boards, I'm interested in more RAM, faster IO.. but each to their own. It really is important that the IO is fully supported and a standard like the Raspberry Pi is as good as any - without competition however, RPI will not improve.

      1. Have a look at the Cubieboard if you need I/O. A bit on the pricey side (about $100), but the latest cubieboard 5 includes things like 8-core processsor, SATA, 2gb of ram, 8gb of on-board storage, plus micro-sd, gigabit ethernet, wifi, bluetooth, LiPO battery backup.

      2. Pete, can you write you vision about SBC for home brains? RAM, performnce, interfaces etc.
        IMHO it will be very interesting for your readers. And for you if you have no such vision yet. 🙂

  4. Perhaps Wiring Pi killed your serial by remapping those pins to GPIO. Maybe you could try uninstalling Wiring Pi to see if the serial port returns.

  5. Hello, I am new to this blog.
    Recently I am trying to manage my OPi One to work with Node-Red.
    Today I finally set it up and was able to start Node-red.

    After that I tried several hours to manage GPIOs ,but nothing worked.

    Is there a short version how to manage gpios to get them working.

    So today I installed nodejs 4.xx, npm@2.x.
    After that I installed wiringPi from github, then I added to node-red -> npm wiring-Pi and modified settings.js , after that I tried npm -> wiring-op and still nothing.
    I my experimentations today I started 3 times with cleans jessie install, every time trying different git sources and different tutorials.
    At one point I get same error as in this article ''Error: setup: arguments['mode'] => ("undefined" in ("wpi", "gpio", "sys", "phys")) === false'' , removing and rebooting did not solve it for me.

    BTW I managed gpio readall to show gpios, and even example blink file in C with wiringPi worked.

    Can anyone help me with correct sequence and what exact git sources I should use?
    p.s. at the moment I find a lot of badly documented sources in github, but whitch one will work?

    1. I think you're asking in entirely the wrong place - Wiring Pi works on the Raspberry Pi - WiringOp works on H3 machines in general but they are all different and most if not all are only partly supported. If you look at the blog entries where I have struggled through, using GPIO mode to set pins to outputs and turning them on and off until I found out which pin ACTUALLY maps to, say GPIO 7 for a given board, you'll see how I did it - however I think if you ask TKAISER over at Armbian he might be able to point you in the right direction. In Node-Red I've used the EXEC fuction to turn bits on and off - but that doesn't shortcut having to find out which bits on your board apply to which bits on the Pi 1- and as for cleverer functions such as I2c etc unless the WiringOP has been forked for that specific board, don't get your hopes up.

  6. When I was trying just with wiringOP, then

    If I add wiringOP then after startup node-red shows error with settings.js ->
    wpi: require('wiring-pi')

    , if I changed it to wpi: require('wiring-op'), then different error occurs.

Leave a Reply

Your email address will not be published. Required fields are marked *