the itjerk

my adventures with technology

Tag Archives: arm

raspberry pi, part two

After nearly five months on order, I got another Raspberry Pi model B last week, this one upgraded to 512mb RAM. Its running the October 28th release of Raspbian "Wheezy", and for some reason, only Ubuntu's Image Writer would get it working properly on my 8GB SDHC card. The Pi's performance is much snappier than the previous one reviewed, due to the extra memory and four months of work on the Debian-based OS.

*** FYI: Remember, that SD card is your hard drive, and by most estimations, not the most reliable format in the world. Keep it backed-up, have a spare or two around, SD cards are inexpensive! And please be sure to shutdown the RPi correctly using "sudo halt" or similar. This will help keep that SD card uncorrupted. ***

New this time is the raspi-config command that ran on first boot. Among the several options available is the ability to overclock, which I eagerly set to high. The good folks at Raspberry Pi claim it will not void the warranty. Even though web browsing is sluggish, the performance of this board seems good enough now for desktop use. Beware, however, some seem to believe that this leads to SD card corruption!

BTW, total cost of ownership: Raspberry Pi $43.02 for the board delivered, plus SD card, video adapter, power stuff, etc comes to $65; plus I'm using an old Apple keyboard & mouse, ethernet, and a spare monitor.

Right off the bat, I had to edit /etc/default/keyboard and edit the keyboard language from "gb" to "us" to get the @ sign to type right. You can also do this with raspbi-config, and be sure to run "sudo setupcon" right away to avoid delays in rebooting. After a perfunctory update && upgrade, I added the tsocks package which allows me to use a SOCKS connection with the Midori browser.

Open /etc/tsocks.conf, comment out all lines except:

server = 127.0.0.1
server_type = 5
server_port = 1080

Then open a ssh connection to your the computer you want to tunnel through, using the same port above:

ssh -D localhost:1080 tunnelcomputer.com

Finally, open the browser, using the tsocks argument first (you can do this with most any program!)

tsocks midori

Viola! Go to whatismyip.com and verify yor SOCKS connection. But remember, DNS request don't go through SOCKS in the Midori browser. (IceWeasel, the Debian version of Firefox, can).

Next, I installed mpc and mpd software, which allow playing audio streams over the internet.

sudo apt-get install mpd mpc

If you man mpc, you can get a list of commands available, but here's how to add an internet stream and play it. Note that when you start/restart the RPi, your stream will immediately start! I'm playing the Shoutcast address for prog station Stellar-Attraction.

sudo mpc add http://stellar-attraction.net:8000/
mpc play

You can also load a folder by cd'ing to it, and then telling mpc to queue it up:

mpc ls | mpc add
mpc play

Pretty slick. Loads of commands, like shuffle, current, clear, etc. More about MPC and MPD here.

Other things to install for music are:

sudo apt-get install moc libflac-dev

Next, let's see if I can stream my Squeezebox Server from home (have to open ports on the router first)!

raspberry pi hands on

Raspberry Pi arrived on June 25th via DHL and off to Microcenter I went to get a 4GB SD-HC card ($3.99) and a new card reader ($9.99) for my linux box, because the old one couldn't read "HC" cards! Easy enough to setup, I followed the instructions on flashing the SD card with Debian "Squeeze" operating system. That accomplished, I then plugged all the necessary connections (using the power adapter from my cell phone) but quickly realized that there was an issue. Off to Raspberry Pi's wiki page for troubleshooting. Fortunately, it's well maintained and figuring out my issue and the resolution was easy as, er, pie.

There would appear to be a bug in the distributed version of bootcode.bin

So I replaced the bootcode.bin file on the SD card, and then tried to get it to work again. It did, but unfortunately that HDMI connection wasn't going to go through my A/V Receiver and off to my projector. (See this post for why). Not the Pi's fault, I was off to Microcenter the next day to get a HDMI->DVI-D adapter. That in place, I was in business. But wait, the screen looked pretty crappy. Once again, I was off to Raspberry Pi's wiki page for troubleshooting.

Big black borders around small image on HD monitors

and

Interference visible on a HDMI or DVI monitor

The fix was simple enough for both issues. Edit the boot configuration file for Raspberry Pi and add the following:

sudo nano /boot/config.txt
disable_overscan=1
config_hdmi_boost=4

and then reboot. Viola! Raspberry Pi meet Strawberry Bricks.


Performance is just okay for modern computer use, but I guess that really isn't the point of the Raspberry Pi. It's an educational tool, not a desktop computer. Whether that's of interest to you or not, well, you'll make that decision.

On the web:
Raspberry Pi

raspberry pi

Cheap computing's had a lot of promises for machines under $100. The Raspberry Pi, designed by the British not-for-profit foundation of the same name, is a "single computer on a board" that features an ARM processor and high-quality graphics, all for USD$35.00. It's designed to interest kids in computer programming, science, etc. Engadget has a rather tepid review here.

The unit is the size of a credit card, and has connections for USB, Ethernet, SD card (required for booting), HDMI (audio and video), RCA video and a 3.5mm audio jack. It's ARM, so software needs to be compiled for that processor; both Debian and Fedora have been ported, so yes, it's ostensibly a Linux box. It also has a GPIO connector, which means it can also be programmed to do about anything (robotics, interfacing, etc). The unit is powered by 5v, and most any micro-usb charger will do.

To get the Pi running, you'll need a pre-loaded OS on an SD card, connect (wired or wireless) keyboard and mouse, hook up to video via HDMI or composite, and power it with 5v via micro-usb.

I got into the queue with RS Online (one of two exclusive distributors) to order one on March 1st, and actually placed my order on May 24th. Next update when it's in my hands!

On the web:
Raspberry Pi Official Site
The MagPi Magazine
Wikipedia – Raspberry Pi

chumby one


What's a chumby? A funny-named device that's a cross between a clock radio and data-enabled cellphone? Chumby Industries says, "Just plug in your chumby, connect to your network, and use your computer to create a lineup of favorites from over 1,500 apps in more than 30 categories. Then let your chumby do its thing — streaming everything you like, from sports scores to stock quotes, from video clips to interactive games, from photos to trivia." So yeah, it's a computer-ish device that's connected to the internet. I want one!

A coupon code (HOLIDAY10) from their Facebook page and $90 later, the chumby one (actually their second model) arrived at my door. Very much the size of a small clock-radio, it sports a 3.5" color touch-screen interface, a large volume knob on its side, 5V AC adpater (it does run on battery, not included), and an amazing 2W mono speaker. After flashing it with the latest firmware (1-0-7) via USB, I was able to connect to my home wifi network. From there, I used my computer to create an account at chumby.com and activate my chumby (now called "chumbly"). Next, again through their website, I set off to configure a "channel" with various "apps" by deleting most everything from the default channel, and adding a flip-style clock, the Weather Channel, Spongebob, XKCD, you get the drift…

When on, the chumby continuously cycles through the various apps on a channel; each time the app refreshes itself with new information from the net. Whether rss feeds, stock quotes, word of the day, Facebook news feed, Flickr albums, Gmail, Twitter, you name it, there's probably an app available. And if you can't find what you want, write your own; each app is basically an Adobe Flash animation. The chumby also plays music very well, from terrestrial FM radio (well, not so well in my case), to Pandora, Shoutcast – why it even connects to my Squeezbox server as player "Neptune"; the only rub is I need to compile its playlist from a computer. And because the chumby is basically a linux computer running an ARM processor, you can do all sorts of geeky things with it too! BTW, it has a fantastic "night" mode that dims the screen perfectly.

Okay, it's a gizmo, it's slightly gratuitous, and really should be offered in other colors. The app selection is superfluous, but it's rather strange that there isn't a "children's" category, because my kids love this thing! The chumby is certainly extensible, but a lot of its value depends on intended use. In the bedroom, it's little more than a clock radio – do I really need to wakeup to Facebook or Engadget news feeds? No, though that might be useful in a kitchen setting, somewhere a computer isn't. It is however the best clock radio I ever bought, one that even connects to my Squeezebox server. What fun the chumby is!

On the web:
http://www.chumby.com/guide
http://wiki.chumby.com/mediawiki/index.php/Main_Page