Raspberry Pi Notebooks(continue to maintain)
Raspberry Pi setup
Basic Info
=====
default un/password pi/raspberry
=====
Setup Bluetooth Keyboard/Keypad
=====
sudo apt-get update
sudo apt-get install bluez-utils
sudo apt-get install bluez-compat
sudo hictool scan
(you will see the "Macro Keyboard" mac address here)
sudo hidd --connect dc:2c:26:bd:86:ae
Now, the BT keyboard/keypad can connect to RPi !!!
The following scripts do the connection automatically
two more script
/etc/btkeyboard
=====
#!/bin/sh
while (sleep 10)
do
sudo hidd --connect dc:2c:26:bd:86:ae >/dev/null 2>&1
done
=====
/etc/init.d/bt
=====
#!/bin/sh
### BEGIN INIT INFO
# Provides: bt
# Required-Start: $local_fs $remote_fs $syslog bluetooth
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start BT keyboard
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
/etc/btkeyboard &
exit 0
=====
(beware, this script must start after the "bluetooth")
sudo update-rc.d bt defaults
Install telnet server
=====
sudo apt-get install telnetd
Install ftp server
=====
sudo apt-get install vsftpd
edit /etc/vsftpd.conf
===
Search through the file and change the following lines:
anonymous_enable=YES Change To anonymous_enable=NO
#local_enable=Yes Change To local_enable=YES
#write_enable=YES Change To write_enable=YES
add "force_dot_files=YES" at last line
sudo service vsftpd restart
Install tightvncserver
=====
sudo apt-get install tightvncserver
start vncserver as: vncserver
Python and GPIO Installation
=====
sudo apt-get install python-dev
sudo easy_install -U distribute
sudo apt-get install python-pip
sudo pip install rpi.gpio
Play mp3
=====
sudo apt-get update
sudo apt-get install alsa-utils ntpdate mpg123 python-virtualenv libshout3 libshout3-dev pkg-config python-dev
Output from phonejack
===
sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1
Switch back to HDMI
===
sudo amixer cset numid=3 2
aplay police_s.wav
mpg123 "/media/usbstick/Renegades Of Jazz - Go Jazz Not Ape! Vol.2.mp3"
mplayer Renegades Of Jazz - Go Jazz Not Ape! Vol.2.mp3
Image viewer
=====
sudo apt-get install feh
NTP install
=====
sudo apt-get install ntpdate
tzselect
sudo ntpdate ntp.ubuntu.com
ntpdate ntp.ubuntu.com pool.ntp.org
sudo ntpdate clock.stdtime.gov.tw
(/etc/ntp.conf)
Misc soft install
=====
dos2unix, htop
RTL2832U+E4000 TV Stick
=====
sudo apt-get install git
(sudo apt-get install git-core)
sudo apt-get install cmake
sudo apt-get install libusb-1.0-0.dev
sudo apt-get install build-essential
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
=====
Raspberry apt-get sources.list(/etc/apt/sources.list)
=====
reference to: http://www.raspbian.org/RaspbianMirrors
sudo vi /etc/apt/sources.list and add follow line
deb http://mirror.nus.edu.sg/raspbian/raspbian
work as BT server and mount NTFS HD
=====
sudo apt-get update
sudo apt-get install ntfs-g3
sudo apt-get install transmission-daemon
sudo service transmission-daemon (start|stop|restart)
configuration file located over /etc/transmission-daemon/settings.json
connect as http://ip:9091 to manage
check Hd: df -lh
mount NTFS: mount -t ntfs /dev/sda4 /mnt/usb -o nls=utf8,umask=0
Language locale, keyboard map, timezone selection
=====
sudo dpkg-reconfigure locales
(select en_USxxx, zh_TWxxx, zh_CNxxx)
sudo dpkg-reconfigure keyboard-configuration
(select Generic 105 key, keyboard Other and USA/USA, No AltGr Key, No Composer Key)
sudo dpkg-reconfigure tzdata
(Asia/Taipei)
Install deb
=====
sudo dpkg -i vim_7.3.547-6_armhf.deb
Mount USB thumb driver
=====
sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/usbstick/
Mount SD card, USB stick 2012/12/16
=====
dmesg
then plugin the card reader
then rerun dmesg again to see new device
"sudo fdisk -l" also show the new device as /dev/sda2(system Linux) or /dev/sda1(system W95)
mkdir /media/sd; mount /dev/sda2 /media/sd
mkdir /media/usbstick; mount /dev/sdb1 /media/usbstick
***** dmesg log after mount the SD card and USB stick
[ 5513.143892] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[ 5513.244305] usb 1-1.2: New USB device found, idVendor=ffee, idProduct=0100
[ 5513.244336] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 5513.259489] scsi0 : usb-storage 1-1.2:1.0
[ 5514.254791] scsi 0:0:0:0: Direct-Access FNK TECH USB CARD READER 2.33 PQ: 0 ANSI: 2
[ 5514.256707] sd 0:0:0:0: [sda] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[ 5514.257292] sd 0:0:0:0: [sda] Write Protect is off
[ 5514.257320] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[ 5514.257950] sd 0:0:0:0: [sda] No Caching mode page present
[ 5514.257974] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 5514.262934] sd 0:0:0:0: [sda] No Caching mode page present
[ 5514.262963] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 5514.265696] sda: sda1 sda2
[ 5514.269184] sd 0:0:0:0: [sda] No Caching mode page present
[ 5514.269212] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 5514.269231] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 5664.861960] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 6551.351494] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[ 6551.454844] usb 1-1.3: New USB device found, idVendor=0930, idProduct=6545
[ 6551.454876] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6551.454893] usb 1-1.3: Product: DataTraveler 2.0
[ 6551.454905] usb 1-1.3: Manufacturer: Kingston
[ 6551.454917] usb 1-1.3: SerialNumber: 001D92AD7804B8C1B328003F
[ 6551.465768] scsi1 : usb-storage 1-1.3:1.0
[ 6552.499409] scsi 1:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
[ 6554.860602] sd 1:0:0:0: [sdb] 15687680 512-byte logical blocks: (8.03 GB/7.48 GiB)
[ 6554.861325] sd 1:0:0:0: [sdb] Write Protect is off
[ 6554.861467] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 6554.863615] sd 1:0:0:0: [sdb] No Caching mode page present
[ 6554.863645] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 6557.882694] sd 1:0:0:0: [sdb] No Caching mode page present
[ 6557.882724] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 6557.913794] sdb: sdb1
[ 6557.921329] sd 1:0:0:0: [sdb] No Caching mode page present
[ 6557.921361] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 6557.921379] sd 1:0:0:0: [sdb] Attached SCSI removable disk
***** dmesg log after mount the SD card and USB stick
lsusb also shown the VendorID:0xffee and ProductID:0x0100
***** result of "lsusb" (the VendorID:0xffee and ProductID:0x0100 is for card reader)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID ffee:0100
Bus 001 Device 005: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
***** result of "lsusb"
***** result of "sudo fdisk -l"
Disk /dev/mmcblk0: 16.1 GB, 16134438912 bytes
4 heads, 16 sectors/track, 492384 cylinders, total 31512576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f06a6
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 31512575 15694848 83 Linux
Disk /dev/sda: 3965 MB, 3965190144 bytes
122 heads, 62 sectors/track, 1023 cylinders, total 7744512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f06a6
Device Boot Start End Blocks Id System
/dev/sda1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/sda2 122880 7744511 3810816 83 Linux
Disk /dev/sdb: 8032 MB, 8032092160 bytes
5 heads, 32 sectors/track, 98048 cylinders, total 15687680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 8064 15687679 7839808 b W95 FAT32
***** result of "sudo fdisk -l"
Install and compule gnuradio over RPi 2012/12/17
=====
sudo pt-get install python-cheetah libboost-all-dev python-lxml python-wxgtk2.8 python-numpy python-lxml libfftw3-dev libsdl1.2-dev python-scipy python-matplotlib python-tk octave liboctave-dev libgsl0-dev python-sphinx libcppunit-dev libuhd-dev swig python-qt4-dev libqwt-dev git
cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/lib/distcc/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/lib/distcc/g++ -Dhave_mfpu_neon=0 -DCMAKE_CXX_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" -DCMAKE_C_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" ../
=====
Install subversion
=====
sudo apt-get install subversion
apt-get got error
=====
"E:Encountered a section with no Package: header....."
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
WLAN setup
=====
sudo apt-get install wpasupplicant
wpa_passphrase jungle ptc1121wlan
/etc/network/interfaces
*****
.....
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "jungle"
wpa-psk "ptc1121wlan"
*****
sudo apt-cache search RTL8191
sudo apt-get install firmware-realtek
lsmod
iwlist wlan0 scan
iwconfig
sudo /etc/init.d/networking restart
sudo ifup wlan0
install wicd
=====
sudo apt-get install wicd
sudo apt-get install wicd-curses
remove package
=====
sudo apt-get --purge remove wicd
sudo apt-get autoremove --purge (to remove related package)
DVB250 TV stick
=====
firmware location: http://www.linuxtv.org/downloads/firmware/
firmware name: dvb-usb-wt220u-02.fw
download and place it over /lib/firmware/dvb-usb-wt220u-02.fw
Mirror SVN
=====
svn co https://subversion.assembla.com/svn/sdrsharp/
MONO installed 2012/12/21
=====
sudo apt-get install mono-complete
sudo apt-get install locate
locate libportaudio.so.2
Webcam install and stream-out
=====
svn co https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer mjpg-streamer
sudo apt-get install libjpeg8-dev
sudo apt-get install imagemagick
ghpsdr3 install
=====
sudo apt-get install subversion libfftw3-dev libusb-1.0.0-dev
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:andrew-montefusco/ghpsdr3
sudo apt-get install ghpsdr3
Benchmark method
=====
time echo "scale=2000;4*a(1)" | bc -l
(result 18.628sec)
Installing compiler and autotool
=====
sudo apt-get install make gcc g++
sudo apt-get install autoconf automake autotools-dev libtool git subversion
wget https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz;
cd
tar -zxvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
./configure
make
sudo make install
sudo ldconfig
Installing prerequisite packages
=====
sudo apt-get update
sudo apt-get install \
libqt4-opengl-dev \
qtmobility-dev \
libusb-0.1-4 \
libusb-dev \
libfftw3-dev \
portaudio19-dev \
libpulse-dev \
libsamplerate0-dev \
libusb-1.0-0-dev \
libconfig8-dev \
xdg-utils \
libortp-dev
installing codec2 low bit rate audio encoding and decoding(http://www.rowetel.com/blog/?page_id=452)
=====
svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev codec2-dev
cd codec2-dev
autoreconf -i
./configure
make
sudo make install
sudo ldconfig
sudo apt-get sox
沒有留言:
張貼留言