raspberry pi anyone?

Psi*

Tech Monkey
I came across a product announcement for the Raspberry Pi in one of my hobbyist mags. At $35 it is well within my screwing around that will probably never go anywhere budget.:eek:
 

Greg King

I just kinda show up...
Staff member
I came across a product announcement for the Raspberry Pi in one of my hobbyist mags. At $35 it is well within my screwing around that will probably never go anywhere budget.:eek:

It just so happens that I have that same budget! :)

I would like to get one of these myself with the intentions of building something awesome, like a self aware something. Realistically it will sit neglected in the tech graveyard that is my office closet. It can keep my old computers and paintball guns company, collecting dust.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
I have some pre-ordered, quite early, so I'll be getting news of a delivery date soon. I've been keeping an eye on this for some time, so I'll let you guys know how it goes when it arrives. I have pre-orders with both RS components and Farnell.

Bare in mind that you do need some other equipment to use the device. Like a micro-USB power supply (not mini), HDMI, Class 4 or Class 6 SD card, as well as keyboard and mouse. So it's not exactly $35. Plus there is shipping and tax, so it's closer to $50.

There are several Linux distributions you can get, Debian Squeeze being the main one at the moment. There is a Fedora Remix in the works, it was released but it has a lot of bugs.

Performance isn't terribly great, but that's not the point. But the dev community in the forum is already starting, things like NAS and even a media streamer (that will take more time due to lack of proper GPU support at the moment).

Yeah, I'm quite excited about this...
 

marfig

No ROM battery
I'm interested in one, but haven't ordered yet. The whole production delays are contributing to my confusion and, I must confess, suspicion. It wouldn't be the first time I left myself entangled in great promises and ended up with empty hands. Anyone who went through the Pandora handheld will know exactly what I'm talking about. I've been waiting for mine for two years now.

Anyways, I'm really interested in one to experiment and build my own small NAT controller.
And house alarm and camera control system could also possible be in my agenda. The NAT could be managed without developing any software and just taking advantage of the existing solutions. The home security device however would require me to program.
 
Last edited:

Psi*

Tech Monkey
interview with the founder of Raspberry Pi

I only browsed thru that conversation for the moment, but it sounds like lead time will be a while.

And, in an almost pouring gas on the fire experience:rolleyes:(for those of us who no resistance for tech gadgets as this), that Arduino sounds quite interesting also.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
My RPi has been dispatched and will be here in the next couple days. Time to start downloading some distros... :D
 

Tharic-Nar

Senior Editor
Staff member
Moderator
It's arrived!! So I ripped open the packaging, giggled a bit, saw the size, then started to take photos....

raspberrypi_01.jpg


Yup... It's REALLY small. Anyway, I proceeded to plug things in with a rather large assortment of cables, then balanced it precariously on a glass.

raspberrypi_02.jpg


The SD card I had ready wasn't working properly, something to do with the bootloader, known issue, etc etc, got a different SD card and things started working. Well mostly, The HDMI cable I had plugged in wasn't working properly and blacks appeared red... (no clue). So I swapped out the HDMI cable and I'm back in business.

raspberrypi_03.jpg


Woot!! Username = pi, password = raspberry, then I'm at the Debian CLI. It's ALIVE!! Type in "startx" to start the x server for some GUI action and all is well. Made sure network cable was attached, loaded up Midori web browser, shuffled over to a certain website for some shameless promotion... and... yeah, that's all I've done so far.

raspberrypi_04.jpg


It's now late, I need to sleep. I'll be experimenting away tomorrow, but on a different monitor and a more permanent setup. Maybe get some media playback, SSH working, then I'll see how things go from there.

Raspberry Pi's do exist!
 
Last edited:

Tharic-Nar

Senior Editor
Staff member
Moderator
I've been busy experimenting away. Not got anything major working, but I've been working on sorting out the basics (sort of). I have SSH working so I can remote in. I also have VNC working so I can remote GUI in. It's setup with Hexxeh's RPi update utility (due to a difference in Debian squeeze distro and the RPi distro). I've manged to resize the filesystem (while it was live) from the standard 2GB to the full 16GB on the SD card.

VLC player is installed. Browsing sites with Midori. I'll be installing a number of other applications later. I'll try Chromium out later and LibreOffice, see how they handle under 256MB RAM, lol.

One thing i will make clear is that this is not a fast device, mainly because of no GPU acceleration. I'll record a video or something later of me remoting in and launching a few applications.

I May try out the NAS solution that people have been developing later, since I have an external hard drive lying around i need to do some backups too. If there's anything people want me to try, let me know (just be aware I'm a relative noob to Linux, but since I've been playing around a lot with apt-get and filesystem resizing, things are improving).


The following is basically a list of commands that need to be done for me to get this thing working. The SSH setup needs to be done on the actual RPi itself, once that is setup, you can then do the rest of it via remote. I'm a Windows user, so I end up using PuTTY for SSH and TightVNC for VNC.

Code:
###  Enable SSH ###

sudo bash

ssh-keygen

enter enter enter

ls /root/.ssh

service ssh start

service ssh status

update-rc.d ssh defaults

shutdown -r now


### RPi update from Hexxeh ###

sudo bash

apt-get update

apt-get install ca-certificates

wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update

apt-get install git-core

rpi-update

shutdown -r now


### Expand file system ###

sudo fdisk -cu /dev/mmcblk0
p
d, 3
d, 2
n p 2
157696
[enter]
w

sudo shutdown -r now

sudo resize2fs /dev/mmcblk0p2

df -h


### Install and start VNC ###

sudo bash

apt-get install tightvncserver

password
viewer=n

vncserver :1 -geometry 1280x1024 -depth 24

A few things I'll point out. The Debian default User=pi and Password=raspberry. There is no root password, so you can either set one via "sudo passwd root" and enter a password twice, then "su root" to switch to root, or use 'sudo bash' which switches.

If you are using the RPi direct, you can start the GUI by typing "startx".

If you want to remote into the RPi via an external connection (internet), you need to enable port forwarding if on a NAT router. TCP> Port: 22 for SSH and TCP> Port: 5900-5901 for VCN.
 
Last edited:

Rob Williams

Editor-in-Chief
Staff member
Moderator
Sounds like you are having fun :D

I'd be interested to know if 1080p or even 720p HD video plays right out of the box when you install VLC. The lack of GPU acceleration might make that a little difficult, but it's supposed to handle it.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
"noob to Linux"? I'm impressed. Kudos to Thar ..

Google is my friend... and a lot of reading the RPi Forums. Part of the problem comes from the fact that although the RPi uses Debian Squeeze with an ARM kernel, it still doesn't support everything in the standard ARM Kernel, so certain features are missing, but some can be added if you fancy recompiling your own kernel variant (I'm not at that stage just yet, lol). There is the usual minefield of .conf files appearing in different places with each distro, different commands using various features which aren't available (pretty much have to nano edit everything).

After a lot of reading, I managed to get VNC working at boot, so I don't have to SSH in via PuTTY, run vncserver, then launch tightvnc on windows, I can just power up the Pi and log straight in. For those interested, I did the following...

Code:
### To run VNCserver on boot ###

nano /etc/rc.local

## Add following line to the end of the file, before exit 0 ##
su - pi -c "cd /home/pi && vncserver :1 -geometry 1280x700 -depth 24"

ctrl+x y #to save#

nano ~/.vnc/xstartup

## change following ##

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

## to this ##

xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
startx &

ctrl+x y #to save#


I've been having issues with VLC player, trying to get it working. MRL issues, no audio, tried all kinds of things - this is unfortunately extremely common for me, I have no idea how people really set it up. I've installed VLC, plus the mozilla VLC (as said on the VLC website). I've changed the source list to enable more repositories, plus install ffmpeg, libxvidcore4, bunch of other codec libraries, VLC just plays silently with music, or does nothing at all with video.

Samba is my bane too, sometimes it works flawlessly, other times it makes me want to pull out my hair. This time, it was the latter. Setup workgroup, can browse and see files over the network on a Windows machine, but can't play any of the files, yet I can transfer them locally and attempt to play them (different error that way).

I gave that all a rest after a while (still proud I got ssh and vnc working, remote login, change boot services, etc). The last few hours though I've been trying to figure out media capabilities in general, just trying to get some audio.

I came across something rather amusing, that will probably catch the attention of certain people, but the analogue audio on the RPi is extremely clever (brings a smile to my face), despite its obvious limitations. The audio jack gets it's sound as a result of data signals being sent over the GPIO bus, through a PWM connected to a 1-bit DAC (yes, 1-bit), and a low pass filter. Surprisingly, it sounds quite a bit better than you'd expect. It's no high fidelity, and there are pops and clicks on the line, but it works very well. It will pass digital audio through an HDMI connection if available though, so it's not like you are limited to the jack, you just need a decoder on the other end that accepts HDMI.

----

Anyway, something that will definitely catch people's attention is that you can get a custom XBMC distro for the RPi. There are two available at the moment, OpenELEC and Raspbmc . I could only get Raspbmc working at the moment, but it works REALLY well considering how new it is. It's very fluent (compared to Debian), but it's not without issue.

Raspbmc is a custom distro (there will be an installer eventually for Arch and Debian I think), so you need to write it to an SD card (dd on linux or win32diskimage under windows). It will require an internet connection when you run it the first time because of certain firmware issues with the RPi, mainly to do with SD card compatibility. So it will boot into a launcher and then update itself, then run the installer. Once installed, you are presented with a typical XMBC interface and you can work from there.

I don't have a device that will decode HDMI audio (i just have monitors), so I had to use analogue audio. Raspbmc has all kinds of library discovery and network access, so it could connect to and use data from a windows share without incident (smb). It can playback most audio codecs fine, mp3, aac, flac, ogg, all no problems, can even make use of playlists (m3u and m3u8). However, switching from track to track would often result in audio breaking, the track would play at a higher speed, but with no sound. So you have to stop the current track, then play the next. Yet random shuffle mixing in a playlist works just fine.

Video decoding is hit or miss and largely depends on codecs and compression rates. I will say now that under certain conditions, the RPi really can play 720p and 1080p at full speed. Yeah, I was quite surprised myself. However, there were a number of 1080p videos I tried, high quality BD-Rips (like 12GB in size), that would just crash the system. 1080p at a more conservative 6-8GB would work, so I think it may be a memory issue (not enough RAM), to handle the bitrate, or it could just be the codec used (despite all of them using h264). All the 720p videos I tested worked fine (xvid, h264 and x264).

---

My experience with Raspbmc really does highlight something important with the RPi. It has a very bright future as a media player and even as a thin client, the software just needs to be tuned. Using Debian in its current state does leave you largely disappointed, but then switching to a custom distro, it really shines. So things will definitely improve over time. I do have the Fedora Remix which I may test out later as well, before it was taken down. I know that it has bugs (hence why it's no longer on the download list), but we'll see how it goes.

Debian is not very beginner friendly at the moment, but it's certainly been invaluable teaching me some basics about linux (if you consider changing boot services basic). From command line stuff, configurations, it's a very manual OS. So the RPi has already performed to specification, as an educational tool, at least for me. I'm not learning to program, but I am learning how to use a computer and linux, rather than learning to use windows. The problem is that the information is scattered over the RPi forums as well as various websites about linux - at least I'm good (ish) at research). It's unfortunate that some of the most basic information is buried (like you need to type startx to start the gui... it's nowhere obvious).

There is still a lot of experimenting for me to do. As said above, I'll be trying Fedora out later, as well as continue to wrestle with Debian. Raspbmc has given me a breather of sorts, felt like I accomplished a lot without doing anything really (other people have :D).


-----------

There is one thing i need to mention though. I'm installing completely new operating systems in about 20 seconds... and switching between them without a bootloader, just power off, swap SD card, power on, in another 20 seconds. If i corrupt the OS, just reflash it to the SD card again. It's a very strange feeling when i think about it...
 
Last edited:

Tharic-Nar

Senior Editor
Staff member
Moderator
So it turns out that the changes I made to get vnc working on boot screwed up something somewhere to the point that I could no longer start X locally, only via VNC, even if I killed the process (of both X and VNC). Then other problems started to creep in and basically, all I had left was an SSH console... so I've had to do a clean install.

I used the method posted above because it worked (initially), other methods I looked at would not work simply because they required editing files that did not exist (for example, /init.d/vnc did not exist in the normal file structure of the Debian Pi distro). This brings up one major issue so far working with the Pi, it's non-standard. Normal guides online for Debian Squeeze related material will not translate over to the Pi specific distro. Parts do, but not all of it; unfortunately, all parts of a solution must be implemented for it to work and I do not know enough about linux to fill in the blanks.

I tried the old Fedora install that was initially released and it was pulled for a reason. I had difficulty getting it past the first boot process, as well constant distractions as debug code from something kept creeping into command line... while I was typing. Nor could i get it to boot into a GUI successfully. Fortunately, the Fedora build is still in development and the nightlies are up to version 17, so we may see an official release soon.

I am in the process of setting up Debian again, without a certain VNC boot modification, and will continue playing around. While I would have liked to fix the problem to begin with (simply undoing the two edits did nothing), I was way over my head to even begin to guess what the problem was, making it hard to explain to someone.

Back to experimenting...
 

Tharic-Nar

Senior Editor
Staff member
Moderator
So I managed to get VLC working with audio-out on the Debian install, but it's not easy, mainly because the audio driver is still alpha and extremely temperamental. From the command line...

Code:
apt-get install alsa

depmod

modprobe snd-bcm2835

While ALSA is already 'technically' installed, it doesn't always work. What I find irritating is that each time the system is started, I have to run modprobe for it to work, otherwise VLC fires back with an 'ALSA' error.

Once I managed to get audio working, it became apparent that the issues with XBMC are almost completely related to the ALSA driver. There are regular pops and clicks (with higher bitrates), and that when I open a second file to play, it interrupts the first and only silence is played, the previous stream MUST be stopped for audio to play.

Movie playback is extremely poor because of the lack of GPU acceleration. However, there is a GPU accelerated player for the RPi called OMXPlayer - derived from XBMC. At present, it's not the easiest thing to install, or use. It's purely command line based and requires you to enter the file's full path name. When inside a GUI, it's possible to right-click a file and 'open with', with a custom command line of 'omxplayer'. This works with movies and music, the problem is that there is always the CLI in the background until it fades out due to power-saving (the movie continues to play).

There are a couple amusing things I found out. One was that I originally logged in via VNC, using the GUI to launch files; to my surprise, when I launched omx, the monitor the RPi was connected too sprung into life with movie playback, while the VNC window remained at the desktop. On top of that, omx uses the GPU to decode audio too. Using 'top' in the command line, omxplayer was only using 5-7% CPU playing music, while something like VLC uses 70-100% (often resulting in clipped audio). With omx playing 720p movies, it's about 40-50% CPU use... VLC just doesn't work, lol.

-----------

One issue that still plagues me is pulling media from the network. While I can freely browse the network and even copy files over locally, I still can't stream over the network. This may be to do with the fact that the network's locations are not mounted. So I tried to mount them - and can't, due to a very long list of errors that keep getting in the way. I can't create a directory, I can't mount the specified location because it can not be found (despite the fact that I can "smbclient -L servername" without issue). Not to mention 'issues' with locations with spaces in names (quotes not working either).

The final problem is a persistent random issue where I can't use commands at the CLI (invalid command). So 'shutdown -r now' doesn't work, cd, kill, nano, etc, none of them work and I need to manually power-cycle the RPi. This issue crops up repeatedly, often leading me down a false path of things not working - when in fact they should, even if I switch to root.
 
Last edited:

Brett Thomas

Senior Editor
I hate ALSA.... :( But not nearly as much as I hate pulse-audio.

It's a shame that the distro is having such a problem from the get-go - but I'm really quite surprised that they chose to put out a 'full' distro like Debian to begin with. I mean, I suppose that it's designed to showcase the device's potential, but let's call a spade a spade - it's an ARM processor and little baby system, it's not designed for a full-on PC distro.

I really think they'd have done a lot better trying to use either Gentoo or Slax to start things off - distros based on modularity and control instead of full-function. Gentoo is designed JUST FOR this type of product - fairly fixed hardware specs and a limited amount of memory. It's the perfect "embedded system" linux and would work wonders, not to mention Portage is aeons more fine-grained than aptitude (which Rob routinely likes to remind me of).

Hopefully those kinks will sort themselves out - Gentoo can be a bitch to install but if Raspberry just came up with a base build it'd probably be marvelous. Then again, it could do the same thing with the debian system it has - I suppose it all depends on what it's trying to get the most out of (the hardware, in gentoo case, or the software library, in debian).
 

Tharic-Nar

Senior Editor
Staff member
Moderator
I think they're going with the larger library and software pool, since these devices are front and foremost meant to teach programming to kids (or will be when the educational release is announced).

I procured a pre-compiled Gentoo img from one of the kind peeps over at the RPi forum, albeit a little bloated in nature (8GB in total). I left emerge to compile some updates overnight and was greeted with the now annoying 'invalid command' problem (I am beginning to think this is a power save issue with the hardware, since vastly different OSes have had the same issue). I power-cycled the device and was left staring at a kernel panic.

Browsing the forum, I get the impression that kernel panics are a little too common - but reading further, the majority of these cases are the result of insufficient power or misbehaving peripherals. My issue is likely a bad compile on the update, incorrect flag or some such (I know very little about such things with linux :p).

Power

Speaking of power though, I do want to make clear about its importance, since anyone who decides to get one of theses devices needs to be aware. It is highly recommended to get a powered USB hub for all peripherals. Wireless KB and mice will not work properly using the RPi's own power, nor will wireless network adapters. Backlighting and gaming grade peripherals will also cause issues.

When you first turn the device on with such peripherals attached, it may work fine to begin with. But quite often, it's the network or audio that will give out first, that's if it can get past the boot sequence.

SD Cards

I've been experimenting with different SD cards too. Class 10, UHS-1 and micro-SD adapter type cards do have a number of issues. So far, my UHS-1 card has only worked with the raspbmc distro, mainly because it does a self update before the OS kicks in - the debian and gentoo installs choke with interrupt problems each time.

The good news though is that high-speed cards are not really required. I use a 16GB class 4 card for most testing, and it works fine. IMG writing is quite slow at about 5MB/s (while the UHS-1 card finishes an 8GB flash in under a minute), but when the system is running, it's not that bad. So you can commandeer an SD card from an old camera or something if need be.
 
Top