On the computer Board NanoPi NEO2 there are 4 pins onboard to connect to the debug console, standard GND, 5V, RXD and TXD. FriendlyElec offers two official devices for connection:

  • USB2UART (small USB-dongle with power switch and 4 pins GND, 5V, TXD, RXD);
  • PSU-ONECOM (small board with full-sized DB9-male connector for COM port connection).

Both devices with small reservations can be used to power NanoPi NEO2. USB2UART itself is powered by USB port and can power NanoPi NEO2 but with current limit 500mA. PSU-ONECOM requires a separate stabilized 5V power supply to operating.

You can also use any console cable for debugging on chips FTDI FT232RL, CH340 and PL2303. When connecting from Linux – there is no difference which cable to use, because the kernel contains drivers for all three. And if you plan to connect from under Windows – the difference is:

  • with chip FTDI FT232RL no problems no OS X nor Windows, the normal driver is, even for Windows 10 (official driver CDM v2.12.28 WHQL Certified.zip);
  • with official board USB2UART (on-chip CH340T) also no problems no OS X (mac OS Mojave everything worked out of the box) nor in the Windows (the official driver CH341SER.zip);
  • with adapters on chips Prolific PL2303 in Windows 10 everything was bad – the driver was installed, but did not start (error: Code 10).

So if you buy small SBC (single-board computer) – order along with original USB2UART , the more that it costs only 4$. Money is small, and time and nerves timely purchase can save.

A quick overview of the adapters

The photos show three adapters:

  • Universal adapter on the chip FTDI FT232RL (left in the photos). These adapter can work with both 3.3 V and 5V TTL signal levels, and the corresponding jumper is used for switching. A feature of the adapter that the chip FT232RL has pins for all signal lines DTR, RTS, RI, DSR, DCD, CTS, TXD, RXD, 5V and GND and no only standard TXD, RXD, 5V and GND. Unfortunately, the manufacturer of this adapter is not known. Schematically something similar to the Italian MicroBot MR002-003.2 , but there are no corresponding labels on the board.
  • Original adapter from FriendlyElec PSU-ONECOM (right in the photos). As it turned out the thing is useless to me. Computers with live COM-ports I do not have, and to use this adapter through Moxa UPort makes no sense. In addition to this adapter you will also need a separate power supply.
  • Original adapter FriendlyElec Matrix USB2UART v1.1 1704 . From the series of cheap but cheerful. As mentioned earlier, the chip on the adapter is installed CH340T, there are no problems with the drivers. To connect to NanoPi NEO2 we will use it.

Preparing the connection cable

In connecting the adapter to NanoPi NEO2 nothing complicated, the main black wiring to connect to the pin with the ground (GND) on both devices. But connecting the adapter cable in this way, we will not be able to connect the hat NanoHat OLED to our NanoPi NEO2, because the connector will interfere.

To solve this problem, take everything at hand and build a short cable of 10-centimeter leashes. On the one hand 4-pin pad, which will connect to the adapter USB2UART, and on the other hand just 4 crimped wiring in a shrink tube.

Crimped connectors under shrink tube need to bend at an angle of 135 degrees, in order to put on the connector NanoPi NEO2 they did not interfere with the installation of hat NanoHat OLED. Yellow and white wires, unfortunately, were not available, so we have a light gray instead of white and brown instead of yellow.

By connecting the resulting cable to NanoPi NEO2 you can gently connect the top hat NanoHat OLED. When the cable is not needed – you can carefully hide it inside the case.

Connecting the adapter to a Linux computer

Before connecting the adapter to NanoPi NEO2 - short with jumper pins TXD and RXD on the adapter and connect it to your computer. This is necessary to verify the health of the adapter. Having closed conclusions TXD and RXD we will make everything that we transfer to COM-port, came back to us back. So when we connect the terminal to our virtual COM-port, all that we will enter on the keyboard – will be displayed on the screen. If the entered text appears on the screen - then the drivers are installed correctly and the adapter works.

When connecting the adapter to a computer with a Linux operating system – let's see if our adapter is correct, let's see what device file was created for the virtual COM-port and try to connect to it.

wakko@radio:~$ dmesg -T
[Tue Mar 08 17:32:31 2019] usb 2-1.4: new full-speed USB device number 122 using ehci-pci
[Tue Mar 08 17:32:31 2019] usb 2-1.4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63
[Tue Mar 08 17:32:31 2019] usb 2-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[Tue Mar 08 17:32:31 2019] usb 2-1.4: Product: USB2.0-Serial
[Tue Mar 08 17:32:31 2019] usbcore: registered new interface driver ch341
[Tue Mar 08 17:32:31 2019] usbserial: USB Serial support registered for ch341-uart
[Tue Mar 08 17:32:31 2019] ch341 2-1.4:1.0: ch341-uart converter detected
[Tue Mar 08 17:32:31 2019] usb 2-1.4: ch341-uart converter now attached to ttyUSB0

wakko@radio:~$ lsusb | grep Serial
Bus 002 Device 122: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

wakko@radio:~$ ls -alh /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 2019-03-27 /dev/ttyUSB0

wakko@radio:~$ picocom --baud 115200 /dev/ttyUSB0
picocom v3.1

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready

test

After running picocom try typing something on the keyboard. If the typed text is displayed, then all is well. To exit picocom, press Ctrl+A and then Ctrl+Q.

I advise you to use the picocom utility instead of minicom for two reasons: first, picocom correct work with Russian symbols and unicode-console, and secondly, correct work with colors. Using picocom allows you to normally use even the utility Midnight Commander, and if you run mc by connecting via minicom – you will see only pain (gone pseudo-graphics and incorrect display of unicode-characters).

Connecting the adapter to your macOS

After connecting the adapter to a macOS computer, firstly let's see what device file was created for the virtual COM-port and try to connect to it.

wakko@wakko-imbp:~$ ls -alh /dev/tty.usbserial-*
crw-rw-rw-  1 root  wheel   19,   8 Mar 27 17:42 /dev/tty.usbserial-1420

wakko@wakko-imbp:~$ picocom --baud 115200 /dev/tty.usbserial-1420 --quiet

test

Всё точно так же как и в Linux. picocom под macOS можно установить командой sudo port install picocom, если вы пользуетесь MacPorts или командой brew install picocom, если вы пользуетесь Homebrew . Everything is exactly the same as in Linux. picocom under macOS can be installed with sudo port install picocom command if you use MacPorts or the brew install picocom command if you use Homebrew .

Connecting the adapter to a Windows computer

With connection adapter to Windows also, any difficulties should not be. Open the page with official drivers, download the file CH341SER.zip, unpack the archive, extract the installer from the archive and install the driver. After that, connect the adapter and from the command prompt run the Device Manager with command devmgmt.msc.

In the Ports COM and LPT section of the Device Manager, see which COM-port number is assigned to the adapter. In my case it's COM 7. Open the properties of the device USB-SERIAL CH340, open the tab Port Settings and set the port speed to 115200 bit per second.

Next, run PuTTY, select the connection type Serial, specify our port to connect COM7 and port speed 115200, then click on the Open button. After connecting in the PuTTY window, enter any text and make sure that the connection is working.

Connecting to NanoPi NEO2 console

After making sure that the adapter is working – turn the power switch to the off, connect it to NanoPi NEO2, run the terminal program (picocom or PuTTY) and – turn the switch back to the on position.

wakko@radio:~$ picocom --baud 115200 /dev/ttyUSB0 --quiet

U-Boot SPL 2017.11 (Oct 11 2018 - 15:51:54)
DRAM: 1024 MiB(504MHz)
CPU Freq: 408MHz
memory test: 1
Pattern 55aa  Writing...Reading...OK
Trying to boot from MMC1
Boot device: sd
NOTICE:  BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000)
NOTICE:  Configuring SPC Controller
NOTICE:  BL3-1: v1.0(debug):0fc0ec6
NOTICE:  BL3-1: Built : 10:41:01, Dec 13 2017
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9

U-Boot 2017.11 (Oct 11 2018 - 15:51:54 +0800) Allwinner Technology

CPU:   Allwinner H5 (SUN50I)
Model: FriendlyElec NanoPi H5
DRAM:  1 GiB
CPU Freq: 1008MHz
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
BOARD: nanopi-neo2-v1.1
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
1191 bytes read in 19 ms (60.5 KiB/s)
## Executing script at 4fc00000
reading Image
13727752 bytes read in 609 ms (21.5 MiB/s)
reading rootfs.cpio.gz
4508371 bytes read in 215 ms (20 MiB/s)
reading sun50i-h5-nanopi-neo2.dtb
32792 bytes read in 27 ms (1.2 MiB/s)
reading overlays/sun50i-h5-gpio-dvfs-overlay.dtb
1085 bytes read in 31 ms (34.2 KiB/s)
## Flattened Device Tree blob at 48000000
   Booting using the fdt blob at 0x48000000
   Loading Ramdisk to 49b00000, end 4a000000 ... OK
   reserving fdt memory region: addr=48000000 size=11000
   Loading Device Tree to 0000000049aec000, end 0000000049afffff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.52 (root@wwd) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)) #1 SMP Thu Oct 11 15:51:48 CST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: FriendlyElec NanoPi-NEO2
[    0.000000] cma: Reserved 64 MiB at 0x000000007c000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 21 pages/cpu @ffff80003bf72000 s46232 r8192 d31592 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait fsck.repair=yes panic=10 fbcon=map:0
[    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] log_buf_len min size: 16384 bytes
[    0.000000] log_buf_len: 32768 bytes
[    0.000000] early log buf free: 14828(90%)
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 945416K/1048576K available (9022K kernel code, 734K rwdata, 3072K rodata, 512K init, 413K bss, 37624K reserved, 65536K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008950000   (  9024 KB)
[    0.000000]     .rodata : 0xffff000008950000 - 0xffff000008c60000   (  3136 KB)
[    0.000000]       .init : 0xffff000008c60000 - 0xffff000008ce0000   (   512 KB)
[    0.000000]       .data : 0xffff000008ce0000 - 0xffff000008d97808   (   735 KB)
[    0.000000]        .bss : 0xffff000008d97808 - 0xffff000008dfef40   (   414 KB)
[    0.000000]     fixed   : 0xffff7dfffe7fb000 - 0xffff7dfffec00000   (  4116 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000000000 - 0xffff7e0001000000   (    16 MB actual)
[    0.000000]     memory  : 0xffff800000000000 - 0xffff800040000000   (  1024 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000156] Console: colour dummy device 80x25
[    0.000181] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000191] pid_max: default: 32768 minimum: 301
[    0.000285] Security Framework initialized
[    0.000297] AppArmor: AppArmor disabled by boot time parameter
[    0.000344] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000359] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001468] ASID allocator initialised with 32768 entries
[    0.001528] Hierarchical SRCU implementation.
[    0.001869] smp: Bringing up secondary CPUs ...
[    0.002912] Detected VIPT I-cache on CPU1
[    0.002967] CPU1: Booted secondary processor [410fd034]
[    0.003640] Detected VIPT I-cache on CPU2
[    0.003665] CPU2: Booted secondary processor [410fd034]
[    0.004331] Detected VIPT I-cache on CPU3
[    0.004353] CPU3: Booted secondary processor [410fd034]
[    0.004406] smp: Brought up 1 node, 4 CPUs
[    0.004424] SMP: Total of 4 processors activated.
[    0.004430] CPU features: detected feature: 32-bit EL0 Support
[    0.004435] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.007411] CPU: All CPU(s) started at EL2
[    0.007426] alternatives: patching kernel code
[    0.008334] devtmpfs: initialized
[    0.012915] random: get_random_u32 called from bucket_table_alloc+0xf8/0x280 with crng_init=0
[    0.013449] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.013467] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.015540] pinctrl core: initialized pinctrl subsystem
[    0.016339] NET: Registered protocol family 16
[    0.017173] cpuidle: using governor menu
[    0.017840] vdso: 2 pages (1 code @ ffff000008956000, 1 data @ ffff000008ce4000)
[    0.017856] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.018724] DMA: preallocated 256 KiB pool for atomic allocations
[    0.018784] Serial: AMBA PL011 UART driver
[    0.029750] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.030570] reg-fixed-voltage gmac-3v3: could not find pctldev for node /soc/pinctrl@01c20800/gmac_power_pin@0, deferring probe
[    0.030915] gpio-regulator gpio-regulator: could not find pctldev for node /soc/pinctrl@01f02c00/regulator_pins@0, deferring probe
[    0.031228] SCSI subsystem initialized
[    0.031381] usbcore: registered new interface driver usbfs
[    0.031417] usbcore: registered new interface driver hub
[    0.031466] usbcore: registered new device driver usb
[    0.031634] media: Linux media interface: v0.10
[    0.031657] Linux video capture interface: v2.00
[    0.031725] pps_core: LinuxPPS API ver. 1 registered
[    0.031731] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.031744] PTP clock support registered
[    0.031968] Advanced Linux Sound Architecture Driver Initialized.
[    0.033060] clocksource: Switched to clocksource arch_sys_counter
[    0.033281] VFS: Disk quotas dquot_6.6.0
[    0.033336] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.033442] FS-Cache: Loaded
[    0.033595] CacheFiles: Loaded
[    0.038533] NET: Registered protocol family 2
[    0.038968] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.039037] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.039214] TCP: Hash tables configured (established 8192 bind 8192)
[    0.039344] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.039373] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.039544] NET: Registered protocol family 1
[    0.039879] RPC: Registered named UNIX socket transport module.
[    0.039885] RPC: Registered udp transport module.
[    0.039889] RPC: Registered tcp transport module.
[    0.039894] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.040066] Unpacking initramfs...
[    0.234396] Initramfs unpacking failed: junk in compressed archive
[    0.238051] Freeing initrd memory: 5120K
[    0.241928] audit: initializing netlink subsys (disabled)
[    0.242043] audit: type=2000 audit(0.240:1): state=initialized audit_enabled=0 res=1
[    0.242284] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.247638] FS-Cache: Netfs 'nfs' registered for caching
[    0.248044] NFS: Registering the id_resolver key type
[    0.248069] Key type id_resolver registered
[    0.248074] Key type id_legacy registered
[    0.248087] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.248093] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.252751] NET: Registered protocol family 38
[    0.252985] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.253109] io scheduler noop registered
[    0.253115] io scheduler deadline registered
[    0.253294] io scheduler cfq registered (default)
[    0.253299] io scheduler mq-deadline registered
[    0.253304] io scheduler kyber registered
[    0.253796] sun4i-usb-phy 1c19400.phy: Could not request ID GPIO, pinctrl may not init
[    0.255364] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    0.257913] sun50i-h5-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.263841] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.264781] console [ttyS0] disabled
[    0.284922] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 30, base_baud = 1500000) is a U6_16550A
[    1.058822] console [ttyS0] enabled
[    1.084639] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 31, base_baud = 1500000) is a U6_16550A
[    1.115767] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 32, base_baud = 1500000) is a U6_16550A
[    1.146937] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 33, base_baud = 1500000) is a U6_16550A
[    1.157819] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.164432] [drm] No driver support for vblank timestamp query.
[    1.177265] sun4i-drm display-engine: bound 1100000.mixer (ops sun8i_mixer_ops)
[    1.184740] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.192570] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops sun4i_tcon_ops)
[    1.321116] sun8i-dw-hdmi 1ee0000.hdmi: Detected HDMI TX controller v1.32a with HDCP (sun8i_dw_hdmi_phy)
[    1.330864] sun8i-dw-hdmi 1ee0000.hdmi: registered DesignWare HDMI I2C bus driver
[    1.338508] sun4i-drm display-engine: bound 1ee0000.hdmi (ops sun8i_dw_hdmi_ops)
[    1.345939] [drm] Cannot find any crtc or sizes - going 1920x1080
[    1.387284] Console: switching to colour frame buffer device 240x67
[    1.420594] sun4i-drm display-engine: fb0:  frame buffer device
[    1.426836] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.435457] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.445464] loop: module loaded
[    1.450265] libphy: Fixed MDIO Bus: probed
[    1.454945] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.461187] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.467713] ehci-platform: EHCI generic platform driver
[    1.473071] ehci-platform 1c1a000.usb: EHCI Host Controller
[    1.478656] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    1.486741] ehci-platform 1c1a000.usb: irq 12, io mem 0x01c1a000
[    1.505069] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    1.511753] hub 1-0:1.0: USB hub found
[    1.515542] hub 1-0:1.0: 1 port detected
[    1.520012] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.526231] ohci-platform: OHCI generic platform driver
[    1.531609] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    1.538233] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    1.546153] ohci-platform 1c1a400.usb: irq 13, io mem 0x01c1a400
[    1.613580] hub 2-0:1.0: USB hub found
[    1.617365] hub 2-0:1.0: 1 port detected
[    1.621867] usbcore: registered new interface driver uas
[    1.627241] usbcore: registered new interface driver usb-storage
[    1.633714] mousedev: PS/2 mouse device common for all mice
[    1.639645] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.646433] sun6i-rtc 1f00000.rtc: RTC enabled
[    1.650918] i2c /dev entries driver
[    1.655663] lirc_dev: IR Remote Control driver registered, major 244
[    1.662018] IR NEC protocol handler initialized
[    1.666546] IR RC5(x/sz) protocol handler initialized
[    1.671594] IR RC6 protocol handler initialized
[    1.676121] IR JVC protocol handler initialized
[    1.680649] IR Sony protocol handler initialized
[    1.685264] IR SANYO protocol handler initialized
[    1.689964] IR Sharp protocol handler initialized
[    1.694665] IR MCE Keyboard/mouse protocol handler initialized
[    1.700491] IR LIRC bridge handler initialized
[    1.704933] IR XMP protocol handler initialized
[    1.709509] usbcore: registered new interface driver ati_remote
[    1.715531] usbcore: registered new interface driver imon
[    1.720958] usbcore: registered new interface driver mceusb
[    1.726561] usbcore: registered new interface driver redrat3
[    1.732257] usbcore: registered new interface driver streamzap
[    1.738174] usbcore: registered new interface driver igorplugusb
[    1.744202] usbcore: registered new interface driver iguanair
[    1.749966] usbcore: registered new interface driver ttusbir
[    1.756170] thermal thermal_zone0: failed to read out thermal zone (-16)
[    1.763214] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.771506] sdhci: Secure Digital Host Controller Interface driver
[    1.777685] sdhci: Copyright(c) Pierre Ossman
[    1.782062] Synopsys Designware Multimedia Card Interface Driver
[    1.789144] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.833206] sunxi-mmc 1c0f000.mmc: base:0xffff000008e55000 irq:10
[    1.839490] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.845753] ledtrig-cpu: registered to indicate activity on CPUs
[    1.851973] hidraw: raw HID events driver (C) Jiri Kosina
[    1.857568] usbcore: registered new interface driver usbhid
[    1.863145] usbhid: USB HID core driver
[    1.879617] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.888174] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.893843] NET: Registered protocol family 10
[    1.910408] Segment Routing with IPv6
[    1.914157] NET: Registered protocol family 17
[    1.918928] 9pnet: Installing 9P2000 support
[    1.923252] Key type dns_resolver registered
[    1.928120] registered taskstats version 1
[    1.937664] Key type encrypted registered
[    1.947900] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.953776] dwmac-sun8i 1c30000.ethernet: Will use external PHY
[    1.967731] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.980546] mmc0: new high speed SDHC card at address aaaa
[    1.986436] mmcblk0: mmc0:aaaa SM32G 29.7 GiB 
[    1.992188]  mmcblk0: p1 p2
[    2.065228] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    2.070888] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    2.078109] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    2.083764] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    2.090981] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    2.095944] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    2.102800] libphy: stmmac: probed
[    2.110279] ehci-platform 1c1b000.usb: EHCI Host Controller
[    2.115881] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[    2.123993] ehci-platform 1c1b000.usb: irq 14, io mem 0x01c1b000
[    2.145066] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[    2.151697] hub 3-0:1.0: USB hub found
[    2.155472] hub 3-0:1.0: 1 port detected
[    2.159978] ehci-platform 1c1c000.usb: EHCI Host Controller
[    2.165568] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 4
[    2.173535] ehci-platform 1c1c000.usb: irq 16, io mem 0x01c1c000
[    2.193067] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    2.199628] hub 4-0:1.0: USB hub found
[    2.203400] hub 4-0:1.0: 1 port detected
[    2.207849] ehci-platform 1c1d000.usb: EHCI Host Controller
[    2.213432] ehci-platform 1c1d000.usb: new USB bus registered, assigned bus number 5
[    2.221391] ehci-platform 1c1d000.usb: irq 18, io mem 0x01c1d000
[    2.241071] ehci-platform 1c1d000.usb: USB 2.0 started, EHCI 1.00
[    2.247593] hub 5-0:1.0: USB hub found
[    2.251366] hub 5-0:1.0: 1 port detected
[    2.255787] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[    2.262412] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 6
[    2.270366] ohci-platform 1c1b400.usb: irq 15, io mem 0x01c1b400
[    2.337532] hub 6-0:1.0: USB hub found
[    2.341310] hub 6-0:1.0: 1 port detected
[    2.345755] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    2.352378] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 7
[    2.360375] ohci-platform 1c1c400.usb: irq 17, io mem 0x01c1c400
[    2.429540] hub 7-0:1.0: USB hub found
[    2.433314] hub 7-0:1.0: 1 port detected
[    2.437775] ohci-platform 1c1d400.usb: Generic Platform OHCI controller
[    2.444399] ohci-platform 1c1d400.usb: new USB bus registered, assigned bus number 8
[    2.452372] ohci-platform 1c1d400.usb: irq 19, io mem 0x01c1d400
[    2.521506] hub 8-0:1.0: USB hub found
[    2.525279] hub 8-0:1.0: 1 port detected
[    2.529735] usb_phy_generic usb_phy_generic.3.auto: usb_phy_generic.3.auto supply vcc not found, using dummy regulator
[    2.540680] musb-hdrc musb-hdrc.4.auto: MUSB HDRC host driver
[    2.546431] musb-hdrc musb-hdrc.4.auto: new USB bus registered, assigned bus number 9
[    2.554703] hub 9-0:1.0: USB hub found
[    2.558483] hub 9-0:1.0: 1 port detected
[    2.565222] input: r-gpio-keys as /devices/platform/r-gpio-keys/input/input0
[    2.572669] usb0-vbus: disabling
[    2.575909] ALSA device list:
[    2.578875]   #0: Dummy 1
[    2.581497]   #1: Loopback 1
[    2.584371]   #2: H3 Audio Codec
[    2.588183] Freeing unused kernel memory: 512K
Loading, please wait...
starting version 229
[    2.658372] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.661821] random: udevadm: uninitialized urandom read (16 bytes read)
[    2.661978] random: udevadm: uninitialized urandom read (16 bytes read)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p2] fsck.ext4 -y -C0 /dev/mmcblk0p2 
e2fsck 1.42.13 (17-May-2015)
rootfs: clean, 69917/1896000 files, 648349/7760000 blocks (check after next mount)
[    3.190212] random: fast init done
done.
[    3.215784] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.239402] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[    3.658236] systemd[1]: System time before build time, advancing clock.
[    3.780992] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    3.799296] systemd[1]: Detected architecture arm64.

Welcome to Ubuntu 16.04.6 LTS!

[    3.823527] systemd[1]: Set hostname to <NanoPi-NEO2>.
[    4.207253] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    4.227141] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    4.245270] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    4.262480] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    4.279249] systemd[1]: Starting Set console keymap...
         Starting Set console keymap...
[    4.297829] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
         Mounting Debug File System...
[  OK  ] Listening on Journal Socket (/dev/log).
         Mounting POSIX Message Queue File System...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Encrypted Volumes.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Reached target Paths.
         Starting Load Kernel Modules...
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-spyserver.slice.
[  OK  ] Set up automount Arbitrary Executab...ats File System Automount Point.
[  OK  ] [    4.516202] Mass Storage Function, version: 2009/09/11
Created slice User and Session Slice.
[    4.521636] LUN: removable file: (no medium)
[    4.529381] LUN: file: /dev/mmcblk0p1
[    4.533070] Number of LUNs=1
[  OK  [    4.536098] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
] Reached target Slices.
[    4.544528] g_mass_storage gadget: userspace failed to provide iSerialNumber
[    4.553811] g_mass_storage gadget: g_mass_storage ready
[  OK  ] Listening on udev Kernel Socket.
         Mounting Huge Pages File System...
         Starting Create list of required st... nodes for the current kernel...
         Starting Journal Service...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Started Set console keymap.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create list of required sta...ce nodes for the current kernel.
[  OK  ] Started Journal Service.
         Starting Create Static Device Nodes in /dev...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Activating swap /mnt/512MB.swap...
         Starting Flush Journal to Persistent Storage...
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Activated swap /mnt/512MB.swap.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Swap.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Reached target Sound Card.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/mmcblk0p1.
         Mounting /boot...
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Mounted /boot.
[  OK  ] Reached target Local File Systems.
         Starting Raise network interfaces...
         Starting Set console font and keymap...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Time Synchronization...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting Restore /etc/resolv.conf i...re the ppp link was shut down...
         Starting LSB: Start busybox udhcpd at boot time...
         Starting Permit User Sessions...
         Starting Login Service...
         Starting LSB: select system audio output at first boot...
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
         Starting Modem Manager...
         Starting brcm_patchram_plus...
         Starting Save/Restore Sound Card State...
[  OK  ] Started D-Bus System Message Bus.
         Starting Network Manager...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Restore /etc/resolv.conf if...fore the ppp link was shut down.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started LSB: select system audio output at first boot.
[  OK  ] Started brcm_patchram_plus.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started LSB: Start busybox udhcpd at boot time.
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
[  OK  ] Started Login Service.
         Starting Authenticate and Authorize Users to Run Privileged Tasks...
         Starting Set console scheme...
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Set console scheme.
[  OK  ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Started Network Manager.
         Starting Network Manager Script Dispatcher Service...
         Starting Network Manager Wait Online...
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started Network Manager Script Dispatcher Service.
         Starting Hostname Service...
[  OK  ] Started Modem Manager.
[  OK  ] Started Hostname Service.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
         Starting LSB: Advanced IEEE 802.11 management daemon...
         Starting /etc/rc.local Compatibility...
         Starting LSB: disk temperature monitoring daemon...
[  OK  ] Started Spy Server.
[    8.368710] rc.local[551]: ctp = 0
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.
[  OK  ] Created slice User Slice of wakko.
         Starting User Manager for UID 1000...
[  OK  ] Started Session 1 of user wakko.
[  OK  ] Started User Manager for UID 1000.

Ubuntu 16.04.6 LTS NanoPi-NEO2 ttyS0

NanoPi-NEO2 login: wakko (automatic login)

Last login: Mon Mar 08 19:06:03 MSK 2019
 _____     _                _ _       _____ _     _____ ____ 
|  ___| __(_) ___ _ __   __| | |_   _| ____| |   | ____/ ___|
| |_ | '__| |/ _ \ '_ \ / _` | | | | |  _| | |   |  _|| |    
|  _|| |  | |  __/ | | | (_| | | |_| | |___| |___| |__| |___ 
|_|  |_|  |_|\___|_| |_|\__,_|_|\__, |_____|_____|_____\____|
                                |___/                        

Welcome to Ubuntu 16.04.6 LTS 4.14.52
System load:   0.08             Up time:       10 sec       
Memory usage:  4 % of 992Mb     IP:            
CPU temp:      14°C             
Usage of /:    7% of 30G        

 * Documentation: http://wiki.friendlyarm.com/Ubuntu
 * Forum: http://www.friendlyarm.com/Forum/

wakko@NanoPi-NEO2:~$

As you can see, everything turned out, we successfully connected to the console NanoPi NEO2 through the console port for debugging.

The enhancement of the console

If you set up the bash working environment with this note, then this section can be skipped – the console will be colored, all the necessary changes have already been made to the files ~/.config/bashrc.d/02-terminal and ~/.config/bashrc.d/06-serial.

As you can see in the screenshot, picocom is able to display different colors, but the console itself is black and white. You can see this from the prompt line.

If we run Midnight Commander - it will also be first black and white, and secondly not full screen.

First, let's add console colors. Colors in the console are automatically turned on when connected with the variable TERM=xterm-color|*-256color, make sure that TERM=vt220 is also considered a color:

wakko@NanoPi-NEO2:~$ nano -w ~/.bashrc
@@ -12,6 +12,7 @@
 # set a fancy prompt (non-color, unless we know we "want" color)
 case "$TERM" in
     xterm-color|*-256color) color_prompt=yes;;
+    vt220) color_prompt=yes;
 esac

This fix is sufficient to color the prompt line, but not enough to color Midnight Commander and output the ls command. To color the output of the ls command and Midnight Commander, add to the file ~/.bashrc the following lines:

res() {
    old=$(stty -g)
    stty raw -echo min 0 time 5

    printf '\0337\033[r\033[999;999H\033[6n\0338' > /dev/tty
    IFS='[;R' read -r _ rows cols _ < /dev/tty

    stty "$old"
    stty cols "$cols" rows "$rows"
}

res2() {
    old=$(stty -g)
    stty raw -echo min 0 time 5

    printf '\033[18t' > /dev/tty
    IFS=';t' read -r _ rows cols _ < /dev/tty

    stty "$old"
    stty cols "$cols" rows "$rows"
}

TTY=$(tty)
TMP=${TTY:5}

if [[ "$TMP" == "ttyS"* ]]; then
    eval "$(TERM=linux dircolors -b)"
    unalias mc >/dev/null
    unalias mcdiff >/dev/null
    unalias mcedit >/dev/null
    unalias mcview >/dev/null
    alias mc='TERM=xterm mc --color -S default'
    alias mcdiff='TERM=xterm mcdiff --color -S default'
    alias mcedit='TERM=xterm mcedit --color -S default'
    alias mcview='TERM=xterm mcview --color -S default'

    res
fi

I will describe in a nutshell what we have achieved with this script:

  • Made the dircolors command think that we have a color terminal, and therefore the LS_COLORS environment variable will have colors for coloring the output of the ls command;
  • Forced Midnight Commander to think that we have a color terminal, just forcibly turned on the default skin. Since if you have in normal life selected 256-color skin in mc, for example xoria256, then each time you run mc we would get a error message Unable to use 'xoria256' skin with 256 colors support on non-256 colors terminal. Default skin has been loaded. And the variable TERM=xterm for Midnight Commander we set to work correctly keyboard keys Home/End, Alt+Arrows and others.
  • The functions res() and res2() are essentially the same, but are written slightly different. When we connect via ssh to a remote computer, we pass the value of the COLUMNS and LINES variables from the client, which contain the real value of the window size of our terminal. Therefore, Midnight Commander correctly opens in full screen when connected via ssh. When connecting via COM-port, these variables are set to the standard values COLUMNS=80 and LINES=24. Therefore Midnight Commander opens in a crooked size. To avoid this, the functions res() and res2() experimentally calculate the size of the terminal window and write the correct values to the variables COLUMNS and LINES. Therefore, after you manually change the size of the terminal window (change the size of the PuTTY window with the mouse, for example) – you need to manually run the command res or res2.

In order to apply all these changes – just press Ctrl+D, in order to log out and log in.

The final version was something like this:

The output in the console when you shutting down NanoPi NEO2

If you send the command poweroff, the output of the command to the console will be as follows:

wakko@NanoPi-NEO2:~$ sudo poweroff 
[  OK  ] Stopped target Sound Card.
         Stopping Save/Restore Sound Card State...
         Stopping Session 1 of user wakko.
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Multi-User System.
         Stopping brcm_patchram_plus...
         Stopping Modem Manager...
         Stopping LSB: Set the CPU Frequency Scaling governor to "ondemand"...
         Stopping LSB: disk temperature monitoring daemon..
         Stopping Session 24 of user wakko.
         Stopping Authenticate and Authorize Users to Run Privileged Tasks...
[  OK  ] Stopped target Login Prompts.
         Stopping Serial Getty on ttyS0...
         Stopping LSB: Advanced IEEE 802.11 management daemon...
         Stopping OpenBSD Secure Shell server...
         Stopping Getty on tty1...
         Stopping User Manager for UID 1000...
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping LSB: select system audio output at first boot...
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped Daily apt upgrade and clean activities.
[  OK  ] Stopped Daily apt download activities.
[  OK  ] Stopped target System Time Synchronized.
[  OK  ] Stopped Modem Manager.
[  OK  ] Stopped Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped User Manager for UID 1000.
[  OK  ] Stopped Serial Getty on ttyS0.
[  OK  ] Stopped Save/Restore Sound Card State.
[  OK  ] Stopped Session 1 of user wakko.
[  OK  ] Stopped brcm_patchram_plus.
[  OK  ] Stopped Session 24 of user wakko.
[  OK  ] Stopped LSB: select system audio output at first boot.
[  OK  ] Stopped LSB: Set the CPU Frequency Scaling governor to "ondemand".
[  OK  ] Stopped LSB: disk temperature monitoring daemon.
[  OK  ] Stopped LSB: Start busybox udhcpd at boot time.
[  OK  ] Stopped LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Removed slice system-serial\x2dgetty.slice.
[  OK  ] Removed slice User Slice of wakko.
         Stopping Login Service...
         Stopping Permit User Sessions...
         Stopping /etc/rc.local Compatibility...
[  OK  ] Removed slice system-getty.slice.
[  OK  ] Stopped Login Service.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped /etc/rc.local Compatibility.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped Network Manager Wait Online.
[  OK  ] Stopped target Network.
         Stopping Network Manager...
         Stopping Raise network interfaces...
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped Network Manager.
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Sockets.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
         Stopping Network Time Synchronization...
[  OK  ] Stopped target Encrypted Volumes.
         Stopping Load/Save Random Seed...
[  OK  ] Stopped target Swap.
         Deactivating swap /mnt/512MB.swap...
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Raise network interfaces.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Deactivated swap /mnt/512MB.swap.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Unmounting /run/user/1000...
         Unmounting /boot...
[  OK  ] Unmounted /boot.
[  OK  ] Unmounted /run/user/1000.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[19333.164040] reboot: Power down
INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON
ERROR:   PSCI system shutdown: still alive ...

At what the computer NanoPi NEO2 is switched off, but on hat NanoHat LED continues to burn stopped the current time.

Other variants of the adapters

Were available more of those adapters:

  • 6-pin cable with chip FTDI FT232RL (left on first photo). A good adapter, but for our task is not suitable, because with the connected cable do not wear hat NanoHat OLED.
  • 4-pin cable with chip Prolific PL2303HX (right on the first photo). Adapter with problem drivers under Windows 10, not suitable for the same reason as the previous one.
  • USB to TTL module from iTead with chip Prolific PL2303HX (middle photo). The adapter is the same as USB2UART, the only catch is that it works with TTL levels 5V, and NanoPi NEO2 has 3.3V, i.e. we don't fit.
  • HC06 Serial Bluetooth module iTead (right photo). This module is supposed to fit, but I haven't got my hands on it yet.

Next Post Previous Post