Thursday, June 4, 2009

QR codes

Last week I needed to add the 128 bit WEP key to my phone for my sister's wireless. I looked it up in the repository (where I store a file of wireless keys) and decided that I am too lazy to actually type in all of those characters on my phone's tiny keyboard. Fortunately, there is an application called "Barcode Scanner" on Android that uses the phone's camera to scan barcodes. Appropriate name, eh? It can scan UPC type barcodes and perform a product search as well as 2D QR codes. The QR code can contain a URL, vCard or MECARD contact information, URI for the android market or geographical location, plain text, and many other psudo-standardized formats.

Check out http://en.wikipedia.org/wiki/QR_Code for more information on QR codes.
Check out http://code.google.com/p/zxing/ for more information on the android application.

Since Barcode Scanner can transfer captured data directly to my phone's clipboard, all I need is a way to produce the QR code containing the WEP key. After a little searching, I found and installed a program on my Ubuntu based laptop called qrencode that takes a file or stdin and generates as a png a 2D barcode.

$ sudo apt-get install qrencode


Example 128 bit WEP key as 13 hex pairs:
00112233445566778899aabbcc

$ qrencode -o qrcode.png 00112233445566778899aabbcc


Then I used gqview (sudo apt-get install gqview) to display the png on my laptop's LCD. I fired up Barcode Scanner on my phone and captured the image, decoded it, and copied it to the clipboard just by pointing the phone at the image. It actually captured it at a funny angle, so I consider the QR codes to be very robust. (I think it also does just fine if the image is 30 feet tall and you capture it with a lot of keystoning.) Next I just opened the wireless settings and pasted the key in the appropriate field. Everything worked wonderfully. I was happy even though I reallized I probably did much more work than I had to just to type in a WEP key.

Today I was upgrading Firefox on my sister's computer to version 3. When the incompatible add-ons screen popped up, I remembered the fun experiment with the QR codes and wondered if there was an add-on for Firefox to generate them. I found "Mobile Barcoder" and installed it.

Here is a link to the Mozilla Add-on site: https://addons.mozilla.org/en-US/firefox/addon/2780

Now, I can highlight a block of text, right click and generate a QR code immediately. It is rather convenient. There is also a small mouse over icon in the status bar that provides a QR code with the link to the current page.

2 Comments:

Blogger Jim said...

That QR code extension uses the online-generator at
http://mobilecodes.nokia.com/ to make the images. It would be nice if it would generate them itself, so you didn't have to expose (for example) your WEP key to the world. But it's still pretty cool, nice find!

June 8, 2009 at 3:59 PM  
Anonymous Anonymous said...

Redneck!

June 18, 2009 at 6:14 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home