Difference between revisions of "PineCube"

From PINE64
Jump to navigation Jump to search
(Add instructions for using screen to communicate with the PineCube with the woodpecker usb serial device)
(→‎Armbian: add iperf3 tests: with and without WireGuard)
Line 153: Line 153:


<code>screen /dev/ttyUSB0 115200</code>
<code>screen /dev/ttyUSB0 115200</code>
==== Basic bandwidth tests with iperf3 ====
Install armbian-config:
<code>apt install armbian-config</code>
Enable iperf3 through the menu in armbian-config:
<code>armbian-config</code>
On a test computer on the same network segment run iperf3 as a client:
<code>iperf3 -c pinecube -t 60</code>
The same test computer, run iperf3 in the reverse direction:
<code>iperf3 -c pinecube -t 60 -R</code>
===== Performance results =====
The Ethernet network does not work in the current Ubuntu Focal armbian image. The performance results reflect using the wireless network. The link speed was 72.2Mb/s using 2.462Ghz wireless. Running sixty second iperf3 tests: the observed throughput varies between 28-50Mb/s to a host on the same network segment. The testing host is connected to an Ethernet switch which is also connected to a wireless bridge. The wireless network uses WPA2 and the PineCube is connected to this wireless network bridge.
Client rate for sixty seconds:
[ ID] Interval          Transfer    Bitrate        Retr
[  5]  0.00-60.00  sec  293 MBytes  41.0 Mbits/sec    1            sender
[  5]  0.00-60.01  sec  291 MBytes  40.7 Mbits/sec                  receiver
Client rate with -R for sixty seconds:
[ ID] Interval          Transfer    Bitrate        Retr
[  5]  0.00-60.85  sec  263 MBytes  36.2 Mbits/sec    3            sender
[  5]  0.00-60.00  sec  259 MBytes  36.1 Mbits/sec                  receiver
Using WireGuard to protect the traffic between the PineCube and the test system, the performance characteristics change only slightly.
Client rate for sixty seconds with WireGuard:
[ ID] Interval          Transfer    Bitrate        Retr
[  5]  0.00-60.00  sec  230 MBytes  32.1 Mbits/sec    0            sender
[  5]  0.00-60.09  sec  229 MBytes  32.0 Mbits/sec                  receiver
Client rate with -R for sixty seconds with WireGuard:
[ ID] Interval          Transfer    Bitrate        Retr
[  5]  0.00-60.14  sec  246 MBytes  34.3 Mbits/sec    7            sender
[  5]  0.00-60.00  sec  245 MBytes  34.2 Mbits/sec                  receiver


=== Stock Linux ===
=== Stock Linux ===

Revision as of 16:10, 20 December 2020

PAGE UNDER CONSTRUCTION, INFO SUBJECT TO CHANGE


Specifications

  • Dimensions: 55mm x 51mm x 51.5mm
  • Weight: 55g
  • Storage:
    • MicroSD slot, bootable
    • 128Mb SPI Nor Flash, bootable
  • Cameras: OV5640, 5Mpx
  • CPU: Allwinner(Sochip) ARM Cortex-A7 MPCore, 800MHz
  • RAM: 128MB DDR3
  • I/O:
    • 10/100Mbps Ethernet with passive PoE
    • USB 2.0 A host
    • 26 pins GPIO port
      • 2x 3.3V Ouptut
      • 2x 5V Output
      • 1x I2C
      • 2x UART
      • 2x PWM
      • 1x SPI
      • 1x eMMC/SDIO/SD (8-bit)
      • 6x Interrupts
      • Note: Interfaces are multiplexed, so they can't be all used at same time
    • Internal microphone
  • Network:
    • WiFi
  • Screen: optional 4.5" RGB LCD screen
  • Misc. features:
    • Volume and home buttons
    • Speakers and Microphone
  • Power DC in:
    • 5V 1A from MicroUSB Port or GPIO port
    • 4V-18V from Ethernet passive PoE
  • Battery: optional 950-1600mAh model: 903048 Lithium Polymer Ion Battery Pack, can be purchase at Amazon.com

PineCube board information, schematics and certifications


Datasheets for components and peripherals

  • LCD touch screen panel information:
  • Lithium battery information:

PineCube GPIO Pinout.png


PineCube Case-1.jpg PineCube Case-2.jpg


Operating Systems

Mainlining Efforts

Please note:

  • this list is most likely not complete
  • no review of functionality is done here, it only serves as a collection of efforts
Linux kernel
Type Link Available in version
Devicetree Entry Pinecube https://lkml.org/lkml/2020/9/22/1241 5.10
Correction for AXP209 driver https://lkml.org/lkml/2020/9/22/1243 5.9
Additional Fixes for AXP209 driver https://lore.kernel.org/lkml/20201031182137.1879521-8-contact@paulk.fr/ tdb (5.11?)
Device Tree Fixes https://lore.kernel.org/lkml/20201003234842.1121077-1-icenowy@aosc.io/ 5.10
U-boot
Type Link Available in version
PineCube Board Support https://patchwork.ozlabs.org/project/uboot/list/?series=210044 expected in v2021.01
Buildroot
No known mainlining efforts yet


NixOS


Buildroot

Elimo Engineering integrated support for the PineCube into Buildroot.

This has not been merged into upstream Buildroot yet, but you can find the repo on Elimo's GitHub account and build instructions in the board support directory readme. The most important thing that this provides is support for the S3's DDR3 in u-boot. Unfortunately mainline u-boot does not have that yet, but the u-boot patches from Daniel Fullmer's NixOS repo were easy enough to use on buildroot. This should get you a functional system that boots to a console on UART0. It's pretty fast too, getting there in 1.5 seconds from u-boot to login prompt.

Armbian

Armbian Builds for PineCube are available for download, once again thanks to the work of Icenowy Zheng. Although not officially supported (CSC Status it enables the usage of Debian and Ubuntu.

A serial console can be established with 152008N1 (no hardware flow control). Login credentials are as usual in Armbian login: root password: 1234.

Example with screen and the woodpecker USB serial device

First connect the woodpecker USB serial device to the PineCube. Pin 1 on the PineCube has a small white dot on the PCB - this should be directly next to the microusb power connection. Attach the GND pin on the woodpecker to pin 6 (GND) on the PineCube, TXD from the woodpecker to pin 10 (UART_RXD) on the PineCube, and RXD from the woodpecker to pin 8 (UART_TXD) on the PineCube.

On the host system which has the woodpecker USB serial device attached, it is possible to run screen and to communicate directly with the PineCube:

screen /dev/ttyUSB0 115200

Basic bandwidth tests with iperf3

Install armbian-config: apt install armbian-config

Enable iperf3 through the menu in armbian-config: armbian-config

On a test computer on the same network segment run iperf3 as a client: iperf3 -c pinecube -t 60

The same test computer, run iperf3 in the reverse direction: iperf3 -c pinecube -t 60 -R

Performance results

The Ethernet network does not work in the current Ubuntu Focal armbian image. The performance results reflect using the wireless network. The link speed was 72.2Mb/s using 2.462Ghz wireless. Running sixty second iperf3 tests: the observed throughput varies between 28-50Mb/s to a host on the same network segment. The testing host is connected to an Ethernet switch which is also connected to a wireless bridge. The wireless network uses WPA2 and the PineCube is connected to this wireless network bridge.

Client rate for sixty seconds:

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.00  sec   293 MBytes  41.0 Mbits/sec    1             sender
[  5]   0.00-60.01  sec   291 MBytes  40.7 Mbits/sec                  receiver


Client rate with -R for sixty seconds:

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.85  sec   263 MBytes  36.2 Mbits/sec    3             sender
[  5]   0.00-60.00  sec   259 MBytes  36.1 Mbits/sec                  receiver

Using WireGuard to protect the traffic between the PineCube and the test system, the performance characteristics change only slightly.

Client rate for sixty seconds with WireGuard:

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.00  sec   230 MBytes  32.1 Mbits/sec    0             sender
[  5]   0.00-60.09  sec   229 MBytes  32.0 Mbits/sec                  receiver

Client rate with -R for sixty seconds with WireGuard:

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.14  sec   246 MBytes  34.3 Mbits/sec    7             sender
[  5]   0.00-60.00  sec   245 MBytes  34.2 Mbits/sec                  receiver

Stock Linux

SDK

Stock Linux

How to compile

You can either setup a machine for the build environment, or use a Vagrant virtual machine provided by Elimo Engineering

On a dedicated machine

Recommended system requirements:

  • OS: (L)Ubuntu 16.04
  • CPU: 64-bit based
  • Memory: 8 GB or higher
  • Disk: 15 GB free hard disk space

Install required packages

sudo apt-get install p7zip-full git make u-boot-tools libxml2-utils bison build-essential gcc-arm-linux-gnueabi g++-arm-linux-gnueabi zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32z1-dev

Install older Make 3.82 and Java JDK 6

pushd /tmp
wget https://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar xfv make-3.82.tar.gz
cd make-3.82
./configure
make
sudo apt purge -y make
sudo ./make install
cd ..
# Please, download jdk-6u45-linux-x64.bin from https://www.oracle.com/java/technologies/javase-java-archive-javase6-downloads.html (requires free login)
chmod +x jdk-6u45-linux-x64.bin 
./jdk-6u45-linux-x64.bin 
sudo mkdir /opt/java/
sudo mv jdk1.6.0_45/ /opt/java/
sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /opt/java/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
popd

Unpack SDK and then compile and pack the image

7z x 'PineCube Stock BSP-SDK ver1.0.7z'
mv 'PineCube Stock BSP-SDK ver1.0' pinecube-sdk
cd pinecube-sdk/camdroid
source build/envsetup.sh
lunch
mklichee
make -j3
pack
Using Vagrant

You can avoid setting up your machine and just use Vagrant to spin up a development environment in a VM.

Just clone the Elimo Engineering repo and follow the instructions in the readme file

After spinning up the VM, you just need to run the build:

cd pinecube-sdk/camdroid
source build/envsetup.sh
lunch
mklichee
make -j3
pack


Community Projects

Share your project with a PineCube here!