Monday, January 05, 2015

Pi: detailed setup


Some notes I took when I setup the Pi. I have since Imaged the SD card, so I wont have to go through this again


General


  1. sudo raspi-config
    1. Change hostname
    2. Change user pi password
    3. Change timezone

Setup darkice

  1. sudo apt-get install lame libtwolame0 - to install lame required to have mp3 support
  2. install darkice binary package already compiled for mp3 supprt
  3. sudo cp /usr/share/doc/darkice/examples/darkice.cfg /etc/ - to configure darkice
  4. edit crontab for time script
  5. add record and stream scripts to rc.local for starting up at boot

Setup USB sound card

  1. modify alsa-base to make USB sound card the first (0) device
  2. reboot
  3. check that sound card is picked up correctly. Run following commands:
  4. cat /proc/asound/cards
  5. amixer 
  6. arecord -l
  7. aplay -l
  8.  Set sound levels: alsamixer 
  9. arecord -f S16_LE -D hw:0,0 -r 48000 test.wav
  10. aplay test.wav

Create seperate FAT32 extension - this useful to store recordings on a seperate partition to prevent / from overfilling, and to make it FAT32 so that it can be mounted in a Windows machine

  1. sudo apt-get install dosfstools
  2. sudo cfdisk /dev/mmcblk0 - Using the keyboard create a new primary partition in the free space, and change the type to FAT32 which is option 0B (W95 FAT32). Select Write to save the changes, then select Quit.
  3. reboot
  4. sudo cfdisk /dev/mmcblk0p3
  5. sudo mkfs.msdos /dev/mmcblk0p3

Setup 3G USB dongle

  1. sudo apt-get install sg3-utils
  2. sudo /usr/bin/sg_raw /dev/sr0 11 06 20 00 00 00 00 00 01 00
  3. echo 'SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1F01*", SYMLINK+="hwcdrom", RUN+="/usr/bin/sg_raw /dev/hwcdrom 11 06 20 00 00 00 00 00 01 00"' > /etc/udev/rules.d/10-HuaweiFlashCard.rules
  4. modify /etc/network/interfaces

Reverse SSH tunnel
  1. ssh-keygen -t rsa
  2. copy key to server
  3. insert ssh reverse command to /etc/rc.local
syslog


webmin




Post a Comment