NanoPi NEO LTS

NanoPi は Raspberry Pi よりも小型で安価なシングルボードコンピューター。
中国広東省の FriendlyElec 社

## NanoPi

* NEO
* Zero2
* 

### NanoPi NEO LTS
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
* 本体 ＄15.00
* ヒートシンク（NanoPi NEO/NEO2/Air/NEO Plus2用） (+＄2.97)
* 透明アクリルケース（NanoPi NEO/NEO2/Air用） (+＄0.99)
* 4層デュアルスタックアクリルケース for Cluster DIY (+＄9.99)
* SanDisk Ultra 32G Class 10 UHS-I MicroSDHC メモリーカード (+＄7.99)
* 5V 3A ユニバーサル USB ポート電源アダプター (+＄8.97)
* Hi-quality MicroUSB ケーブル (+＄1.97)
* Power Dock for NanoPi NEO/NEO2/Air (+＄12.00)
* NanoHat OLED for NanoPi NEO/NEO2/NEO Plus2 (+＄6.99)
* NanoHat Proto for NanoPi NEO/NEO2/Air/NEO Plus2 (+＄2.99)
* NanoHat Hub for NanoPi NEO/NEO2/Air/NEO Plus2 (+＄12.99)
* NanoHat PCM5102A (+＄9.99)
* NEO Project Super Starter Kit (+＄19.99)

## 購入方法
### 公式サイト
https://www.friendlyelec.com/index.php?route=product/product&product_id=132

### Amazon
https://amzn.to/3YCQaIS

### 秋月電子
https://akizukidenshi.com/catalog/g/g112301/
￥3,580(税込)


## OS イメージの書き込み
### イメージファイルのダウンロード
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO#Downloads
https://download.friendlyelec.com/NanoPiNEO から img.gz をダウンロードする。
|||
|---|---|
|h3-sd-debian-bookworm-core-4.14-armhf-YYYYMMDD.img.gz|Debian12 core|
|h3-sd-debian-jessie-3.4-armhf-YYYYMMDD.img.gz        |Debian8 Desktop|
|h3-sd-debian-jessie-4.14-armhf-YYYYMMDD.img.gz       |Debian8 Desktop|
|h3-sd-friendlycore-focal-4.14-armhf-YYYYMMDD.img.gz  |FriendlyCore, based on ubuntu focal|
|h3-sd-friendlycore-jammy-4.14-armhf-YYYYMMDD.img.gz  |FriendlyCore, based on ubuntu jammy|
|h3-sd-friendlycore-xenial-4.14-armhf-YYYYMMDD.img.gz |FriendlyCore, based on ubuntu xenial|
|h3-sd-friendlycore-xenial-3.4-armhf-YYYYMMDD.img.gz  |FriendlyCore, based on ubuntu xenial|
|h3-sd-friendlywrt-4.14-armhf-YYYYMMDD.img.gz         |base on openwrt|
|h3-sd-ubuntu-noble-core-YYYYMMDD.img.gz              |Ubuntu|

##### Raspberry Pi Imager
```zsh
brew install raspberry-pi-imager
```

##### dd
```zsh
diskutil list external
```
```
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *61.9 GB    disk2
```
```zsh
gunzip -c xxxxxxxx.img.gz | sudo dd of=/dev/disk2 bs=16m
```
```zsh
diskutil unmountDisk /dev/disk2
```


### ローカルPCのIPアドレスの確認
#### macOS
##### ifconfig コマンド
```zsh
ifconfig en0 inet | awk '/inet / {print $2}'
```
```
192.168.0.2
```
:::note
その他の方法
##### networksetup コマンド
```zsh
networksetup -getinfo Wi-Fi | awk '/^IP / {print $3}'
```
:::

### IPレンジの取得
```zsh
ifconfig en0 inet | awk '/inet / {sub(/\.[0-9]+$/, ".0/24", $2); print $2}'
```
```
192.168.0.0/24
```

#### nmap
```zsh
nmap -sn $(ifconfig en0 inet | awk '/inet / {sub(/\.[0-9]+$/, ".0/24", $2); print $2}')
```
```
Starting Nmap 7.95 ( https://nmap.org ) at 2024-10-21 09:00 JST
Nmap scan report for 192.168.0.2
Host is up (0.0091s latency).
Nmap scan report for 192.168.0.3
Host is up (0.0084s latency).
Nmap scan report for 192.168.0.4
Host is up (0.00010s latency).
Nmap scan report for 192.168.0.5
Host is up (0.082s latency).
Nmap scan report for 192.168.0.10
Host is up (0.079s latency).
Nmap done: 256 IP addresses (5 hosts up) scanned in 11.50 seconds
```

#### Angry IP Scanner
```zsh
brew install angry-ip-scanner
```
[https://angryip.org/](https://angryip.org/)

## NanoPi NEO へのログイン
```zsh
ssh pi@192.168.0.10
```
```
pi@192.168.0.10's password: pi
 _____     _                _ _       _____ _     _____ ____
|  ___| __(_) ___ _ __   __| | |_   _| ____| |   | ____/ ___|
| |_ | '__| |/ _ \ '_ \ / _` | | | | |  _| | |   |  _|| |
|  _|| |  | |  __/ | | | (_| | | |_| | |___| |___| |__| |___
|_|  |_|  |_|\___|_| |_|\__,_|_|\__, |_____|_____|_____\____|
                                |___/

Welcome to Ubuntu 20.04 LTS 4.14.111
System load:   0.00            	Up time:       5 min		Local users:   1
Memory usage:  15 % of 491Mb  	IP:            192.168.0.10
CPU temp:      23°C
Usage of /:    2% of 56G

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

Last login: Thu May 27 15:16:31 2021
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

pi@NanoPi-NEO:~$
```