I got a RaspberryPI (a few months ago)

I got a RaspberryPI a few months ago, but with Vancouver Maker Faire and the 281 proposal and all the other things going on in my life I just never got around to playing with it.

What’s a Raspberry Pi?
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.

Think an Arduino with a lot of extra CPU power, display and a few extra features. The Raspberry is not open source unlike the Arduino.

If you just look at the specs of the Raspberry PI and nothing else its not that great of a board. A BeagleBoard xM is much more powerful, more options and better track record. What makes the Raspberry PI special is its price tag of $35. At that price I don’t mind embedding it in side of a project and just leaving it there working away in the background. At that low of a price tag it becomes a very useful board for many projects that are just out side of the range of the Arduino.

While at Vancouver Maker Faire I was talking to solar robotics and they gave me a copy of their Raspberry PI Safes with the VESA mount. Its a pretty nice enclosure for the Raspberry PI. The board moves around a little in the container but this seems to be a common problem as the Raspberry PI board does not have mounting screws.

This case will work for development but if you want to use the board in any building permanently or an industrial building you are going to need a enclosure that is UL and CE certified. Currently it looks like no one has produced one, probably because the certification costs upwards of $20k if you get it right on the first try. It also looks like the Raspberry PI company is not going to be making cases either. $20k is not too far out their but you would need to sell $50k in units to make it back and currently there is just too much uncertainty about the product to be investing in that.

I have a few projects in mind for the Raspberry PI.

Look what I made – Compass table.

This year for the Vancouver Maker Faire I build a Compass table that I found on instructables.com. I found a cheap price on 1000x compasses from alibaba.com for about $0.10 each. I found the wooden table at thrift store for $20 and two sheets of acrylic.

I made the square acrylic version first as a test to see how the table would look. Afterwards I constructed the table. The whole thing took about an hour.

 

Here is an image from Maker Faire with some kids playing with the table. I put the magnets in to some knex and attached strings to them so people would not walk off with them.

Finished and sitting in my living room

 

 

 

Host gator has bad security and sucks.

I had a bad experience with HostGator the other day. I had forgot the password to HostGators billing system and went though their password recovery function. The password recovery system emailed me my password in plain text instead of a link to reset the password.

This means that HostGator stores its users passwords as plain text in their database instead of using a salted hash (The standard practice on the web today) . This also means that If/When Hostgator gets hacked like so many other secure companies have in the past and their user database gets stolen. The hackers will have access to your password, username, and billing information. All the information that they will need to attempt to log in to other systems or charge your account with purchases that you did not make.

I contacted HostGator’s support and had the following conversation with them Hostgator_chat. Leaving me even more concerned as they know about the problem and choose not to fix it.

After searching HostGator’s own site I found this page How can I prevent hacking? where HostGator suggests to its own users that they don’t store passwords as plain text.

“Don’t write down your passwords or save them in a plain text file.”

I highly suggest that you use a random password generator when assigning a password to your HostGator Billing account. Sooner or later they will get hacked and your password will be in the hands of some criminals.

Look what I made – Acrylic chess set

 

I made a Acrylic chess set at Vancouver Hackspace (VHS) on their new laser cuter. The design files came from thingiverse.

This is the first thing that I have ever made with a Laser cuter. It was a great learning experience and I hope to move on to stencils next.

Normally a stencil would take me upwards of two to three hours to complete depending on how many colors and the complexity. With the laser cuter it shouldn’t take me longer then a few mins.

 

Translink sucks in Vancouver.

This will mark my 25th complaint sent to translink contact us forum this year. That’s  more then >3 a month every single month.

Incident: The #2568 bus @11:20pm passed by the stop #58125 (EB w Cordova St FS Abbott St) without stopping. There was a few of us at the buss stop including me with my bike. One of the people at the stop was even waving at the bus driver. After the bus passed by us without stopping, I got on my bike and rushed off to science world skytrain station stop. Where I was able to catch up with the bus. I confronted the bus driver and told him that he missed a stop. I told him that I was not please about the situation and that I would report him. As I am doing now. I do not appreciated being left at a bus stop late at night, downtown. Please see that this does not happen again.

NiceDog nano php web framework

Last week I started on a simple web app that only has three pages. After I got the prototype working I wanted to clean up the code and switch over to using a more robust framework. Normally I would use something like CakePHP (PHP MVC framework). But since this web app is so small and didn’t need all the extra power that CakePHP provided I decided the CakePHP is probably overkill. I did a quick google search and found a nano php web framework called NiceDog. Its a single file, very light, framework similar to web.py for python.

After playing around with the source code for a while I found a few bugs with the system. The tutorial also didn’t include a example project to download and try out. So I fixed some of the bugs and created the example code.

nicedog_update

NiceDog nano php web framework example code. 

<?php
/**
* Created by: Steven Smethurst
* Created on: 28 July 2012
*
* A example file for NiceDog php nano web framework found https://github.com/bastos/nicedog
*/
require 'NiceDog.php';
R('')->controller('Test')->action('index')->on('GET');
R('foo')->controller('Test')->action('update')->on('GET');
R('tag/(?P<tag>[-\w]+)')->controller('Test')->action('p_tag')->on('GET');

class Test extends C{

public function index(){
echo 'Hello world';
}
public function foo(){
echo "bar";
}
public function p_tag($tag){
$this->tag = $tag;
echo $this->render('views/index.php');
}
}

// This is the error page.
function r404() {
echo "Error: 404 Page not found";
}

run();
?>

In the end I decided against using this framework as it has obviously not been toughly tested enough for production and the lack of support from the community.

WordPress Post via email (wp-mail.php)

For the last few years I have used a plugin called postie that would let me email automated posts to my blog and they would automatically get posted for me. It worked great for years until a few months ago (it took me a while to even notice)

I found that the original author had abandoned this project years ago and a another took up the project for a few years and has since abandoned it as well. Not wanting to hunt and peck though his code I searched for an alternative.

I found wp-mail.php a build in to wordpress function to do the same thing.  It was missing some of the features that I needed but was almost there.

Notes on setup of wp-mail.php 

  • You must post in plain text. RTF or HTML will not work and the body of your email will be stripped from the post. use PLAIN TEXT
  • You can force wordpress to check the email box by hitting this url
    http://example.com/installdir/wp-mail.php
  • By default if you send an email from an email account that already has a wordpress account linked to that email. WordPress will automatically PUBLISH that post.  But if you send an email from an account that does not have publishing access (author) then it will be added with the status of “pending
  • I kept getting this error message when hitting the wp-mail.php check email url. “Slow down cowboy, no need to check for new mails so often!” This is caused because there is a check in the wp-mail.php file that make sure that you don’t call this function more then once every 5 mins. This is hard coded in to the source code. You can remove this limitation by commenting out line 28-29 in Wp-Admin.php.
    // if ( $last_checked )
    // wp_die(__('Slow down cowboy, no need to check for new mails so often!'));

Rental Guide are bad people, and suck.

Me and my girlfriend where looking for a new place. She was searching http://vancouver.kijiji.ca for ads and came across a “Rental Guide” ad, and contacted them directly asking for a viewing of the house. Instead of setting up an appointing for a viewing they sold her a service where they search other classified ad sites for you and give results that match what you are looking for.

There are a few problems with this;

  • The ad/house did not exist, they are advertising a house that may have existed in the past but now does not exist and can not be rented.
  • They bullied her in to believing that they can do a better job then she can by searching craigslist.
  • I believe that they repost ads from other sites (craigslist) under their name on different sites, http://vancouver.kijiji.ca

They are a bad company that extorts money out of people that don’t know any better.

Rental Guide
5 East Broadway unit #1
Vancouver BC, V5T 1V4

*Edit*

It looks like they have a bunch of numbers that they use for the ads. Please feel free to block and ignore any ad with the following phone numbers.

Since their primary phone # 604-299-8844 has been blacklisted, they are posting a few ads a day with the phone numbers 566-9189, 566-9589, and 566-9831. To avoid repeated flagging, they delete these ads at the end of the day.

Raspberry PI – Start up questions

I got my new shinny Raspberry PI a few days ago, and got some time to play with it today. I am a windows guy by default and this is my first adventure in to the world of Linux. While getting everything started it up I ran in to these questions.

[Q] I have a 700 mA USB power supply but my Raspberry PI keeps turning off randomly, Why? 
[A] 700 mA is the absolute minimum, Once I switched to a 1500 mA power supply I had a lot less problems with random restarts.

[Q] My keyboard is not working when plugged directly in to the main board, Why? 
[A]  The main board is only capable of producing 100 mA per channel over the USB, my keyboard draws 500 mA (more then I would have expected, cheap Chinese gear). The Raspberry PI disabled that port and the keyboard would not function. I found a self powered USB hub to power the keyboard and mouse off of and that seemed to resolve this problem. R-Pi does not respond to key presses

[Q] Okay, I got my Raspberry PI to boot, What is the default username and password? 
[A] The default username and password can be found on the download page for the Raspberry PI OS. Username: pi Password: raspberry

[Q] Now that I am logged in how to I get the desktop to show?
[A] You need to launch a desktop environment, (Debian “squeeze”) comes with X Windows. You can start it by typing “startx” in the command prompt.

[Q] With the default firmware (Debian “squeeze”), The keyboard is set to British formatted keyboard, and I would like it to be set to US formatted key board. How do I do this? 
[A] From the terminal window

- Type ‘sudo su’ then press =enter]
- Run ‘dpkg-reconfigure locales’ and changing from en_GB.UTF-8 to en_US.UTF-8 (or whatever country setting you need).
- Run ‘dpkg-reconfigure keyboard-configuration’ and change the keyboard to USA PC104 (again, change as needed).
- Reboot.

Remapping the Keyboard

 

How do you talk to someone over a common, instant message client (Gtalk, MSN) securely, with encryption

How do you talk to someone over a common, instant message (IM) client (gtalk, MSN, ect..) securely, with encryption. This was my question when I went to the Practical intro to computer security at Vancouver Hackspace.

Off the record (OTR) is a plugin for most IM clients that sets up a secure connection between two computers that you can use to ensure that no one else is listing in and that you are talking to the person you intend to. The problem is that there is no OTR plugin for my perfered IM client Digsby. Infact there are not a lot of clients that support the OTR plug-ins. The OTR people do provide a tool kit to devlope plug-ins for other clients but thats a lot of work.

The ORT developers suggest Pidgin. A cross platform, multi protocol (MSN, GTalk, Jabber, ect..), opensource, Free, IM client that can run without being installed. I have looked at Pidgin before but i didn’t like it as it was too plain for me. This talk gave me the opportunity to look deeper in to this application and I found that its is has many plugins and themes for it that make it much more usable.

Instructions 

  1. Download and install Pidgin 
  2. Download and install the OTR plugin
  3. Start Pidgin, from tools menu select “plugins”
  4. Select the Off The Record “OTR” plugin from the menu and click configure.
  5. Select a account on the Off the record configuration dialog and click the “Generate” button.
  6. Start a conversation with a friend that has the OTR plugin installed. You should see a new button called 
  7. Click this button and it will send your friend a message starting the secure communication.
    • If your friend does not have the OTR plugin installed they will see a message that looks like this “?OTR?v2? nobody@nowhere.com has requested an Off-the-Record private conversation <http://otr.cypherpunks.ca/>.  However, you do not have a plugin to support that. See http://otr.cypherpunks.ca/for more information.
    • If your friend does have the OTR plugin installed correctly they should see a message similar to this “(12:34:26 PM) The privacy status of the current conversation is now: Unverified, Conversation with __FRIENDS_NAME___ on 3/28/2012 12:34:26 PM: (12:34:26 PM) The privacy status of the current conversation is now: Unverified” What this means is that the communication between you two are now encrypted but you can’t be sure that your friend is who they say they are.
  8. You can then verify your friends by click the unverified button and select “authenticate buddy” from the menu
  9. On this page you can ask your friend a question that only they would know.
  10. Once you have verified that your friend is who they say they are then the icon will change to
Notes:
  • Most clients will allow for logging of the chat session, if you are using OTR this defeats the purpose of the system. You will never know if your friend is logging the conversation. This is a a possible attack/vulnerability
  • If you are talking over GTalk you may notice that the logs show random chars for your communication. This is good this is your encrypted conversation.
    me:  “?OTR:AAIDAQAAAAMAAAADAAAAwOP8n7lerGtKSO/sT5C5cC1uYPOaFsBxPgesW1aXmmldhO510p+k7eCw/PxWyersVzOc5iyul3xqeHkbZ9rlr8lP2CLYadi1rb2sw+JneD54tEgt/EFcT8CBZ4JcdyNeAI0TtsByn08g6EkeMPSMrln56Lb32Vl8aBdddioeiwqwDSDFsdfsekb6RqXvhNVsLMiogBPiyRk3UarwsJ3tUHdpWuIsW2yv0HmAb4QWxlVPaehNdWl9itVBveWawtQZaqd8eu2aalvi9/+JSeyawAAAAAAAAABAAAABSQVb9d9BNaZAKwdVsJQH3Wgcgeb7E3ozMoAAAAUkIlPXeG/HYLDXS1qC/h9epdhBpo=“. Sent at 12:43 PM on Wednesday

 External links 

Vancouver Maker Faire – Call for Makers

If you haven’t already heard, Vancouver Maker Faire have an amazing venue in store for this year; we’ll be in the Forum building at the Pacific National Exhibition (PNE) on the weekend of June 23rd and 24th. This will give us 48,000 square feet of indoor space, and ample outdoor space too! Yes, forty eight thousand square feet of space to fill with amazing makers, doers, and creatives! It’s going to be HUGE!

But that means we need Makers, and we need help spreading the word that the Call for Makers is now open. The deadline is April 21st, so don’t put it off too much longer if you’re planning on participating.

You can find the Call for Makers, which contains all the information you need to become a Maker and links to the application forms, on our website here: http://vancouver.makerfaire.ca/makers/

Why be part of Maker Faire?

  • Share in the motivation and encouragement of a large group of similarly minded people working towards the same goal.
  • Teachlearn, and share knowledge.
  • Inspire others and be inspired yourself.
  • Network and meet people and groups with which you have a common interest.
  • Show off your projects, see how people react, and get feedback.
  • Promotion for you, and your projects. Get your name and logo or photo on our website.

Making a Gear Heart

I created a Gear Heart for a friends birthday on Maker Bot (A 3D printer) at Vancouver Hackspace’s. It took about 8 hrs to print all the different parts. I also created a time-laps video of my printing two of the gears. This is a decent animation showing how the gear system works. It was a easy project that was a good intro to 3D Printing.

Vancouver floating dining room using plastic 2-Liter bottles

The founder of the School of Fish Foundation, Shannon Ronalds, is working to create a positive impact on the seafood industry by educating chefs about sustainable seafood. He had a vision to build the floating dining room and new that plastic 2-Liter bottles could be used as flotation. With the help of a marine engineer and Goodweather Design, they drew up plans for a dining room that floats using 1,672 bottles. The elegant raft was constructed out of reclaimed pinewood. All materials going into and coming out of this floating dining room are renewable, recycled, reclaimed and/or repurposed.

Source: school of fish foundation floating dining room

 

Vancouver Scavenger Hunts

I have mentioned vancouver scavenger hunts before but it was mainly for Vancouver’s parks and I wanted one that is more geared towards Vancouver its self. I tried searching Google and yahoo but failed to find anything worth while so I created my own list.

Set up a scavenger hunt with your family and friends to see who can find the most items the fastest. Please do not take or disturb any of the items that you find use a camera to take a picture and help keep our city looking great.

First we should start with general the rules:

  1. Walking, Running and Translink only. No car, cabs, scooters, anything else with wheels.
  2. Don’t take anything, don’t disturb the environment. When you find an item on the list take a picture of it and write down where you found it.

Items to hunt for

Vancouver Mini Maker Faire 2011

* I found this post in my drafts, unfinished, lost and forgotten. I decided to post it, unfinished instead of deleting it. * 

What a Amazing, fun, aw-inspiring event. Thank you everyone that put on this event, Emily Dallas, Jenny, all the volunteers, makers and sponsors. Thank you for putting on a fantastic event.

When I heard about this even a few months ago at VHS. I decide to build a RGB LED POV Globe, The same one that I have been talking about on this blog for the past few weeks. After working very hard on it with lots of help from friends, I was unable to get it working in time for Maker Faire Vancouver. Very sad but I will keep working on it and should have it ready for burning man this year.

Instead I made a few smaller projects just in time for Vancouver mini Maker Faire 2011.

There is no way I could catalog all the interesting things that I saw over the weekend so here are some of the highlights.

Luke Detheridge milk jug dragon
Built with milk jugs, wire, rivits, and a hell of a lot of creativity.  This project was hidden away in the ContainR project instead of the dark spaces witch is too bad as a lot of people didn’t get a chance to see it. I lent him the RGB LED strip lighting to make the whole thing glow and change color.

httpv://www.youtube.com/watch?v=xAQjGT3_-6Y

Mondo Spider
A ride-able walking giant robot spider, what more could you ask for?
In this video Luke Detheridge is in control of it running up and down the main street of Maker Faire

httpv://www.youtube.com/watch?v=tIUein0F2_Q

Robot playground
Robots, robots, and robots. In this area different robots interacted and played with each other, some nicer then others.

Music boxes
You yell a word in to a box, it records 8 secs of audio and loops it back to you.

 

Five Pirates

You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

* Answer in the comments *

How to be distracted

I work up at the crack of noon today determined to-do three things, buy a shaver, Clear my inbox, and write a new post on my blog.

Started with attempting to clean my inbox. The first email I looked at was a reply to a post I made on Facebook. Logged in to Facebook to make a reply. My first mistake. 2hr later I have uploaded 25 pictures responded to 30 messages, researched and posed witty replies to other peoples posts.

Along the way one of my friends made a post about how she was having problems getting a computer science job. Well I listen to a lot of Stack Exchange Podcast and one of the things they talk a lot about is there Careers 2.0. I looked in to it and found that it was an invite only service, lucky I am pretty active on the Stack Exchange sites and I had an invite that I never got around to activating.

So I signed up and started filling out my profile. They have this meter at the top left of the profile telling you how much of the profile you have completed. Its madding to only have 120 out of 210 points completed.

One of the questions was; “What was the first computer that you used” for me it was an old Macintosh that we used to play a game called bolo. And after reading the wikipedia page I found out that there is a windows version of this game called Winbolo.

Of course I had to download it and lost another 2hrs. I also pinged a few friends and got them playing as well. destroying any change of them getting any real work done either.

After a few games I closed down Winbolo determined to get something useful done today. So I started closing browser windows and found wikipedia still open. Clicked on link and end lost another 2 hours.

According to my history it went something like this
bolo => Tank => Blitzkrieg => Maginot_Line =>On_Her_Majesty Secret_Service_(film) => Sean_Connery => Scottish_National_Party => Scottish_Green_Party => Social_justice => Humanism => Positivism => Common_sense => TED.com

TED.com killed another 2hrs. By this time I had pretty much given up on doing anything worth while.

This is how you kill an entire day by just clinking a single link.