Version 22 (modified by wade, 11 years ago) (diff) |
---|
note
- 查詢那些程式開了那些 port
- 規格參考:
- http://item.taobao.com/item.htm?spm=a230r.1.14.137.dn3xh0&id=21948660179
- http://item.taobao.com/item.htm?id=19030341711&ali_refid=a3_420791_1007:1104801906:7::87a956e4b0f948e2a6c62939556f1359&ali_trackid=1_87a956e4b0f948e2a6c62939556f1359&spm=0.0.0.0.36LCkX
- http://detail.tmall.com/item.htm?spm=a230r.1.14.13.QbH1Co&id=15504630386&ad_id=&am_id=&cm_id=140105335569ed55e27b&pm_id=
設定
鍵盤設定 keyboard layout
- 將鍵盤設定為 us layout 配置,否則「|」、「#」、「"」會打不出來。
sudo vim.tiny /etc/default/keyboard 更改 XKBLAYOUT="us"
無線網路設定
- WPA 密碼設定:
- 設定檔:/etc/network/interfaces
# allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet static address 10.1.2.20 netmask 255.255.255.0 network 10.1.2.0 gateway 10.1.2.1
- 設定檔:/etc/network/interfaces
- 使用 DHCP 設定 IP:
# allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
- 手動設定 IP 設定檔:/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="Your SSID Here" proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="YourPresharedKeyHere" }
- 重新啟動無線網路。
# sudo ifdown wlan0 # sudo ifup wlan0 ioctl[SIOCSIWAP]: Operation not permitted ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument
- 觀看無線網路狀態:
# iwconfig lo no wireless extensions. eth1 no wireless extensions. wlan0 IEEE 802.11bg ESSID:"Your SSID Here" Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency:2.442 GHz Access Point: NN:NN:NN:NN:NN:NN Bit Rate:54 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=100/100 Signal level=95/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 eth0 no wireless extensions.
套件
webcam1
- http://gsyan888.blogspot.tw/2013/04/raspberry-pi-webcam-server.html
- http://pingbin.com/2012/12/raspberry-pi-web-cam-server-motion/
- 設定檔:
#lsusb 看是否抓到 webcam #sudo vim.tiny /etc/motion/motion 設定 daemon : 設定為 on webcam_localhost : 設定為 off #sudo vim.tiny /etc/default/motion start_motion_daemon=yes
- 啟動:
#sudo service motion start
- 觀看服務狀態:
#netstat -na | grep 8081 tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN
- 於 browser 中輸入「http://192.168.2.1:8081」即可觀看
webcam2
- h.264 --> compress --> redirect to web browser
- h.264 --> nfs --> compress --> web browser
- keywork: raspberry pi ffmpeg streaming
- http://3homers.blogspot.tw/2008/06/ffmpeg-h264.html
- http://www.raspberrypi.org/camera , no web
- http://blog.miguelgrinberg.com/post/stream-video-from-the-raspberry-pi-camera-to-web-browsers-even-on-ios-and-android Stream Video from the Raspberry Pi Camera to Web Browser
- http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=7557 Real-time webcam streaming tutorial, try change /dev/video0 to RPI camera.
- http://thkaw.pixnet.net/blog/post/97918585-%5Braspberry-pi%5D_%E5%B9%ABpi%E8%A3%9D%E4%B8%8Awebcam%E5%81%9Astream-server%E5%8D%B3%E6%99%82%E5%82%B3%E8%BC%B8 [Raspberry Pi]_幫Pi裝上Webcam做stream server即時傳輸監控影像, mjpeg
- http://www.raspberrypi.org/archives/3890 , use netcat and mplayer, not work.
- http://blog.timc3.com/2009/02/10/mplayer-disable-lirc/ error Failed to open LIRC support. You will not be able to use your remote control.
- https://www.modmypi.com/blog/raspberry-pi-camera-board-raspivid-command-list raspivid
- http://blog.longwin.com.tw/2012/02/nc-data-send-socket-server-2012/ command nc
- http://tw.myblog.yahoo.com/stevegigijoe/article?mid=183&sc=1 h.264
- http://mplayerhq.hu/pipermail/mplayer-users/2011-August/083160.html how to play h.264 raw file
- http://www.raspberrypi.org/phpBB3/viewtopic.php?t=45368 Streaming Raspberry Pi Camera H264 into HTML over RTMP
- http://3homers.blogspot.tw/2008/06/ffmpeg-h264.html
ffmpeg -i inputfile -vcodec libx264 outputfile.mp4
CNC
GPIO
- https://pypi.python.org/pypi/pip
- http://cheng-min-i-taiwan.blogspot.tw/2013/04/raspberry-pi-python.html
- https://code.google.com/p/raspberry-gpio-python/wiki/Outputs
- https://pypi.python.org/pypi/RPi.GPIO
- http://yehnan.blogspot.tw/2012/07/raspberry-pigpioled.html
mp3 player
- http://www.raspberrypi-spy.co.uk/2013/06/raspberry-pi-command-line-audio/
sudo apt-get -y install mpg321 mpg321 test.mp3