2017-11-8
md
Raspian from OrangePi.org for the Orange Pi Zero
<-Google Assistant on an Orange Pi Zero running DietPi

I looked at the recent Linux distributions available from OrangePi.org. I was not impressed with the Raspian server image found on the site, but I could be wrong of course. As they say, your mileage may vary.

Table of Contents

  1. Available Distributions from OrangePi.org
  2. Installing Raspian Server
  3. Enabling WiFi
  4. Observations

  1. Available Distributions from OrangePi.org
  2. Why not try a Linux distribution among thoes offered by Shenzhen Xunlong Software CO., Limited? They can be found on the Resources/Downloads page about half way down in the Orange Pi Zero section.

    The two most recent Linux distributions are

    ubuntu Core
    updated: 2017-08-18
    OrangePi_zero_UbuntuCore_1604_V0_0_1.rar 
    Version: 	     0.8.0
    Release date:  2016-11-24
    Release notes: username(root/orangepi), password(orangepi)
    
    Raspbian Server
    updated: 2017-05-05
    Raspbian_server_For_zero_H2+_V0_1
    Version: 	     0.8.0
    Release date:  2016-11-24
    Release notes: username(root/orangepi), password(orangepi)
    

    A cursory look at Ubuntu Core persuaded me to avoid this distribution at this time. Among other things, it seems that a video connection and a TTL serial connection are needed to set up the device before being able to open an ssh session. Installation of packages is done through a new model: snaps obtained from stores. From my cursory examination of the Ubuntu Core site, you can setup a store but that involves another layer of complication.

    So I decided to try Raspbian server.

  3. Installing Raspian Server
  4. The image is a file of Raspian Server named Raspbian_server_For_zero_H2+_V0_1.img in an xz archive named Raspbian_server_For_zero_H2+_V0_1.img.xz which is itself in the downloaded archive Raspbian_server_For_zero_H2+_V0_1.rar found at this URL. I suggest going to the download page in case a newer version becomes available.

    Needless to say, the image will have to be extracted to burn to the SD card. Etcher can handle images in zip archives but nothing so complicated as the double compression performed by OrangePi.org. For details on using the application, see Installation of Armbian in the first post in this series.

    An Ethernet connection must be used to setup the WiFi connection. By default, the Ethernet interface will obtain a dynamic IP address from the dhcp server on the LAN. In my case is showed up at 192.168.0.133 which had already been used for another device with ssh service enabled.

    michel@hp:~$ ssh orangepi@192.168.0.133 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is 5d:37:55:eb:a3:f8:f4:32:ba:89:aa:20:3e:d7:70:8c. Please contact your system administrator. Add correct host key in /home/michel/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/michel/.ssh/known_hosts:24 remove with: ssh-keygen -f "/home/michel/.ssh/known_hosts" -R 192.168.0.133 ECDSA host key for 192.168.0.133 has changed and you have requested strict checking. Host key verification failed. michel@hp:~$ ssh-keygen -f "/home/michel/.ssh/known_hosts" -R 192.168.0.133 # Host 192.168.0.133 found: line 24 type ECDSA /home/michel/.ssh/known_hosts updated. Original contents retained as /home/michel/.ssh/known_hosts.old michel@hp:~$ ssh orangepi@192.168.0.133 The authenticity of host '192.168.0.133 (192.168.0.133)' can't be established. ECDSA key fingerprint is 5d:37:55:eb:a3:f8:f4:32:ba:89:aa:20:3e:d7:70:8c. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.0.133' (ECDSA) to the list of known hosts. orangepi@192.168.0.133's password: orangepi not shown on the screen The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. *********************************************** WARNING: TO RESIZE FILESYSTEM RUN: sudo fs_resize or sudo /usr/local/bin/fs_resize to remove this message run: sudo rm /usr/local/bin/fs_resize_warning *********************************************** orangepi@OrangePI:~$ passwd Changing password for orangepi. (current) UNIX password: orangepi not shown on screen Enter new UNIX password: new_password not shown on screen Retype new UNIX password: new_password not shown on screen passwd: password updated successfully orangepi@OrangePI:~$ uname -a Linux OrangePI 3.4.39 #2 SMP PREEMPT Mon Nov 21 16:23:11 CST 2016 armv7l GNU/Linux orangepi@OrangePI:~$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie

    So it appears that is Raspian 8.0, basically Debian 8.0 jessie with version 3.4.39 of the Linux kernel. It is not the latest version available for the Raspberry Pi which is Raspian 9.0 based on Debian 9 stretch.

  5. Enabling WiFi
  6. Here is what I found about the Ethernet and WiFi interfaces. If both are enabled and their default configuration is not changed, then they work. If static IP addresses are given to both, then they both work, provided the Ethernet connection is used. Finally, it is possible to have a static IP address with the WiFi interface as long as the Ethernet interface uses a dynamic IP address. In that case, it is not necessary to use the Ethernet interface.

    Modifying the network is done with Net manaager as in Armbian. However, ifconfig is not present, so I used ip to get information about the interfaces.

    orangepi@OrangePI:~$ ip addr show 1: lo: mtu 16436 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether c2:53:05:ea:bd:c5 brd ff:ff:ff:ff:ff:ff inet 192.168.0.133/24 brd 192.168.0.255 scope global eth0 inet6 2607:fea8:f180:c5a::5/128 scope global dynamic valid_lft 569921sec preferred_lft 137921sec inet6 fd00:fc:8d4f:71b2:c053:5ff:feea:bdc5/128 scope global dynamic valid_lft 535351sec preferred_lft 401494sec inet6 2607:fea8:f180:c5a:c053:5ff:feea:bdc5/128 scope global dynamic valid_lft 570121sec preferred_lft 138121sec inet6 fe80::c053:5ff:feea:bdc5/64 scope link valid_lft forever preferred_lft forever 3: tunl0: mtu 1480 qdisc noop state DOWN group default link/ipip 0.0.0.0 brd 0.0.0.0 4: gre0: mtu 1476 qdisc noop state DOWN group default link/gre 0.0.0.0 brd 0.0.0.0 5: sit0: mtu 1480 qdisc noop state DOWN group default link/sit 0.0.0.0 brd 0.0.0.0 6: ip6tnl0: mtu 1452 qdisc noop state DOWN group default link/tunnel6 :: brd :: 7: wlan2: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether c0:53:05:ea:bd:c4 brd ff:ff:ff:ff:ff:ff 8: p2p0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether c0:53:05:ea:bd:c5 brd ff:ff:ff:ff:ff:ff orangepi@OrangePI:~$

    Since writing this, I have found out that ifconfig is usually installed in the /sbin directory and that the latter may not have been part of the PATH environment variable. The command echo $PATH will display the current search path. I no longer have this image on an SD card to check.

    If ifconfig is indeed in /sbin (or elsewhere for that matter), it is a relatively simple matter to add that directory to the search path:

    orangepi@OrangePI:~$ PATH=$PATH:/sin orangepi@OrangePI:~$ export PATH
    Look up on the web how to make this change permanent if desired.

    Use Network Manager to manage (duh!) the interfaces.

    orangepi@OrangePI:~$ sudo nmtui sudo: unable to resolve host OrangePI [sudo] password for orangepi:

    In the main menu of nmtui (tui for Text User Interface I suppose) select Edit a connection then press <OK>.

    To set a static IP address for the WiFi interface and to enable it edit the Wi-Fi connection making sure to select the correct wireless network in the displayed list.

    I then selected the type of Security (WPA2 Personal and entered the network password.

    The WI-FI section can be hidden (<Hide>) while the IPv4 CONFIGURATION section can be shown (<Show>).

    You must change the IPv4 configuration to <Manual> and enter the desired IP address. Here I entered 192.168.1.31/24. The /24 corresponds to a network mask of 24 bits: 255.255.255.0. Not shown in the image, the gateway was set to 192.168.1.1 while no DNS servers were added.

    I left the Ethernet connection unchanged. In other words, it will obtain a dynamic IP address form the DHCP server on the network router. Finally to restart the network I use the following command

    michel@domopiz:~$ sudo service network-manager restart

    Finally, I used nmtui to change the name of the host that is now domopiz.

  7. Observations
  8. Installing Raspian Server image from OrangePi.org did help me understand a bit better the limitations of the OPiZ network interfaces.

    However, I did not discern any real benefit over the DietPi offering for the OPiz. Indeed trying to install some packages it became obvious that this distribution from OrangePi.org was rather sparse.

    I decided to revert to the DietPi distribution.

<-Google Assistant on an Orange Pi Zero running DietPi