spacer

December 31, 2014

Laura Denson (laura)

spacer

2014 Wrap Up

Hi! It’s the end of another year where I haven’t managed to post at least once a month, and when I realize that I haven’t posted here since May I feel a bit ashamed and depressed about that. I’ve spent more time in the past year updating my site than I have posting. I’d talk […]

by laura at December 31, 2014 05:56 PM

December 30, 2014

James Beckett (jmb)

spacer

Huh? What?

Wow. Not been over this way in a good while.
They've decorated a bit.

December 30, 2014 04:24 PM

December 22, 2014

Tim Waugh (cyberelk)

spacer

Patchutils now on GitHub

Patchutils now lives here. That is all.

by Tim at December 22, 2014 02:25 PM

December 18, 2014

Phil Spencer (CrazySpence)

spacer

Thrifty Raspberry Pi A+ case

My Pi A+ continues to impress me with its form factor and abilities but as I begin to settle it into a more permanent role its lack of case becomes a continued problem.

I would like to eventually get the Pibow Royale but being the Christmas season I can’t justify buying myself something at this time so maybe in the new year I’ll pick one up!

spacer Reduce, Reuse, Recycle

If you’ve read any of my arcade Pi posts you’ve probably noticed that both my original and current arcade are a reuse of a box. The first version where I followed the Adafruit tutorial I used the box Adafruit shipped the parts in. The second one I used my VMware 5 year service award box (there was a gift in the box they didn’t give me an empty black box for a service award)

This time I am going to use the box the Pi came in. It has pretty Raspberry Pi and element14 branding on it, it’s mostly the right size and it’s easy!

Cutting edgespacer

So for any box to case conversions your main…only tool is an exacto knife. It will allow you to easily carve whatever shapes you need into the box of your choosing. For the Raspberry Pi A+ you need to pick a corner for the Pi that will accommodate the single USB port and the power/HDMI/sound ports on the side. I cut a single hole for the USB port and a long slot of the side for the 3 other ports. If you plan to use GPIO as well you can cut a hole in the top of the box for this as well but in my case that was not required.

Keep it in place

Now this box is bigger than the Pi itself and it can move around freely so what I did is I rolled up the static bag the Pi came in and placed it behind the Pi to keep it from moving side to side. Then I folded the part of the roll sticking out the end length wise into the box to keep the Pi from moving back and forth. Keep in mind if you plan to unplug and plug things into the Pi a lot that this does not prevent all movement. You may want a more sturdy case for that. In my situation this Pi will be in a mostly static form with minimal cables coming and going so it will work.

If you are worried about heat you can cut holes into the top of the box but the A+ is pretty decent in that respect and the ventilation provided by the USB and HDMI slots I made appears to be sufficient. Now as you can see I have a functional case for my Pi at 0 cost to me other than 5 minutes of my time. It isn’t perfect but it works

spacer

 

• Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

by KingPhil at December 18, 2014 10:46 PM

December 10, 2014

Phil Spencer (CrazySpence)

spacer

Raspbmc: Remember the cool red Confluence ?

When I first started using Rasbmc almost 2 years ago it had that standard Blue XBMC Confluence and since I was new to the whole XBMC thing in general it was still all shiny and fine in its default glory.

Then!

A month later my Pi did its little updates one reboot and all of a sudden I had this totally awesome Raspberry Pi inspired Confluence and my excitement was over 9000!!!!!!!!

spacer

THEN!!!

A few months later my SD card was corrupted and I had to reinstall and my famous Red Connie (what I will call the Rasbmc Confluence from now on) was gone and mentions of it were stricken from the universe!!

Whyyy ohh why

A year passed and suddenly I wanted Red Connie back and I found a forum thread where they did exactly that, patched it and brought it back. If you are running Gotham (13.x) it is as simple as ssh to your Pi and paste the following to the shell:

cd /home/pi
wget mirrors.arizona.edu/raspbmc/downloads/bin/xbmc/skin.confluence.raspbmc.zip
unzip skin.confluence.raspbmc.zip
cp -R /home/pi/.xbmc-current/xbmc-bin/share/xbmc/addons/skin.confluence /home/pi/.xbmc/addons
mv /home/pi/.xbmc/addons/skin.confluence /home/pi/.xbmc/addons/skin.confluence.raspbmc
cd /home/pi/.xbmc/addons/skin.confluence.raspbmc
sed -i 's/id="skin.confluence"/id="skin.confluence.raspbmc"/' addon.xml
sed -i 's/name="Confluence"/name="Confluence Raspbmc"/' addon.xml
cp -R /home/pi/skin.confluence.raspbmc/backgrounds /home/pi/.xbmc/addons/skin.confluence.raspbmc
cp /home/pi/skin.confluence.raspbmc/colors/defaults.xml /home/pi/.xbmc/addons/skin.confluence.raspbmc/colors/
cp /home/pi/skin.confluence.raspbmc/media/Textures.xbt /home/pi/.xbmc/addons/skin.confluence.raspbmc/media/
sudo rm -R /home/pi/skin.confluence.raspbmc
rm /home/pi/skin.confluence.raspbmc.zip
  • Reboot
  • Go into Settings > Appearance > Skin> Skin and select the new Confluence Rasbmc that appears.

Apparently Kodi (14.x XBMC and beyond…….) it doesn’t work so hot but the thread I followed has instructions for that if you so desire.

Link to original thread here

• Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

by KingPhil at December 10, 2014 09:26 PM

December 06, 2014

Graham Bleach (gdb)

spacer

Quickly monitor availability of web services with curl

Some of my recent work was to reduce the interruption to users when we deploy changes.

We have comprehensive scenarios that we run against our complete test environments with a performance testing tool to get a thorough answer. It takes quite a while to get feedback from these tests, so to get quicker feedback I needed a fast way to measure continued availability of a web service in isolation, usually on a vagrant box.

This is the kind of thing that I unfortunately forget, so I am documenting it here mostly for my own benefit.

Useful curl options

The basic curl command I ended up using:

curl -sS --max-time 5 -w "%{http_code}\n" -o /dev/null www.example.com/

Why I picked these options:

-sS 

Be silent unless errors occur. The default output from curl is too verbose and not particularly amenable to parsing into structured data. But if errors happen, knowing what they were will help debug problems.

--max-time 5

Timeout after 5 seconds. The default timeout in curl is much more lenient than either a user or a client calling an API will be.

-w "%{http_code}\n"

Prints a newline delimited list of HTTP response codes, with ‘000’ used if it encounters a problem that means that it didn’t see a HTTP response. This makes it easy to count error responses.

-o /dev/null

As long as the thing being tested sets its HTTP response codes correctly, there is no need to see the content of the response.

Repeated tests and other embellishments

This runs requests in a loop as fast as possible. If anything goes wrong, output will be printed to the console. I’ve used example.com, as it should work if you have Internet access. Please cancel this after a short time, to avoid needless requests to example.com:

while true; do curl -sS --max-time 5 -w "%{http_code}\n" -o /dev/null www.example.com/ | egrep -v '^200$'; done

Some examples that should fail:

while true; do curl -sS --max-time 5 -w "%{http_code}\n" -o /dev/null www.example/ | egrep -v '^200$'; done
while true; do curl -sS --max-time 5 -w "%{http_code}\n" -o /dev/null blackhole.webpagetest.org/ | egrep -v '^200$'; done

A much friendlier 100 requests, pausing for half a second between requests:

for i in {1..100}; do curl -sS --max-time 5 -w "%{http_code}\n" -o /dev/null www.example/ | egrep -v '^200$'; sleep 0.5; done

Add the date and pipe that and the status code to a comma-delimited file for further analysis:

rm -f output.csv; for i in {1..100}; do curl -sS --max-time 5 -w "$(date --rfc-3339=seconds),%{http_code}\n" -o /dev/null www.example/ >>output.csv; sleep 0.5; done

December 06, 2014 12:00 AM

November 27, 2014

Phil Spencer (CrazySpence)

spacer

Raspberry Pi A+: Testing the limits

spacer So now I am on day two of the A+ and I wanted to see where that 256MB of RAM would leave me. I have a stock Raspian Wheezy image installed plus I have a powered usb hub with a keyboard, mouse and wifi adapter connected for these tests.

MAME
I do a lot of Arcade gaming with my B’s so it was necessary to see what the A+ would do. On reddit all sorts of people say the RAM would prevent it which made little sense to me since these games used little RAM and the emulation was all CPU.

I put mame4all on the Pi, it was no longer in the Pi store anymore so I downloaded it from google code.

If you decide to compile this on your own for some reason you’ll need to add -lasound and -lrt to the LIBS= line they’re missing but really just save yourself the hassle there’s a pre compiled binary with folder layouts in mame4all_pi.zip

I got Ms Pacman and Street Fighter 2 roms onto the Pi. The key to the test will be is the sound emulation perfect as that is the first sign of failure.

Ms Pacman of course passed no issue the real test was SF2. Let me just say SF2 performs as flawlessly as it did on the B, no blips, no slowdowns. Perfect!

So this opens up the possibility of a cheap no solder 2 player Pi Arcade system *adds to project list*

OpenParsec

This one pushes the B to its limit but is it a GPU or CPU limit or RAM? Based on a quick glance at top on the B it might be CPU/GPU but that cache line leaves it open to guess so I better check it out.spacer

This required me to build SDL2 and SDl2-mixer so that gave me a chance to test the Pi’s heat and stability at the 950MHZ rating. I am happy to say it is just as stable as the B is at this frequency and it seems to actually generate less heat under load. Once I had the dependencies installed I was able to compile OpenParsec. This for anyone unfamiliar was a space combat game released as a LAN game in 1999-2002 and then was open sourced in 2003. The latest source tree allows for it to work with the Pi’s hardware accelerated GLES driver.

The game runs and plays music just as well as it did on the B, the RAM was left at around 15MB free with 20 in cache so it was close. So far the A+ is just as capable for anything I have done in the past with the higher RAM B models. I had to increase the GPU memory to 96MB because at 64MB the frames were bleeding together.

So flying through space, collecting items, everything was fine I added 6 bots from my PC to the server and that reduced the framerate quite a bit. The limit for the PI seems to be around 3-4 players max A or B models. Still, for a $20 board I have MAME and space combat so far. I think we’re doing OK.

Epiphany

I had yet to try Epiphany, my one Pi B is XBMC and the other a dedicated console Arcade so it was time to see if this lived up to the hype. We all know the previous browsers were junk and slow so **ANY** improvement would be great.

So, general browsing this seems to work decently, you can see the CPU Load window fill up pretty quickly but it is significantly faster than Midori and others I had used on the B. Even with the reduced RAM this was a significant improvement.

I decided to be a jerk and try to crush the PI and went to Youtube. I was quite happily defeated. I played the Jurassic World Trailer on it with NO ISSUES AT ALL. This must be that fancy hardware decoded video playback I heard about. So even on an A+ you can enjoy Youtube.

I clicked the fullscreen button and things sorta fell apart there…..256mb RAM, I’ll let that slide. I couldn’t watch any Youtube at all on the old browsers even on the 512MB RAM B model.

Conclusion

The only drawback to the A model is the lack of USB and ethernet which with a USB hub you could work around that issue. The RAM doesn’t have too much impact for single purpose projects and its smaller form factor is better for embedding. A great addition to the Pi family and I am glad I got one.

• Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

by KingPhil at November 27, 2014 09:15 PM

Tolien

spacer

RIAT 2014

The 2014 Royal International Air Tattoo was last July; I intended to post this rather less than 4 months after the fact1 but it got stuck in my procrastination pile.

I had a three day ticket (Friday to Monday) which included, on the Friday, access to the pit area where the display teams2 parked their aircraft when they weren’t on display.

The photos I’ve gotten3 around to processing and uploading to Flickr:

spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer

The weather was very good, which is always a plus when you’re wandering around a field all day. Saturday was scorching hot and Sunday was cloudy with a little rain. However on Friday, it was cloudy but still more than sunny enough for me to get quite sunburned4:

Two days of @airtattoo and from the feel of it the back of my neck must be visible from space. #itburns

— Stuart (@tolien) July 12, 2014

By the time I got home I was peeling lots.

  1. I might even have settled for doing it before tickets for 2015 went on sale
  2. Frecce Tricolori, Red Arrows, Breitling Jet Team, Patrouille de France and Patrouille Suisse
  3. Out of around 4500 images — every time I dig through the pile I find another few worth bothering with
  4. Protip: sun cream needs to be used to be effective…

by tolien at November 27, 2014 12:54 AM

November 25, 2014

Phil Spencer (CrazySpence)

spacer

Raspberry Pi A+: First run!

The Pi A+ has had my attention since it first launch and I have eagerly been awaiting for mine to arrive. Today that day finally came and I saw the package waiting to be opened on my desk.

I ordered my Pi from Adafruit along with a pre installed SD/Micro SD combo card with Raspian. I’ve already played the OS install and self setup game for many years and for this project I just wanted to get up and go as soon as it arrived.

spacer The Pi comes in an updated box, the original was just a plane looking white package while this one sports the RPi foundation logo, element14 and product details on the back.

The new form factor of the A+ is really what had my attention and I just had to see it for myself. It is 1/3 shorter than the B models I have. The eventual goal for this Pi is a track view camera for train club powered by a power bank.

First boot

Now the A+ only has 1 USB and no ethernet so for initial setup it is a good idea to have a USB hub around to allow you to connect more peripherals. In my case I already had a hub that I bought when I got my first B model almost 2 years ago. I plugged in my keyboard and mouse, inserted the microsd card (which has a nice push spring release too) and connected the HDMI and power.

The Initial setup screen popped up, I used my whole SD card and set my overclock to 950 (standard among my Pi’s) and rebooted again.spacer

I logged into the OS and ran startx. There was a Minecraft Pi icon on the desktop, this seemed like a good first run test.

I don’t actually play minecraft but the application ran very smoothly and I chopped away at the mountain side with a sword for a bit.

The first boot test was over and the A+ gets an A+.

Projects

First I am going to test the limits of this Pi by having it run in my Arcade controller. We will see if can match or come close to the same perf as the B with the reduced RAM. I believe it will and this will open up the possibility for a 2 player arcade Pi down the pipes. The A’s extra GPIO slots make a full 2 player deck possible. If it doesn’t hold up there is always the B+ model.

Secondly the actual intention for this Pi will be to convert one of my HO scale flatbed train cars into a camera car for the GNMRE club layout. The reduced power footprint of the A+ should make it more co-operative with the small power bank I would like to use whereas the B’s used too much power for it to be possible.

So keep an eye out you’ll be hearing more from me in the coming weeks!

spacer spacer • Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

by KingPhil at November 25, 2014 09:30 PM

November 22, 2014

Phil Spencer (CrazySpence)

spacer

Time machine backups to the Raspberry Pi

Time machine is Apples computer backup solution and it works great. I have been using it for 6 years and even supported it for a couple years in Applecare way back when. The nice part about it is you plug a new hard drive and it prompts you with a question asking to use for backups and bam off to the races in 1 click.

Under the hood

Just like all of Apples fancy magic GUI based tools Time machine is actually backed by command line goodness that the power user can make Time Machine go above and beyond the basic “magic” way of getting things done. In Time machines case you can use the command line to make any mountable volume into a backup disk. Now this might not sound like that big of a deal but what it means is that you can use any hard drive formatted in any manner using a variety of protocols to backup your Mac if that’s what you desire. In my case I have a Raspberry Pi in the living room with a 3TB exfat Hard drive that is only barely used and I decided it would make a good network backup server as well.

spacer On the Pi

The easiest way to do this with the Pi would be Samba. Samba is an open source project that allows you share volumes out as Windows shares.

In some cases your distribution may already have a share for mounted USB devices but in this case I’ll assume it doesn’t

Make sure your external drive/usb stick/flashcard/whatever is mounted to your Pi somewhere. Sometimes these are mounted for you automatically by the distribution like in Rasbmc’s case all USB drives get automatically mounted to /media/

If that is not your case mount the disk to a folder of your choosing (usually in /mnt or /media) then proceed

Install Samba

sudo apt-get install samba samba-common-bin

 

Once installed use the editor of your preference to edit the configuration file.

vim /etc/samba/smb.conf

 

Here is a basic configuration that will allow you to mount and read/write the drive from the Mac

[BackupShareName]
browsable = yes
read only = no
valid users = pi
path = /media/BackupVolumeName
force user = root
force group = root
create mask = 0660
directory mask = 0771

 

This uses the already existing Pi user, like I said I was being basic. it would be sensible to make a new user/password for this purpose.

Restart/start Samba

/etc/init.d/samba restart

 

You should be able to mount the drive from the Mac now and it should appear on the sidebar of Finder. You will have to use “Connect As” and change the credentials. If it did not appear on the sidebar you can use the Go menu on Finder and “Connect to Server” with smb://your.pi.ip.address.

On the Mac

The Mac should now have a mounted volume in Finder that you can write to. What we need to do now is create a Sparse bundle disk image on the mounted volume. Go into Applications -> Utilities and open the Disk Utility.spacer

Don’t select any volumes yet

  • Click New image
  • Name the image
  • Set the appropriate size for your backup volume
  • Format Mac OS Extended Journaled (if you formatted your OS as case sensitive you’ll need to use that as well)
  • Encryption: None (unless you want to I suppose)
  • Partitions: Single Partition GUID
  • Image Format: Sparse bundle disk image
  • Make sure you have expanded the advanced carrot on the save location and save it to the mounted remote volume
  • Click Create

Now you have a sparse bundle on your mounted volume. Time to make the Time Machine magic happen.

First open the sparse bundle and it will mount on the sidebar of Finder. What this also does is puts it into /Volumes on the filesystem which is the key to pulling this all together. Essentially anything you can get to mount can be used for Time Machine if it is in the proper Mac filesystem format.

Second, use the tmutil command from the command line to set the backup

sudo tmutil setdestination /Volumes/MountedSparseBundleName

 

spacer Open Time Machine from System preferences and you should see that it now shows a backup Volume being active.

If you do have a case sensitive system and you didn’t make a case sensitive bundle you will get an error. Go back and re create the bundle to match your computers filesystem.

Now when you wish to do a backup all you need to do is mount the remote volume and sparse bundle on your Pi and let it run.

• Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

by KingPhil at November 22, 2014 02:08 PM

November 19, 2014

Alan Pope (popey)

spacer

Scopes Contest Mid-way Roundup

I recently blogged about my Ubuntu Scopes Contest Wishlist after we kicked off the Scopes Development Competition where Ubuntu Phone Scope developers can be in with a chance of winning cool devices and swag. See the above links for more details.

As a judge on that contest I’ve been keeping an eye out for interesting scopes that are under development for the competition. As we’re at the half way point in the contest I thought I’d mention a few. Of course me mentioning them here doesn’t mean they’re favourites or winners, I’m just raising awareness of the competition and hopefully helping to inspire more people to get involved.

Developers have until 3rd December to complete their entry to be in with a chance of winning a

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.