使用 iPad 平板來遙控 Kodi

使用 Android 手機來遙控 Kodi 實在是太累了,畫面及按鍵都很小,常常會按錯,而且很傷眼,所以改用 iPad,畫面及按鍵都比 Android 大多了!
1. 首先在 Apple App Store 搜尋 Official Kodi Remote,按 取得

[@more@]2. 選擇 安裝

3. 選擇 開啟

4. Official Kodi Remote 執行畫面

5. 選擇 Add Host

6. 輸入 Kodi 相關連線資訊

7. 點選剛建立的連線

8. 連線成功後,選擇 REMOTE CONTROL

9. 控制介面,比 Android 好多了!

10. 鍵盤輸入畫面

11. 退出及關機

還有很多的功能,值得深入好好使用!

使用 Android 手機來遙控 Kodi

因為 Kodi 安裝完成後,就不接上鍵盤或是滑鼠了,改用手機來遙控會比較方便一些,而且 Kodi 雖然可以顯示中文,但卻無法輸入中文,這時候可以在手機中輸入後,再傳送到 Kodi。

在 Kodi 上要安裝 Web Server 功能
1. 選擇 系統 / 系統設定

[@more@]2. 選擇 服務

3. 選擇 Web 伺服器

4. 依序設定,允許 HTTP 遠端遙控,連接埠預設是 8080,這裡我更改成 80,
    帳號預設是 kodi 不做更改,設定密碼

5. 設定密碼畫面

在 Android 手機上設定
6. 開啟 Google Play 商店,搜尋 official xbmc remote,並安裝

7. 選擇 NEXT

8. 搜尋中

9. 設定相關資訊

10. 選擇右下方的 TEST

11. 測試連線

12. 連線成功,選擇 FINISH 結束

13. 已成功連線,可以使用上下左右鍵來控制

14. 按電源鈕

15. 可以控制 Kodi 關閉系統或關機

16. 按右上角

17. 可以隨擇 Send text to media center

18. 將打字傳送到 Kodi

19. 選擇 左上角

20. 可以做其它的設定

Kodi 使用介面中文化

Kodi 預設安裝完成,使用介面是英文的

底下稍做調整,把使用者介面改成中文的,更方便使用[@more@]

1. 選擇 SYSTEM / Settings

2. 選擇 Appearance

3. 選擇 Skin / Fonts,原本預設的字形是 Skin default

4. 把字形改成 Arial based

5. 預設字形已更改成 Airal based

6. 選擇 International

7. 選擇 Language,預設語言是 English

8. 改選 Chinese(Traditional)

9. 介面就已經更改為正體中文了,按右下角可以回主頁面!

10. 主頁面,可以用鍵盤或是滑鼠來進行控制。

安裝 Kodi for Windows

原本在家中的電視旁邊有放置一台小的 HTPC 電腦,當做影片播放器,但用的次數不是很多,覺得有些浪費,所以想改用 Banana Pi M2+ 來取代,但因為 M2+ 上擷圖比較麻煩,所以改用 Windows 平台來處理,之後實際運作的平台就會改在 Banana Pi M2+。

在 Banana Pi M2+ 可以使用 OpenELEC

關於 Kodi 的介紹可以參考 Kodi – 維基百科,自由的百科全書
Kodi 下載網站:https://kodi.tv/download/
支援的平台,這裡可以下載所須的版本
Current release: Kodi v16.1

Development builds: Kodi v17.0
[@more@]1. 執行下載下來的檔案

2. 安裝過程

3. 執行 Kodi,請選擇 允許存取

4. 執行畫面

5. 要退出可以選擇左下角的地方

Exit 退出 Kodi
Power of system 電腦關機

試用 Banana Pi M3 – DietPi dietpi-* 工具組

# /DietPi/dietpi/dietpi-autostart

# /DietPi/dietpi/dietpi-banner
———————————————————————–
 DietPi     | 15:17 | Sat 07/01/17
———————————————————————–
 V141       | OrangePi PC (armv7l)
———————————————————————–
 IP Address | 192.168.1.19
———————————————————————–[@more@]
# /DietPi/dietpi/dietpi-cleaner

# /DietPi/dietpi/dietpi-cpu_set

 DietPi-Cpu_Set
———————————————————————–
 Mode: Applying CPU gov
 Please wait…

 [Ok] CPU gov applied: interactive

# /DietPi/dietpi/dietpi-cpuinfo

———————————————————————————————-
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
———————————————————————————————-
 Architecture |     armv7l
 Temp         |     61’c | Running hot, not recommended.
 Governor     |     interactive

                 Current Freq    Min Freq   Max Freq
 CPU0         |      480 Mhz      480 Mhz    1800 Mhz
 CPU1         |      480 Mhz      480 Mhz    1800 Mhz
 CPU2         |      480 Mhz      480 Mhz    1800 Mhz
 CPU3         |      480 Mhz      480 Mhz    1800 Mhz
 CPU4         |      480 Mhz      480 Mhz    1800 Mhz
 CPU5         |      480 Mhz      480 Mhz    1800 Mhz
 CPU6         |      480 Mhz      480 Mhz    1800 Mhz
 CPU7         |      480 Mhz      480 Mhz    1800 Mhz

# /DietPi/dietpi/dietpi-cron

# /DietPi/dietpi/dietpi-drive_manager

# /DietPi/dietpi/dietpi-update

# /DietPi/dietpi/dietpi-logclear

 DietPi-Logclear
———————————————————————————————-
 Mode: Welcome
 Please wait…

 Available commands:

 dietpi-logclear 0
 Backup contents of all log files from /var/log to /root/logfile_storage/*.
 Also clears the contents of all logs files in /var/log.

 dietpi-logclear 1
 Clear contents of all logs files in /var/log.

 dietpi-logclear 2
 Physically delete all files in /var/log and backups in /root/logfile_storage/*.
 May prevent log files from being updated, restart services or reboot.

# /DietPi/dietpi/dietpi-process_tool

# /DietPi/dietpi/dietpi-survey
 [Info] Testing connection to dietpi.com
 [Info] Max duration of 20 seconds, please wait…
 [Ok] Connection test | Completed

# /DietPi/dietpi/dietpi-services

 DietPi-Services
———————————————————————————————-
 Mode:
 Please wait…

DietPi-Services
Available commands: start / stop / restart / enable / disable

# /DietPi/dietpi/dietpi-services mysql stop

 DietPi-Services
———————————————————————————————-
 Mode: mysql
 Please wait…

DietPi-Services
Available commands: start / stop / restart / enable / disable

# /DietPi/dietpi/dietpi-sync

# /DietPi/dietpi/dietpi-update

 DietPi-Update
————————————————————————–
 Mode: Checking for DietPi updates
 Please wait…

 [Info] Checking Mirror : http://dietpi.com/downloads/dietpi-update_mirror/master/server_version
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     5  100     5    0     0      4      0  0:00:01  0:00:01 –:–:–     4
 [Ok] Using update server: http://dietpi.com/downloads/dietpi-update_mirror/master/server_version

 [Ok] No updates required, your DietPi installation is up to date.

 [Info] Current Version : 141
 [Info] Server Version  : 141

試用 Banana Pi M3 – DietPi dietpi-software 安裝套件

DietPi 本身是 base on Debian,所以除了可以使用 apt / dpkg 來安裝及移除軟體外,也可以利用 dietpi-software 來安裝套件。
1. 執行
# /DietPi/dietpi/dietpi-software
  GPLv2 授權

[@more@]

選擇 Software Optimized

可以安裝的軟體套件組

這裡安裝的是 LLAP ( Linux + Lighttpd + MariaDB + PHP )

選擇 Install

確認

安裝過程

安裝完成後,系統會自動重新開機

檢查系統是否有正常安裝完成並啟動相關服務
# netstat -antulp | grep LISTEN
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1225/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1036/lighttpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      447/dropbear
tcp6       0      0 :::80                   :::*                    LISTEN      1036/lighttpd
tcp6       0      0 :::22                   :::*                    LISTEN      447/dropbear

試用 Banana Pi M3 – DietPi dietpi-config 設定工具

dietpi-config 是 DietPi 的設定工具。
1. 執行
# /DietPi/dietpi/dietpi-config
[@more@]1  Display Options(顯示選項)
    Change Resolution (改變解析度)
    GPU/RAM Memory Split (GPU / 記憶體分割)
    LCD Panel addon: none (增加 LCD Panel: 無)

不過這三個選項,在 Banana Pi M3 均無法設定

2  Audio Options(聲音選項)

    Soundcard : none (音效卡 : 無)

Performance Options (效能選項)

    Change CPU Governor : interactive ( 改變 CPU 調速器 : 互動式)    

    CPU 工作頻率調整,自動調整 / 省電型 / 高效能型

  CPU Throttle Up     : 50% ( CPU 運作頻率閥值)

   
    有效的設定範圍:30 ~ 95,建議設定值:Desktop = 50%,Server = 85%

  CPU Max Freq Limit  : Disabled (CPU 最大工作頻率限制:無)

4  Advanced Options ( 進階設定 )

    Swapfile size   : 100 MB ( 設定 Swapfile 大小 )

    Time sync mode  : Boot + Daily ( 時間同步的方式:開機 + 每天)

    Update firmware ( 更新韌體 )

    Bluetooth       : Enabled ( 藍芽 : 開啟 )

    Serial console : Disabled ( 串行控制台 : 取消 )

5  Language/Regional Options ( 語言/地區 選項 )

    Locale   Change Language and Regional Settings ( Locale 設定 )

    Timezone Change Timezone Location Setting ( 時區設定 )


   

Keyboard Change Keyboard Language Setting ( 鍵盤設定 )

6  Security Options ( 安全選項 )

    Change Root Password ( 改變 root 密碼 )

    Change Hostname ( 改變主機名稱 )

7  Network Options: Adapters ( 網路選項: 介面)

8  Network Options: NAS/Misc ( 網路選項: Client 端)

9  AutoStart Options ( 自動執行選項)

10 Tools ( 工具 )

    效能 壓力測試

退出時,如果有做比較大的設定,要讓系統重新啟動

舊的 Lamobo Banana Pi M1

手上舊的 Banana Pi 大概有四、五片,其中有一片目前因為原本負責的工作,被整併而空閒下來,上了原 Banana Pi 官網,發現它的 Image OS 版本,大多不再更新了,有些新的系統都沒有了,連 Ubuntu Server 系統也沒有!
[@more@]後來找到了 armbian,它支援多種單晶片的板子,有些連聽過都沒有聽過。
選擇 Download

官網上列出有支援的板子

點選 Banana Pi,選擇要下載的系統版本

使用 Win32 Disk Imager 進行燒錄

預設登入的帳號及密碼:root / 1234,登入系統會要求更改密碼

(current) UNIX password: 1234
Enter new UNIX password:輸入您要使用的密碼
Retype new UNIX password:再一次確認

建立一個 root 之外的使用者

建立相關使用者資訊

試用 Banana Pi R1 – Bananian Linux 改用 isc-dhcp DHCP Server

原本是安裝 dnsmasq 來當做 DHCP Server,在沒有設定防火牆時,Windows Client 都可以正常取得 IP,但加上防火牆之後,Client 端變成無法自動取得 IP,試了很久都無法解決,確定防火牆設定檔是沒有問題的,所以乾脆就改用 isc-dhcp DHCP Server 了。

1. 安裝 isc-dhcp DHCP Server
# apt-get update
# apt-get install isc-dhcp-server

etting up isc-dhcp-server (4.3.1-6+deb8u2) …
Generating /etc/default/isc-dhcp-server…
[FAIL] Starting ISC DHCP server: dhcpd[….] check syslog for diagnostics. … f
 failed!
invoke-rc.d: initscript isc-dhcp-server, action “start” failed.

安裝完成會出現 failed 的訊息,是因為還沒有設定的關係![@more@]2. 停止原本的 dnsmasq
# /etc/init.d/dnsmasq stop

3. 設定 dnsmasq 開機不執行
# update-rc.d dnsmasq remove

4. 設定 isc-dhcp Server  派送 IP 的網路卡
# vim /etc/default/isc-dhcp-server
INTERFACES=”br0″

5. 修改 /etc/dhcp/dhcpd.conf 設定檔
# cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.$(date +%F)
# grep -vE ‘^$|^#’ /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name “lwrt.org”;
option domain-name-servers 168.95.1.1,140.111.66.1;
default-lease-time 7200;
max-lease-time 10800;
log-facility local7;
subnet 192.168.84.0 netmask 255.255.255.0 {
  range 192.168.84.101 192.168.84.120;
  option routers 192.168.84.1;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.84.0;
}
host passacaglia {
  hardware ethernet 61:62:63:64:d7:cc;
  fixed-address 192.168.84.101;
}

6. 測試一下試定檔是否正常
# /usr/sbin/dhcpd -t
Internet Systems Consortium DHCP Server 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid

7. 啟動 isc-dhcp DHCP Server
# /etc/init.d/isc-dhcp-server start

8. 設定開機時啟動 isc-dhcp DHCP Server
# update-rc.d isc-dhcp-server defaults

試用 Banana Pi M3 – DietPi 取消 root 帳號不會自動登入系統

Banana Pi M3 上的 DietPi 開機之後,預設會直接以 root 身份登入,雖然很方便,但可能會有資安上的問題。
參考網頁:
linux – Automatic root login in Debian 8.0 (console only) – Super User

1. 先備份原檔
# cp /etc/systemd/system/getty@tty1.service.d/autologin.conf /etc/systemd/system/getty@tty1.service.d/autologin.conf[@more@]
2. 進行修改
# sed -i ‘/–autologin root / s///’ /etc/systemd/system/getty@tty1.service.d/autologin.conf

3. 如果後悔
# sed -i ‘s/agetty/agetty –autologin root/’ /etc/systemd/system/getty@tty1.service.d/autologin.conf