Category Archives: General

Controlling a RGB LED attached to a Raspberry Pi through Android

This was a bit of a project that I used to learn some new technology.  Note: I am not an EE and I am just learning how to do this.  Proceed with caution if you want to repeat.

Project Description

I need to be able to control turning on and off an RGB LED utilizing the Raspberry Pi.  I also should be able to turn it on and off using an Android device.

Design

The design is made up to utilize three different components: Raspberry Pi / LED Hardware, Web Service, and Android device.

Raspberry Pi

All the gear that was used was:

  • Raspberry Pi – Model B
  • 5mm High Brightness Full-Color LED
  • Breadboard
  • Resistors
  • 3 x Transistors – 2N3904

Some of the constraints I also have to work with are:

  • Each of the 3.3V GPIO pins can handle a maximum current of 16mA.  They might be able to do more, but from what I read, it would not be for long.
  • The Pi takes about 700mA of the total power without anything plugged in (USB, HDMI, etc), so depending on the power adapter used, there might not be enough power.  In this case, I used a 2A plug.
  • Since each color will require more than 16mA of power to turn on, I need to utilize transistors and the 5V pin from the Pi.  I will use the GPIO to handle closing the circuit on an NPN transistor.  I believe I need to use NPN due to the fact that the LED has a common anode.

Read more »

OpenCompute IPMI with F11 / F12 Issues

These are more notes than a real blog post.  Working with IPMI on OpenCompute has weird quirks and one of those is the Serial BIOS with the F11 and F12 keys.

Here’s an example of using ipmitool to pull information remotely about the power status

$ ipmitool -C3 -I lanplus -H 172.16.56.180 -U admin -P <password> power status

Using the Serial BIOS

The serial BIOS interface is a bit brain damaged in that it does not recognise the “F11”, and “F12” key escape codes that most terminal programs send, instead you can send “Esc-!”, and “Esc-@” (yes very logical, as long as the ‘@’ key is normally typed using ‘Shift-2’ – as on US keyboards, not miles away from the ‘2’ key, as on many non-US keyboards).  These escapes from HP, and Dell serial BIOS’ may or may not be useful:

Defined As     F1     F2     F3     F4     F5     F6     F7     F8     F9     F10    F11    F12
Keyboard Entry <ESC>1 <ESC>2 <ESC>3 <ESC>4 <ESC>5 <ESC>6 <ESC>7 <ESC>8 <ESC>9 <ESC>0 <ESC>! <ESC>@

Defined As     Home   End    Insert Delete PageUp PageDn
Keyboard Entry <ESC>h <ESC>k <ESC>+ <ESC>- <ESC>? <ESC>/

Use the <ESC><Ctrl><M> key sequence for <Ctrl><M> Use the <ESC><Ctrl><H> key sequence for <Ctrl><H> Use the <ESC><Ctrl><I> key sequence for <Ctrl><I> Use the <ESC><Ctrl><J> key sequence for <Ctrl><J> Use the <ESC><X><X> key sequence for <Alt><x>, where x is any letter key, and X is the upper case of that key

Ubiquiti APs, TomatoUSB, VLANS, and Linksys e3000

Try not to get too shocked, but this actually an article about networking.

Back story, I picked up some Ubiquiti AP’s for a good price to install around the house. While I have these nice enterprise AP’s, I decided to redesign my home network utilizing VLANs to provide a management vlan, home vlan, dmz vlan, and a guest vlan. I set out to do this utilizing gear that I had laying around that consisted of:

To start off, I decided that I was going to utilize my two e3000’s as a router and a smart switch. I decided to continue to use the TomatoUSB ROM on those routers, but upgrade to the Toastman version (1.28.7502.7) that had experimental VLAN support.

The Design
In the end, I wanted to have four different vlans:

  • VLAN2 – Management
  • VLAN3 – Home Use
  • VLAN4 – DMZ
  • VLAN5 – Guest

In addition, I wanted to have multiple SSIDs on the Ubiquiti AP’s that mapped to specific VLANS:

  • Home – VLAN3
  • Automation – VLAN4
  • Guest – VLAN5

The nice thing about the Ubiquiti AP’s is that they allow multiple SSIDs to be set and also it will add tags to the packets. The only gotcha was that the non-vlan SSIDs and AP needed to be setup on a non-tagged vlan or native vlan.

The Problem
After many hours of trying to get Tomato to work correctly, it turns out that the problem is that I needed to have VLAN2 setup as non-tagged, while VLAN3-5 needed to have tagging on. The GUI had an option for setting the default, but that did not work and packets were ignored. The other issue was that the gui didn’t allow you to set VLAN’s that were tagged for a port and then add an untagged VLAN on that same port. It was either all VLANs were tagged or it would only let you select one untagged VLAN and no other VLANS.

The Solution
After many hours of trying to figure out what was going on, I realized that the firmware wasn’t handling untagged traffic correctly. The solution was that I needed to telnet into each of the routers and update the nvram values directly to specify that the port should be used, but not tagged, while the other VLANS would be tagged.

Read more »

Accessing your eBook collection managed by Calibre without Calibre Server

This post is about how I’ve been going about enabling access to my eBook purchases that are managed with Calibre without actually using the built in Calibre Server.  All of this is running on Linux, with my eBooks and Calibre Library sitting on a remote Linux File Share.

The reason that I’m not using the Calibre Server to do the distribution is because:

  1. I actually store all the eBooks and the Calibre database on a Linux file share that is then shared on my network using Samba.
  2. I use multiple computers to interact with that Calibre database (not at the same time).  They are all setup to open the database on the samba share.
  3. The file share is headless and does not have X installed

So to do this, the first thing I had to do was setup the directory on my file share and then setup samba to share it out to the network.  Once that was done, I then mounted the share on my client computer.  With that done, when I started Calibre for the first time, I just change the configuration to use the samba share directory.  Now whenever I open Calibre, all the eBooks and database files are now stored and shared internally on my file share.

Read more »

MSI Wind and Triple Booting

So I just purchased an MSI Wind from Microcenter and have already removed all the OS’ from it. I’m planning on installing Windows XP, Mac OS X, and Ubuntu Linux. Like most of my laptops, things are just plug and play to get it working, so I have a page to help me remember how I did it at: http://james.jamesandkristin.net/setting-up-msi-wind-to-triple-boot-windows-mac-os-x-linux

So far it looks like it’s perfect for what we need. A nice little laptop that will fit in Kristin’s purse and that will fit in little safes on vacation. Luckily my friend had a usb to ide adapter, so I didn’t have to purchase an external hard drive. I had looked into making a usb boot disks for all three os’s and even looked at using netboot to install. Netboot would have been cool, but I don’t have that much time to get it setup for all three OS’s.

One important note, you need to install Windows XP before anything else.

Another wordpress / gallery upgrade

Well, I’ve managed to upgrade wordpress and gallery again. It’s been a while, so the versions were pretty far behind. One nice benefit of this upgrade is that the photo gallery is now working again. Enjoy.

Still trying to upgrade

Hopefully nobody has noticed, but I have upgraded the blog software to the latest and greatest version from wordpress. It was only about 9 or 10 version behind and 2 years old. If you have tried to go to the photo gallery, you have noticed that it currently isn’t working right now. I’m trying to find time to get that working again. I need to upgrade the gallery software and then upgrade the connection plugin to work with it. Hopefully I’ll have it done by next week. Summer is always the time when I have the least amount of time; Trying to finish the basement, clean the garage, get the yard respectable still, and jet skiing. I’m also working on getting my Solaris Systems certification, which I would like to have done before next year.

Google thinks my home ip is in the UK

You heard right, Google thinks that my ip address that I use at my home is located in the UK.  I know this by the pages google displays to me and the ads I see.  When I do a search on google, I get sent to UK google.  I can go back to the regular google, only to be sent back to the UK google.  The ads on google also display adds for people in the uk.  I got to other sites that use Google Adsense and they will only display adds for the UK.  It’s starting to annoy me.

I’m going through Current for my ISP.  From the looks of it, they are based out of New York.  The service is great and when I do traceroutes, it never goes near the UK.

I’ve spent a couple hours trying to find a way to let google know of the issue, but it’s close to impossible to find a place you can just send an email to let them know of the issue.  I actually had an easier time finding a snail mail address for technical support.  If anybody knows how to get this corrected, please let me know. 

Busy busy busy

Haven’t posted lately because I’ve been so busy.  The few times I have posted, I posted stuff on the family blog since this one is more technical.  If you’ve left a comment and it didn’t show up, that’s because my comment system has been getting blasted with spam.  I’ve tried my best to sort it out, but some probably got lost.  We’re currently working on our basement, so once that is done in a couple months, I’ll probably start working on my MAME cabinet.  Until later, have a good one.

Mike Hauenstein Passed Away

My friend, Mike Hauenstein, had passed away Friday morning at 3:05 am.  His wife, Ann, has posted a message on Mike’s Blog that sums up what happened.  His obituary was also in the paper and I’ve copied it below.

HAUENSTEIN Michael, age 27, of Monroe, Ohio died Friday, October 20, 2006 at 3:30 A.M. at Christ Hospital after winning his battle with cancer. He is survived by his devoted wife Ann, his beloved son Tyler J., his loving parents Tom and Debbie Hauenstein, his supportive sister Sara Hauenstein, grandparents Ed and Mary Jo Heichelbech and Emil Hauenstein. He is also survived by many other family and friends. Funeral Services will be Monday, October 23, 2006 at 10 A.M. at the Paul R. Young Funeral Home, 3950 Pleasant Ave., Hamilton with Pastor Jeff Raker officiating. Burial in Rose Hill Burial Park. Visitation will be Sunday from 4-7 P.M. at the funeral home. In lieu of flowers remembrances may be sent to the Tyler J. Hauenstein Educational Fund at any local 5/3rd Bank. Condolences may be sent to mikehauenstein.com or www.paulyoungfuneralhome.com