Category Archives: friendly arm

The NanoPi Neo

NeoBy now if you read this blog regularly you’ll have heard me rant on about the FriendlyArm boards – mainly because they are inexpensive and actually do work well as Pi alternatives – you’ll also note that I don’t blindly praise them – I’ve still not managed to get the T3 to run a 32gig SD of Android – and it’s an old Android to boot… but generally – I like their stuff.

SO it will come as no surprise then that I’m interested in the new NEO. And why would that be? Because it is SMALL and CHEAP. It has no WIFI or Bluetooth but it has hardwired Ethernet – just the job then for a NODE-RED central controller perhaps?  This is clearly aimed at a market not wanting a graphical interface as no hdmi out – but at the price – I’m happy with that.

So there’s a reason it is cheap – there are two versions, 256Mb RAM and 512MB RAM – I would not personally give time to the former – but the latter would, you would think, run Node-Red, SQLITE and Mosquito without issue… So the extra RAM puts the board at $9.99 plus whatever postage you get stuck with in your country…  cheap by any standard…

Neo in caseBut – looking at the docs – it seems that right now the main official option is for Ubuntu – I don’t know about you but when something says “An open source tiny PI” on the front of the box, you might expect it to be somewhat compatible with THE PI.. and that means Debian for me – and no doubt for most people familiar with the Pi.

The internal processor is an Allwinner H3 quad core like the Orange Pi so it is reasonable to assume that there will be alternative  software. It looks like there are 3 UARTS so one would hope for  two to be accessible.

There is one USB, a microSD slot, a micro USB OTG port and 2 USBs via headers.  The expansion port claims the usual, I2c, SPI etc but of course that will only happen if the software will support it.   Size is 40mm by 40mm – which makes it kind of smaller than a Pi Zero.

It occurred to me that setup could be a problem with this board as it has no SCREEN but read on – as it turns out it wasn’t an issue.

FriendlyArm sent a copy of Ubuntu which I’ve no interest in but thought I’d better try to ensure the board was ok. Sure enough it worked but the instructions on the box were the wrong way around. The blue LED flashes constantly – the green LED stays on – according to their info – it should be the other way around. Also to resize the SD they offer a Linux solution – assuming everyone has a Linux computer spare – or a simple SUDO fs_resize. The latter at first didn’t work until I realised that firstly the sudo command was not there and secondly I didn’t need it as I was root !!!

So all of that worked well – but I know for a fact my script won’t work on Ubuntu so I needed to get a working Debian

So – off I went to get ARMBIAN – and sure enough there is one version there for this particular board! Update 22/09/2016 – there have been some issues with the Armbian setup – read their site – but also see my script – it refers to a specific version of the legacy Jessie installation on the Armbian site (at the time of writing the latest). With the script this is running exceedingly well  - and yes, Node-Red can see serial ports 1, 2 and 3 (0 is in use for debugging).

I flashed a 16GB SD with the Armbian code using Win32DiskManager, plugged in the Ethernet and power. A dim green light came on. After a few seconds it brightened up.  And then maybe 30 seconds after that a blue light started flashing regularly along with the green – a sure sign SOMETHING was happening. On the Armbian website it warns that the first time boot could take minutes – so I left it.

Next stop Advanced IP scanner. Sure enough there was a board in my address range – sitting at 192.168.1.26 – with my favourite tool, WinSCP, I used the login credentials root and 1234 and – no file list – it HAD logged in but nothing.  I wrote off to the Armbian guys and apparently logging in with Putty (SSH) was needed to make an initial password change – and sure enough – it worked. I went back to WinSCP – and bingo.

The software asked me if I wanted to change screen resolution which was a bit odd as I was running in a terminal and the board has no screen!!!  Not really sure what to do with that – why would they enable the graphical environment when there’s no screen. So – off I went (as root) to get tightvncserver – and sure enough it installed but would not run – complaining about lack of fonts. No big deal – I un-installed it. i had no intention of running a graphical environment on a board with no screen connection anyway !! Ultimately I did return to this and did get the graphical interface running as I wanted to see if I could get WIFI working on Armbian – but for the life of me could not get WIFI drivers to install.

I REALLY think this board needs a heatsink which was not initially supplied.  I wonder why it is that Raspberry Pi manage to run without one and these H3 boards end up running hot enough to cook eggs – there ARE H3 boards which are faster than the Pi but I don’t think this is one of them.  However the fact that it is so SMALL and inexpensive it is worth a little effort. Having said that with the latest Armbian the chip is running at 51 degrees C without the heatsink so that’s not bad.

Next stop, with the board running Armbian I left it  running my installation script designed for a Raspberry Pi to install a host of utilities and Node-Red, Mosquitto and SQLITE.   In the process I updated my script to include the new node-red-dashboard which is the worthy successor to node-red-contrib-ui and added things like “cu” which allow you to use the terminal as a serial VT100 terminal.

Node-Red

Overall? Well, I’m really happy – I have two working UARTS in Node-Red (UART1 and 2) I can’t find the pins for UART3 but Node-Red is happy to talk to it. UART0 works well as a serial monitor.  I’ll need to load up some GPIO tools etc. but the bulk of my stuff just seems to work.

Update 29/09/2016 – FriendlyArm just contacted me –just to confirm – on the NEO – they never did bring out GPIOA13 and GPIOA14 to the connectors and hence UART3 though technically “there”, is not actually available.

For connections – see here -  http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO

Now as it turns out they bear no resemblance to other boards (unless I’m missing something) – so I started to experiment with the help of links from people in here.

THIS FELLOW - http://www.orzalabs.tech/2016/08/15/wiringpi-library-on-nanopi-m1/ got the M1 working with the Wiring Pi and so I installed that (H3 – same chip) – but could not get pin mappings to work.

I discovered that GPIO WRITE 24 ON turned on the little blue light on the board… and then purely by trial and error…

  • GPIO WRITE 10 ON  -  GPIOC3 – pin 24
  • GPIO WRITE 14 ON  -  GPIOC2 – pin 23
  • GPIO WRITE 12 ON  -  GPIOC0– pin 19
  • GPIO WRITE 13 ON  -  GPIOC1 – pin 21
  • GPIO WRITE  3 ON  -  GPIOA3 – pin 15
  • GPIO WRITE 6 ON  -  GPIOA2 – pin 13
  • GPIO WRITE 2 ON  -  GPIOA0 – pin 11
  • GPIO WRITE 28 ON  -  GPIOG6 – pin 8
  • GPIO WRITE 29 ON  -  GPIOG7 – pin 10
  • GPIO WRITE 24 ON  -  GPIOA6 – pin 12
  • GPIO WRITE 26 ON  -  GPIOG9 – pin 18
  • GPIOG8  (pin 16) could not turn on
  • GPIOG 11 (pin 7) – could not turn off
  • GPIOA1 (pin22) could not turn on

So – that’s a START!!! Just need I2c now!! The only issue for me here is that FriendlyArm ONLY provide and support UbuntuCore for the NEO which is of no interest to me.  I don’t know if this is down to a language problem or what but…ok, the ad does say Ubuntucore ready – but the name says “NanoPi” – and surely to qualify as a Pi you should be supporting the main operating system of the Pi – that being… Debian.

Interestingly their M1 product DOES support Debian – which is strange.  But here’s the problem – though WiringOp just happens to work for GPIO on both the M1 and the NEO, and compiled WiringOp programs can be made to work as user Pi,  as the company’s Matrix software which DOES give you access to I2c etc. seems to have some issues with any other than ROOT access - and FriendlyArm do not currently know how to get around that.

So the ONLY  the way forward here to make full use of these boards, is for someone brighter than me to work on WiringOP to make it completely compatible with the NEO and hopefully the M1 – at that point – we’re onto a real winner but it would be so much better – when someone brings out hardware products like this – which rely SO heavily on documentation and software – if they would get it right themselves!!!  The manual for the Matrix software is even now in Chinese only!

Update October, 2016: If you look at my later article which includes updates on the NEO, there is a DietPi out that works with this and my script and makes for a small, fast installation.

Conclusion: All down to postage… this is a marvelous little board you might describe as “cute”. With no 3.5mm jack I’ll have to get my hands dirty and solder that 0.1” edge connector on to get audio out. I’ll report on that later and it appears there’s a microphone input too on that connector along with an option for an IR input! Also look out for their new Lite version - I have one on the way - with WIFI instead of Ethernet - and it has 2 USBs. At the time of writing - the Armbian installation with a WIFI dongle on the Neo was not that good but the DietPi version works a treat.

Facebooktwittergoogle_pluspinterestlinkedin

FriendlyArm NanoPC T2

You may recall some time ago I did a review of the FriendlyArm NanoPi 2, a very nice little SBC indeed, here is the review, but of course time moves on and the Raspberry Pi 3, Banana Pi 3 and others have reached the shops, raising the bar and our expectations somewhat. So today a parcel turned up for me with not one but two FriendlyArm NanoPC T2 boards inside. I changed the date on this post as June 2016 I’ added info on the Debian installation and in September 2016 as I updated the blog in the light of new experience.

Here is the opening video:

And here is some information on the boards:

tmp2DD2

The image says most of it so I won’t repeat everything here – I will however point out that the Ethernet runs up to 1000Mbps unlike some – and for Android lovers – there is a microphone on-board.

Reset, power and function LEDS can be brought out to a front panel  - a nice feature. The boards turned up each with a microUSB lead and power supply – American (I’m in the UK and quite happy with EU plugs too as I have adaptors but very few USA adaptors).

I still had the LCD display handy that came with the last boards and so I simply plugged that into the new boards, applied power and bingo. I also had a wireless keyboard and mouse handy – plugged the USB adaptors for those  in  - worked immediately.

tmpF36

The reason I have two boards here is simple, one runs Debian 8, the other runs Android 5.1.1 – straight out of the box.  I realised I did not have an Ethernet lead handy as that was involved in another experiment – but the boards sport Bluetooth and WIFI as well as wired Ethernet and so I tried the WIFI  and sure enough Debian connected immediately to my hub without any issue. I thought Bluetooth might be an issue but then I noticed it was turned off by default – turned it on – no problem.

Not shown on the diagram above is a very substantial heatsink on the Samsung S5P54418 quad core Cortex-A9 1.4Ghz processor and yet after 15 minutes of operation it was a only barely luke-warm (unlike the Orange Pi which could boil eggs even with a heatsink attached though I understand that has improved thanks to Armbian). The power supply on the wall was warm but by no means excessively so.

Before going further I should say these boards are $59 each – and if you live in the UK there is a cost of $10 – so in total you are looking at £48 and that is IF they come by plain airmail and you don’t get stuck with duty and VAT. Variations on this would apply throughout Europe and I guess to the USA. That pits these boards against Raspberry Pi 3 at £32 all in from, say, RS components.  So let’s look at what they have, if anything that the Pi3 does not.  Well, faster Ethernet at least in principle, 8GB of eMMC (somewhat faster than SD), ability to use full size SD as well if that is of use to you, microphone on-board (and it works a treat), different LCD interfaces, 2 USB hosts on 0.1” connectors, On the downside they have fewer standard USB connectors than the Pi, But in the end the software and drivers are most likely to be an important factor.

Debian: Worked straight out of the box with a couple of negatives – nothing to do with the boards themselves – but Debian at least in this installation – all nicely set up with IceWeasel – lovely – except the BBC news griped about lack of Flash – and YouTube killed the browser – now WHY  - why let such a great start be ruined by such an experience – we may not LIKE Flash but it is going to be here for a while and YouTube – well, not that it is popular or anything?  Later I check out the Android version and see if it does any better (not really)…  up to now I’m still impressed with Debian but for those last two items – in 2016 you really don’t expect to have to load drivers to use YouTube… (and yes first thing I did  apt-get update and apt-get upgrade).

At this point I'd not yet started loading my software on there and it will be important that drivers are available for those ports. I looked here for drivers for, for example GPIO – not installed by default and nothing here that I could see   http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T2

Update 07/JUNE/2016:  By creating a user called PI and giving that user all the groups that a normal PI user would be in – I recreated my setup with Node-Red…and tested the serial ports.

Here are my nodes on creating a PI user

# if experimenting on another computer and you want to create user PI...... you'll need to add  them to groups
# sudo adduser pi
# sudo passwd pi   (then go to /home/pi directory
# sudo adduser pi adm
# sudo adduser pi dialout
# sudo adduser pi cdrom
# sudo adduser pi sudo
# sudo adduser pi audio
# sudo adduser pi video
# sudo adduser pi plugdev
# sudo adduser pi games
# sudo adduser pi users
# sudo adduser pi netdev
# sudo adduser pi input

 

I got this information from FriendlyArm - a list of the UARTs for the NanoPC-T2:

ttyAMA0 - Serial Debug port
ttyAMA1 - Bluetooth
ttyAMA2 - UART3
ttyAMA3 - UART4

Sure enough – ttyAMA2 and 3 work (shorting pins 11/12 for the former, 13/14 for the latter) – so that’s 2 serial ports. The parallel ports are something else. Unlike the Raspberry Pi which has easy to use PIGPIO and other libraries, FriendlyArm don’t have any – and so you’re relying on SYSFS – personally I haven’t a clue how to use that from Node-Red and further I don’t understand how to calculate which pins are available and working. So that’s an issue for me at least.

I also noted that the operating system versions were a little out of date for the PC2 and I contacted FriendlyArm – who came back very quickly with this link.

https://www.mediafire.com/folder/ilkcy37otd7il/NanoPi2Board

Of course I then fired back that this was for Pi2 not PC2 but it turns out they’re the same for this purpose!!! Even now in September, the eMMC files are not on that link above and I was told they'd have them soon - back in June.

Android on FriendlyArm NanoPC T2Android:  I set up the WIFI for Android without issue, set up Bluetooth without issue, went to the Playstore and the device rebooted! At this point the Playstore worked – I put in my credentials and off I went to install YouTube.

So normally when you download an APP in Android – it says PLAY when ready – in this case I ended up back at the desktop and with no YouTube. I went back into the Playstore. YouTube had not installed – I tried again – I could see it load up… installing…. and this time I had the option to OPEN.

Sure enough – YouTube opened up showing some videos – I picked one at random. The video worked perfectly at what seemed like full frame rate -  but no sound.  My Bluetooth headphones had beeped when Android started up so it knew about them (Logitech) but nothing coming out of YouTube audio.

According to the settings both media audio and contact sharing (not sure the relevance of the latter) were attached to the headphones. A quick check of settings – Media volume OK, Alarm volume OK, Notification volume OK, but no sound.

YouTube even had an icon saying it was casting to the Logitech H800 headphones at 60% volume – but I could not hear anything – I check the volume on the headset itself… nothing wrong there. I went to settings – media – unticked – reticked – the headphones beeped – but still no audio. I opened a browser and went to BBC news and played a video – again – full frame rate – lovely – but no audio.

At this point I gave up with Bluetooth and plugged speakers into the board – that worked – so at this point I have no idea why the Bluetooth would not work and wonder if that had anything to do with the reboot. I installed the BBC Media Player and iPlayer and checked out a TV show… “Putin’s Riches” – watched the whole thing without a hitch – and a good show too – the sound was fine – the video was perfectly fine. I put the video onto the big screen…. perfect but the resolution on the big screen seemed low (I’ve seen this with other SBCs running Android) – I could not see any easy way to alter the resolution.

So that’s where I am up to now. I have scoured the web (not too deeply) for proper drivers for GPIO for Debian for this device and not seen anything yet – it is ok to offer all sorts of facilities but this needs support.  In the months between writing this article I've discovered more about using GPIO with, say Node-Red - but not from FriendlyArm who seem to have an attidude of "here is our C code - for root users only - end of story".

There is a comprehensive schematic here http://wiki.friendlyarm.com/wiki/images/0/00/NanoPC-T2_1601B_Schematic.pdf and I’m assuming that RTC battery is a 3v job (it does not say).

Update 25/MAR/2016: So here’s the thing – we often wonder why software appears untested – surely YouTube and Playstore would be among the first things you test. Well, it appears that the Chinese authorities deny access to both of these channels to companies operating in mainland China - which presumably makes it more difficult to test!

Bluetooth – apparently the headphone drivers are not available – and as for ports… some feedback from the company itself:

They don't have existing code samples for the T2 however there are quite a few code samples for the NanoPi 2. The P2 and T2 are very similar. And P2's code samples can be a decent reference for the T2. Each of the following item is the wiki site for a Matrix Starter Kit item. After you open a link head off to "Connect to NanoPi 2" and you may well find how to use GPIO pins.

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_Ball_Rolling_Switch#Connect_to_NanoPi_2

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_Button#Connect_to_NanoPi_2

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_Compact_Kit#Connect_to_NanoPi_2

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_IR_Receiver#Connect_to_NanoPi_2

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_LED#Connect_to_NanoPi_2

http://wiki.friendlyarm.com/wiki/index.php/Matrix_-_Relay#Connect_to_NanoPi_2

There might be some I miss. You can check this link:

http://wiki.friendlyarm.com/wiki/index.php/Main_Page#Matrix

Some items are ready some are not. You can go to a link and check whether it has a "Connect to NanoPi 2" which shows code samples in Debian.

Update September 2016:  So now I've come back to this board with a view to using it an Android media centre. Forget it - too slow. The T3 does a half-decent job and if you look at my review of the NanoPC T3 you'll see I've managed to expand Android on both the T3 and the T2 for 32GB and upwards using SD. But with typical streaming software, the T2 sound lags way behind and the experience is sluggish. If Android media centre software is your thing - I suggest going for the T3 (I'd probably recommend Raspberry Pi 3 but I've yet to see a complete Android installation on that machine without catches like no Playstore or buggy video etc).   On the other hand I have a T3 installation with Kodi and other software that is working just fine.

Oh and while I'm on - Debian - could I HELL figure out how to change the keyboard to British - I had the usual @ when you want " and vice-versa - no nice graphical keyboard icon in Debian - well not one that I could find - how crap is that!!!

Anyway, I stumbled on this video:

Easier than it looks. Anyway, where he refers to US/RU -   just put gb instead. Save, reboot - Bob's your uncle.

 

Facebooktwittergoogle_pluspinterestlinkedin