DIY Banana Pi Fan Cooling System from PC Parts

Why Stay Cool?

I know some of you would rather be hot, but lets face the fact, hotness breaks stuff, degrades the SoC, and lowers overall performance and stability. If you are running your Banana Pi 24/7/365 with some decent task load, then you should considering DIYing yourself a cooler.


This Things is a Click Away


I know heat sink are selling for a cheap price on the internet. But I didn't really feel like I will be needing it, so I just made this cooling system for fun from my DIY laptop cooler two years ago. 

Steps - Easy

Just tape your fan to the back of a Banana Pi case. The acrylic case has air vents, but the plastic one does not, so just take the case off when it comes to that. 

Connect the two wires to 12V electricity. Just wire batteries in a series if you just want to see it for fun. Otherwise, solder it onto a 4 pin connector and connect computer power supply to it. 

Testing


nano /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
This shows you the temperature sensor on the Banana Pi, M1 at least. It is not the actual SoC temperature, but it is a somewhat less reliable way to see how cool your Banana Pi is. We are trying to cool everything, not just the SoC in this case.

Divide by 1000 to get degrees Celsius.

Ubuntu 15.04 on Banana Pi BPI-M1 In-depth Review and Benchmark

Ubuntu Mate on BPI-M1


Ubuntu as we all know it is a very popular Linux distro that is full of features. Mate on the other hand is a graphic user interface that unlike the default Ubuntu gnome, does not have a task bar. You can easily install new themes to further customize your user experience. 

On the dual-core 1GHz BPI-M1, Ubuntu plays the role of a feature full operating system that can run with minimal specifications. The M1 cannot dream of matching 2015 ultra books or desktops, but if you don't mind waiting a few seconds for everything to load, it can pass as a PC. 


File Explorer

You will have no problem navigating through this basic file explorer. 

Firefox Browser

The default browser that is bundled with Ubuntu. You can also install Chromium if you like. 

Video Playback

VLC player. Plays 640p videos smoothly. 

Benchmark

SunSpider JavaScript

Banana Pi BPI-M1 - 2152.7

Raspberry Pi2  - 4438.6

A10 6800K 4.1GHz - 303.2 

Lower is better.



Hardinfo 

Banana Pi BPI-M1Raspberry Pi 2Raspberry Pi Intel(R) Core i5-2500kCeleron(R) 1.50GHz
CPU Blowfish63.6661.76100.832.5326.19
CPU Cryptohas15.478.79639.99
CPU Fibonacci17.1116.1426.481.498.14
CPU N-Queens51.4286.264.12
FPU FFT79.87150.970.84
FPU Raytracing72.374.69133.853.3440.88
(Raspberry Pi results from http://www.linuxlinks.com/)



GtkPerf

Banana Pi BPI-M1
GtKEntry0.25
GtkComboBox6.24
GtkComboBoxEntry3.5
GtkSpinButton0.65
GtkProgressBar0.75
GtkToggleButton1.77
GtkCheckButton0.57
GtkRadioButton0.95
GtkTextView-Add text2.63
GtkTextView-Scroll0.07
GtkDrawingArea Lines1.93
GtkDrawingArea Circles3.9
GtkDrawingArea Text3.22
GtkDrawingArea Pixbufs0.69
Total time27.14

Play ninvaders, 2048, NetHack and other Linux Command Line Games on Banana Pi

Command Line Games

Command line games look even older than retro 8-bit games that you think are really old. Command line games runs in a command line and the graphics are made of text input characters that can be typed. So why these type of games? Well, they are interesting and some games might actually be fun. 

Note: I am running Bananian Linux.

nInvaders - Space Invaders


The game is self-explanatory. 
Installation
apt-get install ninvaders
Run
cd /usr/games
./nInvaders
Exit
control + c

Bash 2048 - 2048 on .sh 


Move to your installation directory
cd /usr/games
Make new file 2048.sh
nano 2048.sh
Paste in content from this page
https://github.com/mydzor/bash2048/blob/master/bash2048.sh
Set permissions
chmod 777 2048.sh
Run 2048.sh
./2048.sh
Exit
control + c 

NetHack -  Dungeon Explorer


Install
apt-get install nethack-console   
Locate and run
cd /usr/games
./nethack
 Tip, Nethack may seem a bit over whelming at first because you have no idea what the graphics mean so check out their website to get acquainted with controls.
 http://www.nethack.org/v343/Guidebook.html#_TOCentry_7

More?

Of course there are lots more fun games that you can run on the Linux terminal. If you want go ahead and Google / play them!


Spigot Minecraft Server on Banana Pi M1/M1+ Dual-core A20 Computer


Minecraft Server on BPI 

We all know sometimes it is more fun to play Minecraft with friends and other people on a server instead of playing alone. That is exactly the reason why so many public Minecraft servers are set up; but have you ever wanted to make your own server? The BPI Banana Pi boards is the perfect low cost solution to hosting a dedicated private Minecraft server. The dual-core processor and 1GB of RAM can probably handle moderate Minecrafting. 


Installing Spigot Server

credit: as you can see in the video I did not come up with these on my on, rather I read Spigot's website and Google to optimize a set of commands for your banana pi.

My hardware: BPI M1 Dual-core A20 running on Bananian with 8GB SD


First, we need to install java 
apt-get install openjdk-7-jre-headless

then install git
apt-get install git

Then get build tools for Spigot server
wget "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" -O BuildTools.jar

Run the build tool
java -jar BuildTools.jar

The process took 2 hours for me on the M1, I know its a long time, but you can just leave you Banana Pi on and do other things.(For example: looking at my other blog posts:)

Start the Server, locate spigot.jar
cd Spigot/Spigot-Server/target
ls

make new start script
nano start.sh

copy and paste the two lines below into it
#!/bin/sh
java -Xms512M -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar

set permission
chmod +x start.sh

run start script
./start.sh
You will get an error telling you to sign eula.txt, so do that
nano eula.txt

change the "false" to "true", press "control + x" to exit, select y to save


Modify server settings
nano server.properties 


Now paste the default properties found on gamepedia. Change settings as needed.
#Minecraft server properties
#(File Modification Datestamp)
generator-settings=
op-permission-level=4
allow-nether=true
resource-pack-hash=
level-name=world
enable-query=false
allow-flight=false
announce-player-achievements=true
server-port=25565
max-world-size=29999984
level-type=DEFAULT
enable-rcon=false
level-seed=
force-gamemode=false
server-ip=
network-compression-threshold=256
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
snooper-enabled=true
online-mode=true
resource-pack=
pvp=true
difficulty=1
enable-command-block=false
gamemode=0
player-idle-timeout=0
max-players=20
max-tick-time=60000
spawn-monsters=true
generate-structures=true
view-distance=10
motd=A Minecraft Server

Start the server again
./start.sh

It will prepare the spawn area which will also take a really long time. 

Testing

Now you can connect to the server through the IP specified IP in the server properties file. For your friends to connect, you have to forward the minecraft port 25565 to the Banana Pi in your router settings.


ASCII Art Animation for Banana Pi Terminal - An Aquarium Animated Screen Saver

ASCII Art

ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable characters. We will be installing an animated ASCII Art screen saver for the banana pi terminal.

Why am I writing a guide a this? Well it looks awesome and it is cool!

ASCIIQuarium

An animated program that displays ascii art as a linux screen saver for the terminal. The credit for this interesting ASCIIQuarium goes to mewbies.

Installation 

A Banana Pi running and Bananian (Debian) and a access to the terminal

commands
aptitude update
aptitude install perl libcurses-perl
we installed perl, a programming language needed for this application
wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.6.tar.gz
 tar -zxvf Term-Animation-2.6.tar.gz 
We downloaded and extracted some animations


cd Term-Animation-2.6/
perl Makefile.PL && make && make test
make install
We finished up installing the animations


Now to run the awesome asciiart screen saver
asciiquarium

To quit simply press "q"

OpenWrt on Banana Pi R1 Router with Shadowsocks, OpenVPN, Proxy, UPNP

OpenWrt on Banana Pi R1

Banana Pi R1 is a single-board computer that features WiFi capabilities as you probably know. It can run on several OSes and today we will explorer the feature packed OpenWrt image optimized for Banana Pi R1.

Video Overview

Installation

Download img here https://drive.google.com/file/d/0B4PAo2nW2KfnSGUzR0RYWVNiZTg/view
Open Win32DiskImager and write the img file to a micro SD card.
Insert it into Banana Pi R1 and connect power.
Connect PC to a port on the Banana Pi
Go to 192.168.1.1 and login with "root", "admin"


WiFi Testing

Gigabit LAN 

  • 94.32 Mbps (down)
  • 12.14 Mbps (up)
WiFi Default Configuration 

  • 1.98 Mbps (down)
  • 3.61 Mbps (up)
The WiFi is not as reliable as the Android OS for Banana Pi R1, but the Gigabit LAN speeds are really good.

Basic Router Features

The OpenWrt image gives you a user interface on the web to edit advanced router features. You can set up firewalls, QoS, switches, and WiFi. 

Additional Features



By default, the image also comes with really helpful features such as Shadowsox, OpenVPN, Redsocks 2, Privoxy, UPNP, and Aria 2. 

Proxy web proxy/Proxy: http proxy

Redsocks2: Automates proxy connection when web contents are blocked. 

Shadowsocks: Socks5 proxy software, used to bypass firewalls. 

Open connect VPN: VPN Server

Network share: samba, Network sharing software

UPNP: So that the gateway or router NAT module to do automatic port mapping, BitComet listening port mapping from a gateway or router to the computer network to accelerate BT download speed

Transmission: BT、PT download client

Aria2 settings: Multi-threaded download software with web management console, you can add from the web interface, administrative tasks directly

Helping Notes

The thing is that the web interface on 192.168.1.1 is quiet mediocre. Do not expect this to be the best thing in the world because configuring each and everyone of them to work is a pain. Mostly because you have to use the vi linux text editor instead of nano. Please check out how to use vi. 
http://www.cs.colostate.edu/helpdocs/vi.html

I know you are probably wanting to know how to set up all those features and I will follow up as soon as I can with instructions.

Banana Pi Opensource Router R1 Overview and Wireless Test

Banana Pi Router R1

Banana Pi M1 is the handy dandy development board that can handle anything from Apache server to OwnCloud. The Banana Pi R1 is a routerfied version of the M1 with the same SoC, Allwinner A20, but now with 5 Gigabit ports, and wireless support. This router offer good performance and most importantly can run on a variety of operating system including Android, OpenWrt, Raspbian, Fedora...



Unboxing

The inner container of Banana Pi R1 is quiet nice, it looks decent and is easy to open, but the outer container is wrapped with tape, so get you scissors ready for some though times:p 


Specifications



  • A20 dual core 1GHz processor
  • 1 GB RAM
  • 4 Gigabit LAN, 1 Gigabit WAN
  • 1 USB 2.0
  • 2 micro USB (Plug power cable to the one on the side!)
  • SATA for 2.5 inch drives
  • Micro SD (For operating system)
  • Wireless a/b/g/n dual band with antenna connectors

Quick Start

Download Banana Pi R1 image (Android if this is your first time), and Phoenix Card writer (for android img) here
Extract the zip package.
Format a micro SD card (8 GB minimum) FAT 32.
Run PhoenixCard.exe from the Phoenix folder
Select the drive letter corresponding to the micro SD card.
Select the Android image downloaded from the package or from bananapi.com
Select boot and press Burn

Connect power adapter to the micro USB that is on the outer side (at least 1.35 Amps, I tried with 800 mAh and the system crashed all the time)
Connect Ethernet cable to the single port apart form the four port cluster. 


Connect HDMI display (optional).


Connect to the network and go to "10.0.0.1" to access the OpenWrt router interface. (password: root)

Wireless Test

I ran some wireless tests with antennas salvaged from an older router. Antennas are a must have and they boost the wireless range dramatically. If you do not have antennas, go buy some because it is not going to work if you are more than 5 feet away. I only did 2.4 GHz benchmark because I cannot get the 5 GHz signal to broadcast on the R1.  


BPI R1 with antennas (android default settings)

1 feet away
  • 32.14 Mbps download
  • 11.57 Mbps upload
1 wall away
  • 10.96 Mbps download
  • 11.57 Mbps upload
20 feet 2 walls away
  • 3.48 Mbps download
  • 11.08 Mbps upload

TP Link TL-WR 841N (DD-Wrt defaults)

1 feet away
  • 47.64 Mbps download
  • 11.62 Mbps upload
1 wall away
  • 44.09 Mbps download
  • 11.22 Mbps upload
20 feet 2 walls away
  • 23.57 Mbps
  • 9.15 Mbps

Conclusion

The Banana Pi R1 is definitely a fun project with decent performance for real applications as well. Though it can not compete with the legendary $20 TP Link router in performance in 2.4GHz, the R1 has more processing power than even $200 routers. The R1 is ideal for a NAS as it has a SATA port for a 2.5 inch hard drive and it is also good for a VPN server or a TOR router. 

This is the R1 overview and I will post more R1 projects in the coming weeks! Most M1 projects will also be compatible with the R1 if it runs on Raspbian or similar Linux OS. 

Mopidy Music Streaming Server on Banana Pi (Partial)

What is Mopidy?

A music server capable of playing music on local storage, Spotify, Google Play, Sound Cloud, and more. It can be accessed through a web interface. So basically, it plays music and store music, but now with your Banana Pi. Visit Mopidy page to learn more. If you want to do more hacking, check the official Mopidy support page


Installation

The following installation will be done with Putty, if you need help connecting to your Pi command lines with a PC look at this blog article or the beginning guide.
First we need to install Python for Mopidy server to run

Check if you already installed Python, Mopidy needs version 2.7.x
python --version

 Then install some more Python packages (on Debian)
apt-get install build-essential python-dev python-pip

 Then we need to install a thing called GStreamer
apt-get install python-gst0.10 gstreamer0.10-plugins-good
apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-tools

Now installing Mopidy
pip install -U mopidy

 Installing Mopidy Extensions (run lines separately and it might take a while)
pip install Mopidy-HTTP-Kuechenradio
pip install Mopidy-GMusic
pip install Mopidy-SoundCloud
pip install Mopidy-YouTube
pip install Mopidy-Spotify-Tunigo

It is wise to install this interface too
pip install Mopidy-Mopify

For the complete list of plugins
pip search mopidy

HTTP Configuration

nano /root/.config/mopidy/mopidy.conf
Look at the configuration file and un-comment a line if changes are needed



Now restart Mopidy service
service mopidy restart

Access Web Interface

In a browser go to
"the local IP of Mopidy":6680
for example
192.168.1.1:6680
Select a web interface (in this case Mopify)
Now make sure you enable cookies and block ups
Connect with your Spotify account and start listening


Server Testing

*Sorry I did not get it to work with spotify yet, there is some lag, and I can not hear audio output, you might need spotify premium

Debug

mopidy local scan

Alternative

Just run android and play music that way!
So much easier