Archive

Posts Tagged ‘armbian’

Rock960 Board is a 96Boards Compliant Board Powered by Rockchip RK3399 SoC

September 29th, 2017 23 comments

So it looks like Rockchip is soon going to join 96Boards family with Rock960 board. Developed by a Guangzhou based startup called Varms, the board will be powered by Rockchip RK3399 hexa-core SoC, and comply with 96Boards CE specifications.

Rock960 board preliminary specifications:

  • SoC – Rochchip RK3399 hexa-core big.LITTLE processor with two ARM Cortex A72 cores up to 1.8/2.0 GHz, four Cortex A53 cores @ 1.4 GHz, and  ARM Mali-T860 MP4 GPU with OpenGL ES 1.1 to 3.2 support, OpenVG1.1, OpenCL 1.2 and DX 11 support
  • System Memory – 2 or 4GB RAM
  • Storage – 16 or 32GB eMMC flash + micro SD card
  • Video Output – 1x HDMI 2.0 up to [email protected] Hz with CEC and HDCP
  • Connectivity – WiFi 802.11ac 2×2 MIMO up to 867 Mbps, and Bluetooth 4.1 LE (AP6356S module) with two on-board antennas, two u.FL antenna connectors
  • USB – 1x USB 2.0 host port, 1x USB 3.0 port, 1x USB 3.0 type C port with DP 1.2 support
  • Expansion
    • 1x 40 pin low speed expansion connector – UART, SPI, I2C, GPIO, I2S
    • 1x 60 pin high speed expansion connector – MIPI DSI, USB, MIPI CSI, HSIC, SDIO
    • 1x M.2 key M PCIe connector with support for up to 4-lane PCIe 2.1 (max bandwidth: 2.0 GB)
  • Misc – Power & u-boot buttons. 6 LEDS (4x user, 1x Wifi, 1x Bluetooth)
  • Power Supply – 8 to 18V DC input (12V typical) as per 96Boards CE specs; Battery header
  • Dimensions – 85 x 54 mm (96Boards CE form factor)

The board will support Android (AOSP), Ubuntu, the Yocto Project, and Armbian. The website shows the word “official” for the first three, and lists Canonical as partner. The company will also offer various at least one expansion board, and starter kit based on Seeed Studio Grove system with a mezzanine board with plenty of Grove headers, an LCD display, and various Grove modules like buzzers, relays, buttons, LEDs, temperature sensors, and so on.

Rock960 is both simpler and smaller than other RK3399 boards such as Firefly-RK3399 and VS-RK3399, so I’d expect it to be cheaper, hopefully below $100, once it becomes available. The website is still very much under construction, but you may find few more details there.

Thanks to mininodes for the tip.

uCAN CAN Ethernet Converter and Logger is Based on Orange Pi Zero Board

September 19th, 2017 2 comments

The CAN bus is a serial communication protocol used in automotive and automation applications. The guys at ucandevices.pl have designed a solution around Orange Pi Zero board that allows you to log CAN bus data or act as a bridge between the CAN bus and Ethernet or WiFi. They call it “CAN Ethernet converter, CAN Logger, Linux CAN computer”. Sorry, no shorter name that I could find…

Click to Enlarge

uCAN (pronounced micro CAN) CAN Bus board specifications:

  • Main Board – Orange Pi Zero with Allwinner H2+ quad core cortex-A7 processor, 256 MB RAM
  • Network Connectivity – 10/100M Ethernet, 802.11 b/g/n WiFi
  • Can Bus – 2-pin terminal block; support for CAN version 2.0 support
  • Power Supply – DC 5V/2A via micro USB port
  • Dimension – 50 x 50 x 20 mm

The device comes pre-load with Debian distribution provided by Armbian plus various CAN tools. The getting started video below shows uCANTools web interface programmed with Node.js and running by default on the board, and explains how to use sockets instead to access the CAN data.


You can find the source code for uCANTools on Github, and the other pre-installed tools are based on can-utils package available from Debian repository.

uCAN CAN Ethernet converter is normally sold on Tindie for $50 plus shipping, but right as I was about to finish this article the price switched to $150 with the message “This seller is on vacation. Please return after Oct. 14, 2017 to purchase this awesome product!”. Oh well…

Hardkernel ODROID-HC1 Home Cloud One Stackable NAS is now available for $49

August 21st, 2017 14 comments

Hardkernel has just launched their ODROID-HC1 stackable NAS system based on a cost-down version of ODROID-XU4 board powered by Samsung Exynos 5422 octa-core Cortex-A15/A7 processor, which as previously expect, you can purchase for $49 on Hardkernel website, or distributors like Ameridroid.

We now have the complete specifications for ODROID-HC1 (Home Cloud One) platform:

  • SoC – Samsung Exynos 5422 octa-core processor with 4x ARM Cortex-A15 @ 2.0 GHz, 4x ARM Cortex-A7 @ 1.4GHz, and Mali-T628 MP6 GPU supporting OpenGL ES 3.0 / 2.0 / 1.1 and OpenCL 1.1 Full profile
  • System Memory – 2GB LPDDR3 RAM PoP @ 750 MHz
  • Storage
    • UHS-1 micro SD slot up to 128GB
    • SATA interface via JMicron JMS578 USB 3.0 to SATA bridge chipset capable of achieving ~300 MB/s transfer rates
    • The case supports 2.5″ drives between 7mm and 15mm thick
  • Network Connectivity – 10/100/1000Mbps Ethernet (via USB 3.0)
  • USB – 1x USB 2.0 port
  • Debugging – Serial console header
  • Misc – Power, status, and SATA LEDs;
  • Power Supply
    • 5V via 5.5/2.1mm power barrel (5V/4A power supply recommended)
    • 12V unpopulated header  (currently unused)
    • Backup header for RTC battery
  • Dimensions – 147 x85 x 29 mm (Aluminum case also serving as heatsink)
  • weight – 229 grams

The company provides Ubuntu 16.04.2 with Linux 4.9, and OpenCL support for the board, the same image as ODROID-XU4, but there are also community supported Linux distributions including Debian, DietPi, Arch Liux ARM, OMV, Armbian, and others, which can all be found in the Wiki.

SAMBA File Copy To/From HC1 – Click to Enlarge

Based on Hardkernel’s own tests, you should be able to max out the Gigabit Ethernet bandwidth while transferring a files over SAMBA in either directions. tkaiser, an active member of Armbian, also got a sample, and reported that heat dissipation worked well, and that overall Hardkernel had a done a very good job.

While power consumption of the system is usually 5 to 10 Watts, it may jump to 20 Watts under heavy load with USB devices attached, so a 5V/4A power supply is recommended with the SATA drive only, and 5V/6A if you are also going to connect power hungry devices to the USB 2.0 port. The company plans to manufacture ODROID-HC1 for at least three years (until mid 2020), but expects to continue production long after, as long as parts are available.

$15 Orange Pi Zero Plus Board Released with Allwinner H5 SoC, Gigabit Ethernet, WiFi, and SPI flash

August 12th, 2017 32 comments

We had Orange Pi Zero, followed by Orange Pi Zero Plus 2, then Orange Pi Zero Plus 2 H5, but now there’s another “Zero” model that’s called Orange Pi Zero Plus, which like Orange Pi Zero Plus 2 H5 board is based on Allwinner H5 processor, but adds a faster Gigabit Ethernet port, and offers a fairly different features set compared to the first Orange Pi H5 board, albeit in the same form factor.

Click to Enlarge

Orange Pi Zero Plus specifications with highlights in bold and stricken-through showing difference with Orange Pi Plus 2 H5 model:

  • SoC – Allwinner H5 quad core Cortex A53 processor with hexa core Mali-450MP4 GPU
  • System Memory – 512 MB DDR3
  • Storage – 8GB eMMC flash, micro SD card slot + 2MB SPI flash
  • Video Output – HDMI ; AV port via 13-pin header
  • Connectivity – Gigabit Ethernet, 802.11 b/g/n WiFi (Realtek RTL8189FTV) with u.FL antenna connector and external antenna. No Bluetooth
  • USB – 1x micro USB OTG port, 1x USB 2.0 host port
  • Camera – MIPI CSI port
  • Expansion headers
    • Unpopulated 26-pin “Raspberry Pi B+” header
    • 13-pin header with headphone, 2x USB 2.0, TV out, microphone and IR receiver signals
  • Debugging – 3-pin serial console header
  • Misc – 2x LEDs for power and status
  • Power Supply – 5V via micro USB port
  • Dimensions – 48 x 45 mm
  • Weight – 26 grams

The eMMC flash is gone, but has been replaced with an SPI flash that should allow for network boot without micro SD card. HDMI output is gone, so your only video output option would be via the video composite signal on the 13-pin header. Bluetooth is gone as they replaced the Ampak module by a Realtek one, and the camera connector. All those differences means the two Orange Pi H5 boards have different uses case, with the new board is better suited to headless application where you need Gigabit Ethernet connectivity, and potentially want to save a few dollars on the board price, and remove the need for storage (if you use network boot).

The board should also be compatible with Orange Pi Zero NAS expansion board, so you’d have an inexpensive micro NAS with performance and price that rivals with FriendlyELEC NanoPi NEO 2 NAS kit, minus the enclosure. 2017 has been an exciting year for affordable networked storage so far, with various options from the two lower-end solutions aforementioned, to the better upcoming ODROID-MC1, and the higher end EspressoBin board, with some interesting work also taking place on ROCK64 board.

Software-wise, it may be worth noting that there’s no stable Armbian build so far, but there are experimental Ubuntu Xenial images for Orange Pi Zero 2 H5 board with mainline Linux kernel, which should work on the new board by just changing the DTB file. However, I did use NanoPi NEO2 with Allwinner H5 as a OpenMediaVault NAS, and it worked well enough, so I would not worry too much about software support for this use case. I’m not sure about U-boot support in the SPI flash, but hoping for some feedback in the comments section.

Orange Pi Zero Plus is sold for $14.90 plus shipping ($18.29 in total here). If you’re interested in mini NAS / home cloud system, you’ll need to add the NAS expansion board for $6.98, which in my case brings the total to $27.13 including shipping. A direct comparison with NanoPi NEO2 NAS kit is not possible, since Shenzhen Xunlong micro NAS solution does not include a case, nor heatsink, but for reference, a complete NAS kit v1.2 with NEO2 board goes for $28.98 plus shipping, or $44.98 in total in my case.

How to Setup an Orange Pi Zero DIY Smart Speaker with Google Assistant SDK

July 30th, 2017 85 comments

A preview release of Google Assistant SDK working with Raspberry Pi 3 and other ARMv7 boards was released in May, and soon after, AIY Projects Voice Kit was offered for free with Raspberry Pi Magazine in order to a complete smart speaker kit working with RPi 3. I wanted to try it on one of FriendlyELEC or Shenzhen Xunlong Allwinner board, since all we need is audio input and output, and an Internet connection. Earlier this month, I came across Orange Pi Zero Set 6 Kit that had all I needed: Orange Pi Zero ARM Linux board, an expansion board with built-in microphone and audio output jack, and a cute and small case to neatly put everything together.

Orange Pi Zero Set 6 Kit Unboxing and Assembly

Shenzhen Xunlong sent me the kit so that I can try it out.

The package includes two Orange Pi packages, the plastic case, some a bag with screws and rubber pads.

One of the package comes with Orange Pi Zero board powered by Allwinner H2+ quad core processor with 512 MB RAM, micro USB for power, 10/100M Ethernet, a USB port, a WiFi antenna, and expansion headers on the top…

Click to Enlarge

.. and a micro SD card slot on the bottom, which we’ll use to boot the operating system.

The second package is for Orange Pi Zero Interface board v1.1 with two more USB port, an IR receiver, a 3.5mm audio jack, and a built-in microphone (top right).

Click to Enlarge

The next step is just to plug the interface board into Orange Pi Zero board, bending the WiFi antenna between the two boards…

Click to Enlarge

… before pushing the board from the bottom of the enclosure, tightened the cover with the 4 screws, and adding the 4 rubber pads.

Click to Enlarge

Installing Ubuntu on Orange Pi Zero & Configuring Networking and Audio Input & Output

Google Assistant SDK requires Ubuntu or Debian operating system, so I downloaded Ubuntu server legacy image on Armbian website, since the mainline image does not support XR819 WiFi module at all. I then extracted Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113.7z and flashed Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113.img  with Etcher on a micro SD card using my main computer.

Once it was done, I took the micro SD card to Orange Pi Zero board, connected my own speakers to the 3.5mm audio jack and USB for power, as well as a 5V/2A USB charger to power the system.

Click to Enlarge

You may notice an extra USB dongle on the picture above, but we’ll talk about that later.

I’ll use WiFi to test Google Assistant, but I also connected an Ethernet cable to make it easier for first time setup. If you don’t have Ethernet, you could also connect the board via a USB to TTL board to access the serial console.

After looking up the IP address of the board in my router, I connected with SSH using root (password: 1234):

The very first boot it will ask your to change the root password, and create a new user. You may want to create “pi” user at this stage. We should not be able to access the command, and run the following command to configure Orange Pi Zero board:

I first changed the timezone.

Then selected WiFi – Connect to wireless access point to connect to my WiFi router.

We can quit armbian-config, and optionally disconnect the Ethernet cable, and reconnect SSH over WiFi, which I did.

Back in the command line, I tested audio recording & playback with the built-in microphone and speakers using the same commands as in ReSpeaker guide:

The first command recorded my voice, and then I pressed Ctrl+C to stop, and play it back with the second command. I worked fine for me. If you wish you can adjust the playback and recording volume with:

We’ll also need to create .asoundrc file for Google Assistant to work with ALSA. For we need to note the microphone card and device number (0,0):

as well as speaker card and device number (0,0):

If you want to use your TV as speaker, you’d use Card 1, device: 0.

If you have not created a pi or other user yet, you’ll want to add one belonging to sudoers and audio groups, and go the home directory:

Now create a ~/.asoundrc with the following match the card and device for our mic and speaker:

[Update: As we’ll see below this won’t work with the built-in microphone, but as indicated in the comments below, this can be fixed by changing pcm.mic section with:

I have not changed the rest of the post, but the built-in microphone on Orange Pi Zero does work now]

Setting Up Google Assistant on Orange Pi Zero

Now that audio and networking are both setup and working, we can carry on with the instructions to install Google Assistant SDK and demo. Those are the same for all boards, and I’ll describe them below in details.

We need to configure a Google Developer Project.

Go to the Project page in Google Platform Console, and click on Create Project.

I called it Orange Pi Zero Smart Speaker, and clicked on Create.

Next, we’ll need to enable Google Assistant API for our project. Simply click on Enable on that page. The “Orange Pi Zero Smart Speaker” project was already selected in my case.

We’re then being asked to create an OAuth Client ID. I only filled my email address, and a product name before clicking on Save.

Select Other in the next page, and give another name – I used “Linux Thingy” – before clicking on Create.

You should now see an OAuth client pop-up window with your client ID and secret. You can just click OK, no need to copy or save either.

Instead we’ll download client_secret_[your_client_id].json file on the next page by clicking on the arrow circled in red.

I then copied that file to Orange Pi Zero board using scp (change [your_client_id] with your actual client ID):

Now that we have configured most options we need in Google Cloud platform, let’s install Python 3 and dependencies:

At this stage to need to make sure “Web & App Activity” with “Include Chrome browsing history and activity from websites and apps that use Google services”  checked, Device Information and Voice & Audio Activity are enabled in the Activity Controls page. All options were already enabled for me by default.

We can now install Google Assistant SDK package including library and sample code:

and the authorization tool:

Run the authorization tool:

This should show a text reading “Please visit this URL to authorize this application: https://….”. Select the URL and open it in a web browser, and copy/paste the authorization code you see in the web browser back into the terminal.

We can now start the demo

That’s the initial output

I went to say “OK Google” and “Hey Google”, and… nothing. No answer, and no info in the terminal window either. I tried several times, and also played with:

as explained in the troubleshooting section in Google Assistant documentation, incrementing the value by 6 until I reached -60, before running the demo, and no luck. So I thought maybe my “American accent” could have been the problem, so I launched Google Translate in my phone, and make it say “OK Google”. Same disappointing result. I went to Google Cloud Console, and good see some activity, but with 100% errors.

Click to Enlarge

So I did some searching on the web, I could find one person changing the .asoundrc file, but I did not work for me with the file generating plenty of sound related errors when running the demo, and another fix a similar problem by changing the microphone. Which reminded me, I had bought a cheap USB microphone on eBay for $1.45. So I connected it to Orange Pi Zero board, and that’s the extra USB dongle in the photo with the speakers higher in this guide, and check the card and device number:

We can see the USB card 2, device 0, so I update the relevant line in pcm.mic section in .asoundrc:

and ran the demo again. Success! The device would reply to make “OK Google” request, and tell me the time, my name, the weather for tomorrow, sing a song, do some calculus and so on.

This is what the output looks like when the demo works:

Bear in mind that Google Assistant SDK is in preview mode right now, and it’s mainly aimed at developers. First, I understand you can’t do automation tasks, or play music like you can on an actual Google Home. The good news is that you can roll you own implementation, and for example, somebody made his AIY Project Voice Kit work with Google Music, something you should be able to reproduce on other boards. Google Home also includes a microphone array, which will make hot word detection more reliable even in noisy environment. Orange Pi Zero + USB microphone did a decent job though, as I could use it 5 or more meters away.

Next time you boot the board, you can login as pi user, and run the following commands to run the demo:

You could also use systemd to automatically start the demo, or your own implementation, and I did so with instructions adapted from Nordic Semi’s Google Assistant Wiki.

First, create /etc/systemd/system/google-assistant-demo.service file with the following content:

I add “Type = idle” as other the app would not run, possibly because it would start after the audio was enable. I did not find any audio specific services handled by systemd, so “type = ilde” will make sure the service starts after other are loaded.

Now we can enable the service, and start it:

The demo will run at this point, and it will start automatically each time your boot the board. I played with it for several hours and it seemed stable. Some people have however expressed concered about WiFi on Orange Pi Zero, so if you encountered some instability issues, you may want to switch to Ethernet instead, or use a WiFi USB dongle, or use another Orange Pi or NanoPi board with a time-proven WiFi module.

I’d like to thank Shenzhen Xunlong Software for sending the kit my way. If you are interested, you can purchase it for $12.95 + shipping.

$13 Orange Pi Zero Set 6 Kit Could Make an Inexpensive DIY Google Home Alternative

July 13th, 2017 7 comments

Since Google released the Google Assistant SDK for Raspberry Pi 3, and other ARMv7 boards, I thought I should it try myself on one of the tiny headless boards I have, as you just need audio output and a microphone. I first planed to use NanoPi NEO board with NanoHAT PCM5102A audio board, a cheap USB microphone, and pair of speakers, but this morning, I’ve come across Orange Pi Zero Set 6 kit that looks perfect for this applications and sells for just $12.95 plus shipping ($18.27 in total for me) with Orange Pi Zero board, Orange Pi Zero interface board, and a case.

Orange Pi Zero board is powered by Allwinner H2+ quad core Cortex A7 processor with 512MB RAM, and can run the required Ubuntu/Debian distribution using one of the Armbian images, and connected to the Internet over Ethernet or WiFi, however if you want to use the latter, be aware that stability and performance issues have been reported.

Microphone and audio output are added using Orange Pi Zero Interface Board V1.1 which adds one built-in microphone, and a 3.5mm audio jack where you should be able to connect your speakers. You’ll also get two extra USB host ports.

All you need to complete the hardware setup is a micro SD card, a pair of speakers, and a USB power supply. I’ve seen some demo requiring that you press a button before speaking. That will not be possible with this kit unless you add some button connected through USB or GPIO, but hopefully it’s possible to use the “hot word” technique to avoid adding that extra button.

The instructions on Google developer website for ARM boards seem clear enough, but since Aliexpress lists over 3,000 orders for that “Set 6” kit, I assumed somebody already tried that and wrote some specific instructions. Sadly, I had no luck finding such instructions, but I noticed somebody did something similar with Orange Pi PC board that includes a microphone and audio jack, and he uses a jar as an enclosure.

Ficus Online also posted the instructions on his blog, where he explains how to use a hotword too, so in theory you would not need any button. You may want to check their full website, as they use this Smart Jar as a home automation gateway with other purposes than just Google Assistant. If alternatively, you have some 96Boards on hand, there’s a specific Google Assistant project being worked on. If you prefer Amazon Alexa, there’s a project for Orange Pi + Alexa on Github, but it has not been updated for a year.

NanoPi NEO NAS Kit Review – Assembly, OpenMediaVault Installation & Setup, and Benchmarks

June 18th, 2017 68 comments

NAS Dock v1.2 for Nano Pi NEO / NEO 2 is, as the name implies, a complete mini NAS kit for 2.5″ drive for NanoPi NEO or NEO 2 board. The NEO 2 board is strongly recommended, since it’s not much more expensive, but should deliver much better results due to its Gigabit Ethernet interface. I’ve received two of those kits together with several other boards & accessories from FriendlyELEC, and today I’ll show how to assemble the kit, configure OpenMediaVault, and run some benchmarks.

NAS Kit V1.2 Assembly with NanoPi NEO 2 Board

The only extra tool you’ll need is a screwdriver, and potentially a soldering iron as we’ll see further below.
The metal box is stuff wih accessories so the first thing is to open one or two sides to take out the content. We have the mainboard, NanoPi NEO back plate, NanoPi NEO 2 back plater, a heatsink and thermal set, and a set of 5 screws to tighten the hard drive which mean there’s one extra screw. FriendlyELEC always adds extra screws, and I find it’s a nice touch, as it can be a real pain if you happen to lose one.

Click to Enlarge

Let’s have a closer look at the “1-bay NAS Dock v1.2 for NanoPi NEO/NEO2” board. We have a UAS capable USB 3.0 to SATA brige chip between the two header for NanoPi NEO board (note that the USB connection will be limited to USB 2.0 since the board only supports that), an LED, a USB 2.0 host port for a printer, WiFi dongle, or webcam, the power switch, the power jack, a 3-pin serial header, an I2C connector for Grove modules, and of course the SATA connector.

Click to Enlarge

There’s not much on the other side of the board, except a CR2032 battery slot for the RTC.

Before going further, you’ll need to go to the Wiki, and get the latest OpenMediaVault firmware, in my case nanopi-neo2_debian-nas-jessie_4.11.2_20170531.img.zip, which I then flashed with Ether program to a micro SD card..

Once this is done, install the heatsink and thermal to your NanoPi NEO 2 board, and insert the micro SD card into the board.

Notice that I also soldered the headers. While it would be obvious to people would have looked at the pinout diagram, I’ve read some people have justed connect the board using the (pre-soldered) 4-pin header, as they may have believed it was a USB header, but it’s just the serial console instead, and obviously the hard drive was not detected. If you don’t feel like soldering the headers to the board yourself, make sure you tick the option “with pin headers soldered” when ordering. It just costs $1 extra.

Now we can insert our board into the “1-bay NAS Dock” board, instead the hard drive, and optionally an I2C module. I connected an I2C OLED display i the picture below for illustrate, as using the display would require cutting out the case. Some people may want to connect an I2C temperature sensor instead.

Click to Enlarge

I used four screws to tighen the hard drive on the other side of the board, and install a CR2032 battery for the real-time clock.


Finally, you’ll need a 12V power supply with at least 1A, but I could not find any (safe) spare ones so I used Maxoak K2 power bank instead, since it can output 12V @ 2.5 A max.


OpenMediaVault Setup on NanoPi NEO 2 Board

So I connected everything, and applied power, but the board would not boot with the Ethernet Link LED blinking in a regular fashion, meaning something was very wrong. So I took out the board, and connected a serial debug board, connect to the console via minicom using 115200 8N1, and that’s what I got:

The boot was just stuck there. I re-inserted the micro SD in my PC, and I could see both boot and rootfs partitions, so everything looked good.
Then I powered the NanoPi NEO 2 board with a 5V/2A power supply only, and the boot succeeded:

Then I went back to the 12V power input on NAS Kit with the power bank and the boot succeeded. Very strange. It turns out the board would not boot most of the time, but the symptoms are not reproducible 100% of the time. This kind of random behavior is usually a timing or distorted signal issue. So I thought the micro SD card might not play well with the board, and the power bank signal might not be so clean. So I first flashed another micro SD card, but same results. I used another 12V/5A power supply, and it did not really help either. Finally, I used another NanoPi NEO 2 board and it appears to be stable.

You can find the board using FriendlyELEC.local if bonjour services are running in your computer:

Alternatively, you could check out the IP address in other ways. In my case, I just type friendlyelec.local in Firefox to access the web interface. The default username and password are admin and openmediavault.

Click to Enlarge

After login, you can access the dashboard showing system information, and which services are running. You may want to disable the services you don’t need.

Click to Enlarge

You can go to Storage->Physical Disks to check if your hard drive has been detected. No problem for me here with a 931.51 GiB drive detected.

Click to Enlarge

You may then want to setup a fix IP address. There are various ways to do this but I went to Network->Interfaces and set eth0 to a fixed IP address. You’ll be asked to apply the changes once it’s done.

Click to Enlarge

I also changed the hostname to CNX-NEO2-NAS in the General tab.

After that I decided to address some security issues. First by changing the administrator password in General Settings->Web Administrator Password.

I then went to Access Rights Management->User to find out there were two pre-configured users: pi and fa. I deleted fa user, changed pi’s user password, and added it to ssh group. It’s actually even probably better to just delete both user, and create your own.

The root user is not shown, but you’ll want to login as root through ssh first and change the password, as the default password is fa. Once it’s done, you’ll have better security, and your system should not be easily accessible via basic “hacks”. For more security, you’ll still want to install an RSA certificate. A self-signed one should do if you plan to use it only in the local network, but you may also consider a free Let’s Encrypt certificate instead.

We can now take care of the hard drive. I went to Storage->File Systems, and clicked on +Create file system which will let you choose between BTRFS, EXT3, EXT4, XFS, and JFS. I’ve gone with EXT4 first.

Click to Enlarge

After a few minutes you drive should be formatted, so we can configure network shares. I want to use SAMBA and SFTP to transfer files for the purpose of this review, so I went to Access Rights Management->Shared Folders to add a new share called HDD for the root of of hard drive. You may want to add multiple share if you plan to split videos, documents, music and so on.

Click to Enlarge

I clicked Save, and selected ACL to add permissions to pi and admin users. You can add whatever users you plan to use to access the share.

Click to Enlarge

That share3d folder can now be assigned to the services you plan to use. SFTP is enabled by default when SSH is running, so I create a SAMA/CIFS share by going to Services->SMB/CIFS->Shares to add the share.

Click to Enlarge

Browsing the Network with Nautilus would show both cnx-neo2-NAS – SMB.CIFS and cnx-neo2-nas – SSH (SFTP) shares.

Configuration is now complete. I have not find a clean way to power off the system, so I normally open a terminal session via ssh and run the shutdown now command. A software button to turn of the NAS would have been a nice features on the kit.

I also often encountered the error “Software Failure. Press left mouse button to continue. Session not authenticated.” before the session timeout is set to 5 minutes. If you prefer a longer timeout, you can change it in General Settings->Web Administration.

In case you want to use the RTC, you may first want to set the timezone:

Check the date is correct, and write it to the hardware clock:

before reading it back.

You can test it by rebooting the board without the Ethernet cable:

Perfect! You’d just have to make sure the “set” command is run automatically at boot time if the time in the RTC is set. It would be good if FriendlyELEC updated their image to do that automatically at boot time.

NAS Dock V1.2 + NanoPi NEO 2 Benchmarks

Since I can now copy files and folders over SAMBA and SFTP, we can start running some benchmarks to evaluate performance. I’ll use EXT-4, BTRFS, and XFS file systems on the hard drive, and run iozone to specicially test storage performance, following by copying large and small files over SAMBA or SFTP to test real-life NAS performance. For large file copy, I’ll use a folder with 7 large files totaling 6.5 GB, and for small files, I’ve done a fresh checkout of the Linux kernel in my computer:

and removed symlinks since they may cause issues during copy, as well as .git directory with a huge 1.8GB file:

The end result is a directory with 64,013 files totaling 748.6 MB.

Iozone results

EXT-4:

BTRFS:

XFS:

I’ve taken results with 16384kB reclen for read, write, random read and random write values to draw a chart, since most people are likely going to store large files in their NAS. The smaller reclen could be interesting if you plan to handle smaller files.

All three file systems have a very good read speed of around 40 MB/s, but BTRFS write appear to be the fastest among the three, with EXT-4 being the weakest at around 25 MB/s. But for some reasons, those results are useless in practice, as we’ll see below. Finding out the exact reason would possibly require studying and profiling iozone and the kernel source code which would be outside of the scope of this review.

File copy over SAMBA and SFTP

Results for large files in minutes and seconds.

File Copy  Large Files SMB SFTP
Write Read Write Read
EXT4 02:49.00 02:40.00 03:54.00 04:15.00
BTRFS 03:20.00 02:40.00 03:48.00 04:32.00
XFS 02:45.00 02:38.00 03:36.00 04:23.00

Chart converted to MB/s.

Read and Write Speeds in MB/s

First, we can see very good read performance from the NAS (NAS to my PC)  with 41 to 42 MB/s close to the theorethical limit of a USB 2.0 connection. Write speed is a a little different as the files were transferred more slowly with BTRS, and around 40MB/s with EXT-4 and XFS.  Since SFTP is encrypted the transfer speed is roughly the same for all three file systems. Overall the file system you choose does not really impact performance with large files.

Results for small files in minutes and seconds.

File Copy  Small Files SMB SFTP
Write Read Write Read
EXT4 15:26.00 18:34.00 09:02.00 12:48.00
BTRFS 18:48.00 18:02.00 10:30.00 11:30.00
XFS 17:33.00 18:22.00 09:18.00 12:35.00

Chart converted to MB/s.

Transferring a large number of small files over SAMBA is really slow, and barely faster over SFTP. Again,there aren’t any significant differences between file systems here.  If you are going to transfer a large number of small file over the network, you may want to either compress the files before transfer, or compress the files on the fly using the command line:

It took just 1 minute and 49 seconds to transfer all 64,013 files, or over five times faster than SFTP write to XFS, at around an effective 6.86 MB/s. So knowing your tools may matter as much as having the right hardware.

I was going to run a last part after enabling optimizations provided by tkaiser, but it turns out FriendELEC has already done that in their firmware image.

If you want to reproduce the setup above, you’ll need to purchase NAS Kit v1.2 for $12.99, and a NanoPi NEO 2 with soldered headers for $15.99. If you don’t have a 2.5″ hard drive, you’ll need to add this, as well as a 12V power supply which you could purchase locally, or on FriendlyELEC website for under $10. All in all that’s cheaper than a similar kit with a Raspberry Pi 3 board, and you’ll get close to four times the SAMBA performance for large files since RPi 3 will be limited to 10 to 12 MB/s due to the Fast Ethernet connection.

ODROID-C2 Board Gets Experimental Ubuntu 16.04 Armbian Images with Linux 4.10

May 24th, 2017 5 comments

Hardkernel is doing a good job at providing working images with GPU / VPU support, and documentation for their ODROID boards. But while Exynos based ODROID-XU4(Q) boards already get firmware images with a recent Linux 4.9 kernel, Amlogic S905 based ODROID-C2 board’s Ubuntu 16.04 images still rely on the Linux 3.14 kernel released by Amlogic, plus various patchsets.

But we’ve seen BayLibre is working on a Linux mainline port for Amlogic processors, and Armbian community appears to have leveraged that work, and added Ubuntu 16.04 Server and Desktop images with Linux 4.10 to their build system. Those are experimental nightly builds so they may not have been tested, and it’s likely not working as well as the Ubuntu 16.04 “legacy” images released by Hardkernel. They are also not shown in Armbian ODROID-C2 page at the time of writing, but it’s a step in the right direction.