精選

2014年1月28日 星期二

我的Raspberry Pi

061522 移除無效連結

※010116 移除無連結圖,已不使用此設備,不再更新,
保存使用心得。

110815
改善xbmc的低fps,請參考

10 Tweaks to improve XBMC performance on Raspberry Pi

或換Raspberry Pi 2(1GB RAM),但個人認為有root過android電視棒較佳。

※031215勉強可用的瀏覽器 epiphany
安裝
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install epiphany-browser
上3個步驟約要1小時,測試youtube及natnatvip尚可,但全螢幕播放會leg,聲音失真明顯,有興趣的朋友可試,之前的內建瀏覽器是無法看任何影片,可移除部份無用軟体,但改善應不會很大,因受限512K。

※092014如果你有智慧手機可用Miracast(手機同步輸出到HDMI電視),可以略過。

012914 是我加上實作經驗
※以下是個別安裝在2片SD的方法,Raspbian及Raspbmc,
   如要安裝上述2者於同一片SD,請看最下(032614)


寫在前面:雖連接HDMI到TV,但Raspberry Pi只512K,不能要求太高。
如想詳知請參考http://ithelp.ithome.com.tw/ironman6/player/bizpro/alll/1
Linux Pi的奇幻旅程 從第1篇看30 無效連結
在開始選單的Raspi- Config中的locate不要選中文,
參考http://yehnan.blogspot.tw/2012/08/raspberry-pi.html
摘要如下:
...
繁體中文的部份,我選了三個zh_TW BIG5、zh_TW.EUC_TW EUC-TW、zh_TW.UTF-8 UTF-8。如用以下noobs安裝則拿掉en-gb,再加入en-us 3個,在boot_behaviour選第2個,則開機不必每次要密碼直接進入桌面(033014)
然後將zh_TW.UTF-8設定為預設的
安裝中文輸入法
sudo apt-get install scim scim-tables-zh scim-chewing
※預設不是scim,要自已切換,我使用行列法
如由web看youtube,請改由xbmc經samba到內網他台


020414 用vnc連入Pi,參考

Raspberry Pi 遠端桌面— 使用VNC « Uc Note ←無效連結

摘要如下:
一、在 Raspberry Pi 上架設 VNC Server
Step 1. 安裝 TightVNC Server
sudo apt-get install tightvncserver
Step 2. 啟動 VNC Server
鍵入指令:
vncserver :1
# 後面的 :1 是桌面的編號,若不指定編號會自動累加
輸入指令後會指示你輸入密碼,並再輸入一次確認。接著問你是否要產生唯獨的密碼,輸入 n 即可成功啟動,此時 VNC Server 會建立一個新的 X 桌面
※ 註:
另外,啟動時可加入參數 -geometry widthxheight 來指定客戶端桌面的解析度,例如
vncserver :1 -geometry 1024x768 
vncserver -geometry 1024x728 -depth 24
※我未使用開機自動啟用vncserver的部份
二、以 Ubuntu 作為 VNC Client
Step 1. 安裝 VNC Viewer
輸入以下指令安裝:
sudo apt-get install vncviewer
Step 2. 連線
輸入指令:
vncviewer host:number
host 為連線目標(本例是樹梅派)的ip位址,可在目標電腦使用 ifconfig 確認。number 為 VNC Server 所建立的桌面的編號。
接著會要求你輸入密碼,輸入後就能看到 VNC Server 所傳過來的螢幕畫面了
我連入的指令如下:vncviewer x.x.x.x:5901

※Raspmc
和現在ubuntu下的XBMC 的一樣,xxx addon要copy以前安裝的各zip,
找.xbmc/addons下的plugin.video.xxx等...。
由於中文輸入add on為拼音,我發表的video標題皆加上xbmc2k14,如此在youtube找尋即不必輸入中文
MPEG-2和VC-1解碼器要購licence code,186元,否則某些video無法播放。
※但此2 code仍無解rmvb及flv,如要則再rmvb轉(HD)mpg,約4倍大即可看(020514)
當收到licence code後,請參考

How to Add MPEG-2 and VC-1 Video Codec Support to Y

摘要如下:
...
Save the config.txt file and safely eject the SD card from your computer. Return the SD card to the Raspberry Pi and power up the device.
Adding the licenses via the built-in Raspbmc tool: If you’re running Raspbmc, you can skip the whole manually editing the config.txt step and take advantage of the built-in tool right inside Raspbmc.
To do so, head over to your Raspbmc device and navigate from the main interface to Programs –> Raspbmc Settings. Once you are inside Raspbmc Settings, navigate to the System Configuration Tab and scroll down to the the Advanced System Settings section:
There you can click on MPEG2 and VC1 and input your license number. Don’t type in the entire string provided for you by Raspberry Pi, leave off the leading decode_MPG2= and decode_WVC1= portion. Only input the 10-digit string after the equal sign into each codec’s respective slot.
Once you have added the appropriate codec licenses, head back to the main interface and reboot your device via the power selection menu in the lower left hand corner.
Testing the codecs: The most enjoyable way to test your new codecs is to fire up a media file you know wouldn’t play without it, sit back, and watch it play perfectly.
The more technical way to check, should you run into any hiccups and wish to confirm that your license is recognized by the device, is to head to the command prompt and enter the following commands:
vcgencmd codec_enabled MPG2
vcgencmd codec_enabled WVC1
The Pi should immediately return that the codec is enabled. Here’s the output for the MPG2 check on our test machine, for reference:
Everything looks good at the command prompt and the previously audio-only files now play both their audio and video channels. For a few bucks and a few minutes of our time, we’re ready to enjoy the wide variety of videos encoded in MPEG-2 and VC-1 codecs.
※記住此licence code只隨此片主機有效(020414)
※032614用noobs v1_3_4,先用Gparted直接format成fat32(用在win下的SDformatter4失敗),noobs解壓後可先刪除不想安裝的os如Arch等,先後安裝後再如前方法掛上中文
032914
這是我目前選用的3個,Raspbmc, Scratch, Raspbian其中Scratch未安裝,
在Gparted下看起來是這樣
在HDMI TV畫面

032814用iphone/ipad遙控raspbmc
請參考

http://asliceofraspberrypi.blogspot.tw/2013/07/xbmc-raspberry-pi-remote-control-using.html及
http://wiki.xbmc.org/index.php?title=Official_XBMC_Remote/Android/FAQ#Library_works.2C_but_remote_control_does_not_work
※第二個告知連不上的原因,在raspbmc settings的system configuration要關掉firewall後才可ping到,如下圖
※041914
用noobs安裝後的raspbme在更新後如一直出現"Relax,..."
請參考
http://www.raspberrypi.org/forums/viewtopic.php?t=32008&p=350866
鍵入 rm /home/pi/.xbmc-current
後會如Raspbian出現設定中文,台北,時區後再經一段時間即ok