2015-03-21

2015-03-10

Setup Raspberry’s wireless network and assign a static IP address in Raspbian

參考文件:
1. paulv's comment in /etc/network/interfaces changed,weird 2 LAN IPs instead of 1
2. Setting a static IP on Raspberry Pi on Raspbian 20150505

----------------------------------------------------------------------------------------
Setup wireless network:
NEVER modify /etc/network/interfaces again.

add theses codes to /etc/wpa_supplicant/wpa_supplicant.conf
network={
    ssid="SSID"
    psk="Your_wifi_password"
}


Set static IP address for an interface:
NEVER modify /etc/network/interfaces again.

Add these to /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Replace eth0 and the addresses as what you want.

Fixing Raspberrypi’s WiFi Dropout Issues on EDUP EP-N8508GS

If you find your wifi 'drops out' from time to time, you can fix it by following procedures:

Create and edit a new file in /etc/modprobe.d/8192cu.conf

sudo vi /etc/modprobe.d/8192cu.conf
# Disable power saving (recommended)
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Then reboot with sudo reboot. 結果反應在 /sys/module/8192cu/parameters/…

For details, please check "A Brief Introduction to RTL8192C driver Power Saving"

# In associated idle
rtw_power_mgnt=0|1|2
0 == disable power saving
1 == power saving on, minPS
2 == power saving on, maxPS

rtw_enusbss=0|1
0 == disable auto suspend
1 == enable auto suspend

rtw_hwpwrp_detect=0|1
0 == disable HW power pin detection
1 == enable HW power pin detection

# Under unassociated idle state
rtw_ips_mode=0|1
0 == low power, IPS_NORMAL
1 == higher power, IPS_LEVEL2

The conventional wisdom, because we're running our RPis as server systems not clients, is to set rtw_power_mgnt=0 and rtw_enusbss=0 to prevent the dongle going into power saving and to ignore the other two parms because they don't make any difference. If the server goes into power saving we'd need a process to wake it up. That's different from a client system where interaction from a keyboard user will trigger a request to wake up and associate the dongle.

2015-03-07

GNU / Linux 各種壓縮與解壓縮指令

.7z
套件名稱:p7zip-full。
壓縮:$ 7z a FileName.7z FileName
使用密碼 (PASSWORD) 壓縮:$ 7z a FileName.7z FileName -pPASSWORD
解壓縮:$ 7z x FileName.7z

.bz
壓縮:unkown。
解壓縮1:$ bzip2 -d FileName.bz
解壓縮2:$ bunzip2 FileName.bz

.bz2
套件名稱:bzip2。
壓縮:$ bzip2 -z FileName
解壓縮1:$ bzip2 -d FileName.bz2
解壓縮2:$ bunzip2 FileName.bz2

.gz
套件名稱:gzip。
壓縮 : $ gzip FileName
解壓縮1:$ gunzip FileName.gz
解壓縮2:$ gzip -d FileName.gz

.lha
套件名稱:lha。
壓縮:$ lha -a FileName.lha FileName
解壓縮:$ lha -e FileName.lha

.rar
套件名稱:rar, unrar。
壓縮:$ rar a FileName.rar DirName
解壓縮1:$ rar e FileName.rar
解壓縮2:$ unrar e FileName.rar
.tar (僅打包,無壓縮)
套件名稱:tar。
打包:$ tar cvf FileName.tar DirName
解包:$ tar xvf FileName.tar

.tar.bz
壓縮:unkown。
解壓縮:$ tar jxvf FileName.tar.bz

.tar.bz2
套件名稱:bzip2。
壓縮:$ tar jcvf FileName.tar.bz2 DirName
解壓縮:$ tar jxvf FileName.tar.bz2

.tar.gz
套件名稱:gzip。
壓縮:$ tar zcvf FileName.tar.gz DirName
解壓縮:$ tar zxvf FileName.tar.gz

.tar.tgz
套件名稱:gzip。
壓縮:$ tar zcvf FileName.tar.tgz FileName
解壓縮:$ tar zxvf FileName.tar.tgz

.tar.xz
套件名稱:xz-utils。
壓縮:$ tar Jcvf FileName.tar.xz DirName
解壓縮:$ tar Jxvf FileName.tar.xz

.tar.Z
壓縮:$ tar Zcvf FileName.tar.Z DirName
解壓縮:$ tar Zxvf FileName.tar.Z

.tgz
套件名稱:gzip。
壓縮:$ tar zcvf FileName.tgz FileName
解壓縮:$ tar zxvf FileName.tgz

.xz
套件名稱:xz-utils。
壓縮:$ xz -z FileName
解壓縮:$ xz -d FileName.xz

.Z
壓縮:compress FileName
解壓縮:$ uncompress FileName.Z

.zip
套件名稱:zip。
壓縮:$ zip FileName.zip DirName
解壓縮:$ unzip FileName.zip