iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "ssid"
wpa-psk "password"
參考
Setting up Wifi with the Command Line
<?php // 使用pack將ascii的1~13放到$txData變數中 for($i=1;$i<14;$i++) { $txData .= pack("C", $i); } // 透過rs232模組寫出去,其中rs232的tx/rx短路,因此寫出去的資料可以在$rxData中收到 $rxData = $this->rs232_model->writeAndRead($txData); // 使用unpack將$rxData中的二進位資料轉回來 $res = unpack("C*", $rxData); ?>
pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install zbar-tools
pi@raspberrypi ~ $ zbarcam ---prescale=320x240
pi@raspberrypi ~ $ zbarcam --nodisplay ---prescale=320x240
shiun@test:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.253 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
# 刪除對應到eth0的default
shiun@test:~$ sudo route del default
# 將192.168.1.1(eth1)改為新的default
shiun@test:~$ sudo add default gw 192.168.1.1
pi@ShiunPi /etc/john $ john -te
Benchmarking: Traditional DES [32/32 BS]... DONE
Many salts: 82043 c/s real, 82171 c/s virtual
Only one salt: 78717 c/s real, 78835 c/s virtual
Benchmarking: BSDI DES (x725) [32/32 BS]... DONE
Many salts: 2575 c/s real, 2575 c/s virtual
Only one salt: 2551 c/s real, 2551 c/s virtual
Benchmarking: FreeBSD MD5 [32/32]... DONE
Raw: 1511 c/s real, 1511 c/s virtual
Benchmarking: OpenBSD Blowfish (x32) [32/32]... DONE
Raw: 80.5 c/s real, 80.5 c/s virtual
Benchmarking: Kerberos AFS DES [24/32 4K]... DONE
Short: 37305 c/s real, 37305 c/s virtual
Long: 100006 c/s real, 100006 c/s virtual
Benchmarking: LM DES [32/32 BS]... DONE
Raw: 1161K c/s real, 1161K c/s virtual
Benchmarking: dummy [N/A]... DONE
Raw: 11211K c/s real, 11211K c/s virtual
由於筆者對john沒有研究, 分析的工作只好無限延期XDDDD
Do not use the following reserved names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
#以下步驟全部要使用root權限, 直接切換權限為root
pi@ShiunPi ~ $ sudo su -
#安裝以下的套件讓Pi可以使用iPhone的Tethering(網路共享功能)
root@ShiunPi ~ # apt-get install ipheth-utils
root@ShiunPi ~ # apt-get install libimobiledevice-utils
root@ShiunPi ~ # aptitude install ifuse
#ifuse是使用掛載的方式讓iPhone的Tethering能正常工作
#因此先建立等會兒要用來連線的掛載點
root@ShiunPi ~ # mkdir /media/iphone
#使用ifconfig -s檢查是否出現新的網路介面(通常是eth1)
root@ShiunPi ~ # ifconfig -s
root@ShiunPi ~ # vi /etc/network/interface
#加入以下設定
allow-hotplug eth1
iface eth1 inet dhcp
#以下步驟全部要使用root權限, 直接切換權限為root
pi@ShiunPi ~ $ sudo su -
#使用ifuse掛載/media/iPhone目錄
root@ShiunPi ~ # ifuse /media/iPhone
root@ShiunPi ~ # vi /lib/udev/iphoneconnect
#!/bin/bash
#避免上一次ifuse掛載後沒有解除掛載,掛載錢先嘗試umount
umount /media/iPhone
ifuse /media/iPhone
ipheth_pair
#編輯結束後記得將script權限設定為755
root@ShiunPi ~ # chmod 755 /lib/udev/iphoneconnect
7. 設定udev偵測到iPhone個人熱點插上Pi時自動執行上一步的scriptroot@ShiunPi ~ # vi /lib/udev/rules.d/90-iphone-tether.rules
#修改原本的第五行的 "RUN+=" 為以下內容
ACTION=="add", SUBSYSTEM=="net", ENV{ID_USB_DRIVER}=="ipheth", SYMLINK+="iphone", RUN+="iphoneconnect"
#安裝bridge-utils即可
root@ShiunPi ~ # apt-get install bridge-utils
#編輯/etc/network/interface檔案
root@ShiunPi ~ # vi /etc/network/interface
記得一定要註解掉這兩行,否則會發生同一個IP會出現在兩個interface的奇怪問題
#allow-hotplug eth1
#iface eth1 inet dhcp
auto br0
iface br0 inet dhcp
bridge_ports eth0 eth1
interface ControllStatus { String QAQ = "qaq"; } public class Test { public static void main (String[] args){ System.out.println(ControllStatus.QAQ); } }
max_usb_current=1
Model
|
Busy
|
Idle
|
Power Off
|
A+
|
0.11
|
0.08
|
0.02
|
B
|
0.44
|
0.39
|
0.1
|
B+
|
0.25
|
0.21
|
0.04
|
Pi2
|
0.31
|
0.24
|
0.06
|