Saturday 7 July 2012

Overheating?

The Pi is currently running as a simple ftp server and web server for a webcam setup, so it's running standalone, and very stable.  However when I'd tried xbmc etc, this seemed to drive the system very hard, and the screen would blank out and processing appear to stop.  The CPU appeared too hot to touch, so I put this down to overheating.  Well, some enterprising soul on ebay is now offering copper heatsinks which fit the cpu and are low profile.  I've ordered a couple and it does seem to bring down the temp.  I've not had it hang in a quick test since fitting the heatsink!  Your mileage may vary.

Saturday 12 May 2012

Getting Sound Working.

This seems to be poorly documented.

/opt/vc/src/hello_pi/hello_audio
make
hello_audio.bin 1 will then play via hdmi.
or hello_audio.bin via analogue, and demonstrates that sound is working.

sudo modprobe snd_bcm2835 appears to load the kernel modules OK.

From http://elinux.org/R-Pi_Troubleshooting#Sound

sudo amixer cset numid=3 <n>
where n is 0=auto, 1=headphones, 2=hdmi.

apt-get install linux-sound-base
apt-get install alsa-utils

(probably would install linux-sound-base with alsa-utils - not sure).

Now - amixer cset numid=3 2
now 'speaker-test' - This produces some output via HDMI speakers... good.



root@raspberrypi:/usr/share/sounds/alsa# ls |while read f
> do
> aplay ${f}
> done
Playing WAVE 'Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Rear_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Rear_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Rear_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Side_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'Side_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

These all play, albeit very poorly.

sudo apt-get install mplayer
Can now play mp3 pretty well... mplayer frank.mp3.




Thursday 10 May 2012

HDMI full screen

In order to get the HDMI screen output to use the full screen, I had to create a file /boot/config.txt
In this file I set the following options.

hdmi_mode=16
hdmi_drive=2
disable_overscan=1

The mode sets it to 1080p60
The drive sets it to forced HDMI rather than dvi I think.
The disable overscan does what it says. - I needed to do this to make it appear on the HDMI input on the TV.

Really useful page for these options is http://elinux.org/RPi_config.txt

Raspberry Pi - enable ssh access.

Very simple once you realise that the ssh start script is already in /etc/init.d and ssh is already installed!

- sudo update-rc.d ssh defaults
- sudo /etc/rc2.d/*ssh start

That's it - we should now have ssh access.


RT5370 - Cheap micro usb wireless dongle on R-Pi

(N.B. - Note @ 27/July/2012. - I just downloaded and burned the 'Wheezy' image from the Raspberry Pi site.  This works with the below dongle out of the box - you don't need to install the firmware, so you can start at step 6.  Image used 2012-07-15-wheezy-raspbian.zip)

I took a chance on the cheapest micro wireless dongle I could find on ebay (£4.50) (3/2/13 - Just got one of these for £3.89, and can confirm it works fine - seems to be the same as the one I originally used.   - The original supplier on Ebay put price up to something stupid! http://www.ebay.co.uk/itm/310574944823)  -  It worked very well in windows, but I really wanted it for the Pi.  It was relatively straightforward to setup.  Obviously you need a working connection of some sort to download the required files. - I did this by bridging my wireless connection on windows7 with the (otherwise unused) wired connection and plugging the Pi.

1. - The package firmware-ralink from the Debian Squeeze install doesn't work - it doesn't contain the right firmware.
2. -  edit /etc/sources - add in wheezy as a source instead of squeeze.

deb http://ftp.uk.debian.org/debian/ wheezy main non-free
###deb http://www.debian-multimedia.org squeeze main non-free

3. - sudo apt-get update

4. - sudo apt-get install firmware-ralink

5. - Before you forget, reverse the comments in sources.list so that you put it back to squeeze and run apt-get update for good measure.

6. - Plug in the wireless dongle.

7. - Should be able to see it in lsusb:-


Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter


8. - edit /etc/network/interfaces


auto wlan0
iface wlan0 inet dhcp
   wireless-essid YourEssID
   wireless-mode managed
   wireless-key xxxxx

9. - sudo ifup wlan0

If all has worked, we should now be assigned a wireless IP address, and can unplug the ethernet. - Reboot to test.

10. - I then wanted a static IP for this. - This is simply configured in interfaces:-


auto wlan0
iface wlan0 inet static
    wireless-essid YourEssID
    wireless-mode managed
    wireless-key xxxxx
    address 192.168.2.75
    netmask 255.255.255.0
    network 192.168.2.0
    broadcast 192.168.2.255
    gateway 192.168.2.1

Note that I'm using WEP here (because some legacy kit doesn't support WPA) - might be slightly different for WPA.