Tuesday, December 28, 2010

Playing with CHDK

I've spent the morning playing with my Canon PowerShot SD870 IS, loading the Canon Hacker Development Kit on it. I ran through this quick introduction.  So now I should be able to write a script to do some hi-fi kite aerial photography!  It'll complement my arduino-controlled cheap-o camera nicely, I think.

Monday, December 20, 2010

LED Flex Strip Test


My boss understands me -- so he got me a meter of LED Flex Strip from adafruit.  Here's the first test of having Arduino control it.  It's autonomous, actually, and the USB connection is only for power.  That means I could, say, pin it to my bag with a battery pack and have it tell me the current temperature.  Or something.

Sunday, December 19, 2010

Learning Python (Fourth Edition)

Well, I'm only two chapters in to Learning Python, but I'm finding it very interesting. (Happily, Mac OS X has version 2.6, these days.) I picked python partially because Google uses it so extensively -- but it also seems to be handy in general.  I just keep seeing it everywhere.

When I started learning perl, ages ago, it really opened up a lot of new intellectual opportunities for me.  With perl, if I had a text stream, I could parse and extract from it -- and everything was text then!  I'm hoping Python will be an "enabling" kind of thing like that too, but up to date for the now.  Here goes....

Tuesday, December 7, 2010

Linux, Swap and Render Farms

The debate occurred again last night, with a Cinematics group, about how best to configure their linux render nodes.  We're running a bare metal hypervisor, with two guests running RHEL 5, on a pair of xeon 5520 processors, with  12 Gb RAM and a slow-mo SATA disk.  How should we allocate RAM to the guests, and do we want swap?

Sven immediately offered this article on how mysql behaves on a NUMA CPU architecture, which suggests to me that I might as well turn swap off.  The counterpoint (and traditional view) is that a linux machine must have swap, as a part of its normal modus operandi.  So far, the render nodes show no difference with/without swap (so I turned it off) and two virtual guests outperform one OS running on bare metal.  I suspect the virtualization layer is sticking one guest on each of the processors, so their RAM is staying local to the CPU they're on.

I don't know the answer, but it's gonna be interesting.  If you're in the same boat, you'll appreciate this handy secret-decoder-ring for vmstat.  And here's a primer on "swappiness."  Also, here's the middle road solution, enable swap, but just a pittance of it.

 Finally, if you're running a render/compute farm, you'll find these bits handy ... there's a lovely o'reilly article on how the linux out-of-memory killer works.  You'll also be interested in this article on how linux memory overcommit works.  And finally, if you're trying with and without swap, here's a quick bit on how to use a normal file as swap, so you donut have to repartition anything to test the on/off configs.

Hopefully this helps someone!

Sunday, December 5, 2010

What Domains did ICE Shut Down?

I was curious; which actual sites did the Attorney General shut down?  Well each seized domain has had its name servers' IPs replaced with 74.81.170.109 and 74.81.170.108.  So the closest I could get, was to use a tool to find the A records that aim at a particular IP and see all the names those IPs are going by.  (Looking up the PTR doesn't work, so you gotta be a little sneaky.)

If you do this on NS1, you get a list of ns1.somedomain.tld entries in the resulting web page, and if you copy and paste the list into a text file you can clean it up like this

  ` cat textfile | awk {'print $1'} | grep -i ns1 `

Which currently (Sunday, December 5, 2010, 23:30 GMT) results in only thirty seized domains' name servers and ns1.seizedservers.com itself:

ns1.2009jerseys.com
ns1.51607.com
ns1.amoyhy.com
ns1.bishoe.com
ns1.borntrade.com
ns1.boxedtvseries.com
ns1.boxset4less.com
ns1.burberryoutlet-us.com
ns1.burberryoutletshop.com
ns1.cartoon77.com
ns1.coachoutletfactory.com
ns1.dajaz1.com
ns1.dvdorderonline.com
ns1.dvdprostore.com
ns1.handbag9.com
ns1.handbagcom.com
ns1.jersey-china.com
ns1.lifetimereplicas.com
ns1.louis-vuitton-outlet-store.com
ns1.mydreamwatches.com
ns1.oebags.com
ns1.realtimberland.com
ns1.rmx4u.com
ns1.seizedservers.com
ns1.skyergolf.com
ns1.sunogolf.com
ns1.throwbackguy.com
ns1.tieonsale.com
ns1.topabuy.com
ns1.torrent-finder.com
ns1.usaoutlets.net

I am definitely doing something wrong -- that's significantly less than the 82 being reported by most bloggers.  Naturally, the government has no comments on what domains they've seized.  (I'm not sure I like the sekrit-p0lice implications of that.)  Also interesting to note, they're running both google analytics and piwik on their take-down notice page.

Wednesday, December 1, 2010

Barcode scanning on iFone

I was chatting with Sven the other day about how nice it'd be to have a simple barcode reader that talks to a desktop machine. Basically, he just wants a "keyboard" that takes barcodes as input and "types" them as output over USB/bluetoof/whatever.

I looked at a bunch of apps and about half of them only read QR codes, or if they do read "1-D" codes, they only recognize valid UPC codes, not the barcodes on tapes.  Also, it seems like the best way to scan is to make a "scanning stage" where your phone is stationary and you just put tapes in front of it. Autofocus seems to try to lock-on to the background, missing a tape that you're holding in your hand.

I found these:

ZBar : Open source! Captures barcodes very quickly. Unfortunately no "batch" scan mode, you have to click the Camera icon after each scan to return it to scanning mode. You can capture a whole bunch of codes, that it stores in RAM, and then email the whole list to yourself. Very nice, and could be haX0red into a custom application if we had a C++ dev.

iCody: Eight bucks, but well worth it! Lets you crop your camera input down to just a section, so no auto-focus garbage, nor problems when multiple codes are in the view. Captures a whole batch into RAM, and then lets you send those in email. Also, I didn't try it, but it's got a desktop applet that you can run, and if iFone and Mac are on the same wifi, it'll send codes directly to your Mac -- if it works, that's a winner. :)

And the ones I tried that donut work for scanning our backup tapes:
RedLaser: Won't recognize tapes, only takes 1-D barcodes that are UPCs. (It's a shame, since they have a nice SDK.)
ScanLite: only does QR codes. (It's a shame, as they have a web API that lets you write your own webapps that use the iFone app as input.)
codeREADr: only does QR.
i-nigma 4: only does QR, despite suggesting otherwise in the description...
BeeTagg : only does QR

So there you have it, that's what I gleaned in a couple hours over the weekend.  Share and enjoy!

Android on my iPhone 3G

Well, here it is, my old iPhone 3G is running droid. I tried the "simple" bootlace method, but ended up diving in deeper than expected. I had to go with the dev team pwnage tool on my Mac to get jailbroken in the first place, then connected to a linux machine to do the actual boot loader install, and then bootlace got the iDroid bits installed so the boot loader could see 'em. But it works!

Sunday, November 28, 2010

Kite Aerial Camera -- Ready to Fly!

Here it is, the kite aerial photography camera is ready to go. I've got two relays wired to two different digital out ports on the Arduino. Those relays short out the "mode" button and the shutter button on the cheap-o digital camera.

All the Arduino's doing is powering up and waiting ten minutes -- then it presses the "Mode" button once, waits three seconds, and then starts pressing the shutter button every few seconds.  We tested by hooking it all up and letting it run in the livingroom.  It works!

On the day of our first flight, I'll take a laptop, so we can change the timing if we need it -- and also so we can offload the images between runs.  This should be fun.

Friday, November 26, 2010

Rewired the Cheap-o Camera

Okay, so we soldered some solid jumper wire onto the posts of the two switches on the Aries Digital Keychain Camera (3-in-1!). You have to press the Mode button on the front to power it on, and then press the shutter button to take a picture. So you short the Mode switch and it goes "beep" to tell you it powered on, and then you short the shutter button and it beeps as it takes a picture. So with those wires run to a solderless breadboard, and my relays and transistors at the ready, the next step is to get arduino to press the buttons for me.

Wednesday, November 10, 2010

Picking a Kite

I can't decide yet -- I'm used to parafoil kites, and they seem like a good stable platform.  But the easy deployment of a box kite is appealing as well.  Or do I go old skool and just get a diamond kite.  I think I'll go with a light-weight line -- I don't expect to be in high-wind, and I think it'll save weight.  Parafoil, box, or diamond .. what's your vote?

Tuesday, November 9, 2010

Ordering Parts for an Arduino-Based KAP Rig


I've wanted to do Kite Aerial Photography (KAP) for some time, but it seemed a little daunting.  But now that I've got some Arduino experience under my belt, it actually seems quite simple!  So I've got a cheap-o little digital camera from the drug store, here.  And my friend Sven just checked my parts list for the bits that'll let an Arduino short the shutter button to snap photos:

So once the parts arrive, we'll see if these codes are worth the price we paid.  (Under five bucks!)  "I don't know -- fly casual..."

Wednesday, November 3, 2010

Manually Creating MacOS Time Machine Targets

You can convince MacOS' Time Machine to backup to just about any volume, local or network, as long as you prepare it with a specially-named "sparsebundle" file in the top of the volume you want to backup to.  Here's an example of how I get Time Machine to backup to my NAS appliance.  Here's my setup:
  • My computer is named "neap"
  • My NAS appliance is named "spring"
  • My NAS appliance has a CIFS shared volume called "backups"
First thing you have to do is create the sparsebundle file.  What Time Machine is looking for is a sparsebundle file named with your system's hostname, then an underscore, and then your machine's main ethernet address, with ".sparsebundle" on the end.  Furthermore, the volume name has to be "Backup of " your hostname.  You have to create this on your local system -- not directly on the NAS volume -- I've got no idea why.  I use a command-line invokation of hditutil, to do this.  Open the Terminal app (In your Applications directory, in the Utilities subdirectory) and issue this command:

  hdiutil create -fs HFS+J -volname "Backup of `hostname -s`" `hostname`_`ifconfig en0 | grep ether | awk '{print $2}' | sed s/://g`.sparsebundle


Or if you would like to define an upper limit to how much space this Time Machine target can occupy total, add a "-size" argument, like this:

  hdiutil create
-size 420g -fs HFS+J -volname "Backup of `hostname -s`" `hostname`_`ifconfig en0 | grep ether | awk '{print $2}' | sed s/://g`.sparsebundle

Kewl, now mount your target NAS volume.
  • In the Finder I choose "Connect to Server..." from the "Go" menu.
  • I enter "smb://spring/" since "spring" is the name of my NAS file server.
  • Click connect, and when prompted I supply my connection credentials.
  • From the list of available volumes on "spring" I select "backups" and click OK.
And now I move my new "sparsebundle" file into the NAS volume.  Again, on the command line.  In the terminal I issue this command:

  mv *.sparsebundle /Volumes/backups/

And at this point, I can run Time Machine as usual, and tell it to backup to the network volume.  I do this:
  • From the Apple menu, I select "System Preferences"
  • Click the "Time Machine" icon.
  • Click "Select Disk"
  • It should list the NAS volume, in my case it's "backups" on "Backup to spring"
  • I click the volume name once, then click the "Use for Backup" button.
  • I supply my username and password, so that Time Machine can reconnect in the future.
  • After that, Time Machine switches to "On" and starts counting down to the next backup.
And that should be it.  When the countdown hits zero, Time Machine should begin to backup to the NAS volume.  Seriously convoluted, but now you're backing up to a NAS volume, and optionally you've set an upper limit on disk space your backups can take -- so Time Machine won't try to fill the disk.  w00t!

Monday, November 1, 2010

My Diagram 17

It has come to my attention that my diagram of career and washed-up dreamerness wasn't entirely legible. So, I took the photo and traced it in OmniGraffle on my iPad. Here's one that's totally readable, at least if you click to zoom in.

Some things I notice:  "user evangelist" and "tech evangelist" are adjacent, and point at each other.  Also, I've specifically made "new tech discoverer" its own bubble -- it's one of my favorite things to do, along with sharing my discoveries.  The "architect" and "data miner" bubbles don't really tickle me the way they did when I first drew this; dunno why.  "Teacher" is at an interesting intersection.

Reading my own mind-maps is kinda like throwing tarot cards.  I just talk bullshit until the customer starts nodding their head.

The blocks in the lower left are prerequisites, of a sort.  My dream job/life/whatnot involves either a "volcano lair," or some sort of intellectual "salon."  Actually, this is probably why hackerspaces appeal to me.  (See also: 'fricken lasers.')

Finally, I'm not sure of the purpose of the "monkey line" in the bottom right, other than to delineate between things that are helpful and unhelpful.  And of course, they're likely to turn out to be just a "pot" that calls the "kettle" black.

Please be careful; the monkeys bite.

Wednesday, October 27, 2010

When your Purchases have Memory

So I was reading an article on flexible graphine memristors, which are a non-volatile data storage device.  And I was thinking about how most modern electronics actually are washable -- as long as they don't have power attached.  And so I thought, what if you put flexible memory devices in clothing, they'd be just like any other tag on it.  And then I thought okay, what if I add a radio antenna and attach it to a microprocessor that's small enough the radio waves alone are enough to power it.

Now you've got a bit of data-storage that you can attach to every item in a store, that can be read and writen at a distance over RF.  And it's flexible, so it can stay attached for the life of the product without bothering your customer.

Kewl huh?  Imagine walking into a clothing store and they know exactly how much you paid for each item you're wearing.  Did you pay full price?  Did you buy each item by itself, or as an outfit?  How long after the new products came out, before you purchased them?

What if other retailers "bomb" the tags of their competitors, so that after you've visited a Levi's store, your Lucky Jeans start lying, saying you bought them at a total loss to the retailer .. and months after they came out?  What if you rewrite your own tags, to get better service, by setting off the "pays full price, buys multiple  items at once, adopts early" flags in a target retailer's scanners?  And that's just clothing.  I can't wait to mess with more ubiquitous computing.

Tuesday, October 26, 2010

Professional Communication for Tech People

I need a book that teaches tech people how to communicate in professional settings.  We know how to talk to each other, but when we're out in the wild we could use some help.  This book would provide multiple "zoom levels" of content, so for each subject I could read a thirty-second treatment, a five minute overview, or a thirty minute in-depth analysis.

Here are a few sample subjects:

  • How to talk when a translator is mediating a language difference.
  • How to be clearly heard, when talking on a conference room speakerphone.
  • How to start a new wiki page on a technology, a process, or an unstructured subject.
  • How to write Service Announcement emails that will actually be read by normals.
  • How to write clear, memorable technical policies that apply to non-technical people.
  • The art of the elegant tweet.  Corollary: the perfect-size blog post.
  • Making a resume that matches on broad keyword searches .. without looking like it!
  • Presenting super-confident slideshows even when you don't feel it.
  • Building powerpoint presentations that don't suck.
  • The basic "network diagram" and the basic "flow chart" visual conventions.
  • Ninety-nine Star Wars & Princess Bride quotes everyone should know.
Can someone please write this?  KTHX  BAI

Old-Skool Ambient Notification

It's fun to think I'm travelling into the future, implementing ambient notification and using ubiquitous/wearable computers.  But the fact of the matter is that ambient notification is very old.  The most obvious example is the cathedral bell tower that chimes every fifteen minutes and tolls on the hour.  I also like to think that skylights ambiently inform you of the time of day and outdoor weather without having to look at them.  What else?

Old-School Pasteup

We got new business cards at work, with better, more-descriptive titles. The layout looks unbalanced to me, tho, so I cut one up and balanced it. It's so easy to submit a digital print job to a professional bureau, these days, I wonder if I should just redo mine on my own...

Monday, October 25, 2010

Pay with Square

Got my Square card reader the other day. And last Friday I received my new, improved reader.  I've actually used it twice already, when someone owed me for lunch but only had a credit card.  (That's actually the creators' original use-case!)

TV-B-Gone Ready

Here's what the kit looks like after a slightly-sloppy soldering job and with a couple pieces seated incorrectly. It works, tho!

Getting Started with Processing

I finally finished the Getting Started with Processing book. It's been the one I carry around for when I'm getting the oil changed, having lunch alone, or have a moment at the pub. Here's what my screen looked like after the penultimate chapter.

Sunday, October 24, 2010

Disassembling Dead Hard Drives

Being in my company's storage-admin group (among others) means I end up with plenty of dead hard drives to play with -- so I've been disassembling them.  It turns out the faster/better/iops-i-er ones have more physical platters in them.  A cheap SATA drive will often have just one, where the SAS and FC ones have five, or in some cases three.

I wanna make the loose platters into an art project.  I used to have a clock I made from an old 7" platter.  If I can figure out how to hack up the heads with a jig-saw, they'd make excellent clock hands.

Saturday, October 23, 2010

Diagram of Career and Washed-Up-Dreamer-ness

I was talking with my friend justkristin, the other day, and we were chatting about dream jobs, dream fame, and nightmares. Since there's nothing like a whiteboard to make your junk look official, we drew some stuff. Here's what we came up with.  I think it's important to note that "volcano lair" isn't just in the "want" column -- it's a "must have."

Journals I Like

I had the idea to fill some space by describing the various periodicals I receive and actually read. They're kinda odd, but peculiarly interesting to me. Well the draft "placeholder" post has been here for six months and they're not getting written. So let's clear the decks:

  [x] Nature : Already talked about this one in this post.
  [ ] Copeia : Yep, that's a society of Ichthyology and Herpetology.  Buy one, get one!
  [ ] Fantastic Man : Because you never know when someone's suddenly gonna demand "vest or cummerbund?"
  [ ] IEEE Oceanic Engineering : Kewl swimming robots, though lately they're mostly militarized.
  [ ] Game Informer : It's not a job, it's a text adventure!
  [ ] Make : Like the anarchist's cookbook ... except written by responsible adults.

Tuesday, October 19, 2010

Why Sysadmins dig Motorcycles

I've noticed that the clever sysadmins I'm friends with all seem to groove on motorcycles.  Even if they don't have one themselves, they think that in general they're pretty keen.  Why is that?

Well, you can replace the stock parts with all sorts of other parts -- just make sure you screw everything back on nice and snug!  And a particularly kewl arrangement of parts always leads others to comment "nice hack," or "nice bike."  Some folks shoot for the aesthetic, and other folks go for something that "just works," but either one seems to garner a little praise in its own category.  So there's that parallel.

Also, we're both always looking ahead for hazards .. almost pathalogically.  This is likely because no one sees you until the very last moment before they mess your stuff up.  You've got everything very nicely balanced, thanks, as long as you know ahead of time where the bumps are, and when you're going to have to turn.  In fact, we probably both swear in similar ways when something unexpected pops up in front of us.  That's a clear similarity.

Now the only thing we're missing is the "biker wave."  Which is a shame.  Or do I just not know what the "sysadmin wave" looks like?

Wednesday, October 13, 2010

What's my "Disruptive Skill?"

An IEEE newsletter pointed me at a great Harvard Business Review post by Whitney Johnson, that discusses the idea of a "disruptive skill."  Why and how do you beat the competition?  And why is it unique to you?  I'd like to be a cross-pollinator -- a modern day Doc Ricketts, Doc Brown, or Doctor Demento.  Sometimes your *weird* skills are the most valuable.

TV-B-Gone Matchbox

 Czech this out, it fits!  I like to get the matches that come in a little box, you see.  And then it occurred to me that my Adafruit TV-B-Gone Kit looked like it's about the same size.  And it is!  So the next time we're in a sports bar, and you see me take out a box of matches, prepare to see a bunch of TVs turn off magically.  :)

Saturday, October 2, 2010

Fixing Google Talk on Ubuntu 10.10

what it looks like on my screen..
I love the unified chat/broadcast/email bits that are integrated into the main menu bar of Ubuntu 10.10 Marvelous Merkin.  For some reason tho, the current Google Talk settings don't work right out of the box.  Here's what you have to do, once you've got the chat app running:
  • In your contact list window, select Accounts from the Edit menu.
  • Click once on your busted Google Talk settings icon (on the left).
  • Click the triangle to expand the "Advanced" settings.
  • For "Server," supply "talk.google.com."
  • Leave the "Port" at the default, "5223."
  • Click to add a check to the "Use old SSL" option.
  • Click "Apply" and it should log you in just fine, now.

Fixing the Hibernate (&c) Problem on my Vaio running Ubuntu 10.10

Holy crap that was messed up.  I recently installed the alpha, then the beta, and now the release candidate of Ubuntu 10.10 Marvelous Merkin on my Sony Vaio M111AX.  Problem is, where my laptop could sleep, hibernate, restart and shutdown just fine under 10.04 Lucid, it was now just wedging with X mostly shut down but the desktop background still there ... taunting me.

It turns out the problem is in one of the the Ralink drivers.  And since this machine uses an Atheros for WIFI, I really don't need Ralink.

So I edited /etc/modprobe.d/blacklist.conf to add a few lines at the bottom:
blacklist rt2800pci
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00pci
blacklist rt2x00lib

It's likely overkill, as the rt2800pci is the particular one that causes the problem on this particular model of Sony.  But I'll bet other laptops with similar problems will benefit from this more inclusive list.  (And `lsmod | grep rt` will tell you if you have others, in case this set doesn't do it.)


After you edit the file, tell your system to reboot.  On this last reboot just after editing the file, you'll wedge like usual, but the subsequent ones will blacklist the ra2800 drivers correctly, and reboots will work just fine.  Phew!

Update 20110906:  Newer Ubuntu distributions starting with 11.10 (Obsequious Ostrich) include version 3.0 of the linux kernel.  Applying these instructions to a 3.0-based system will result in no wifi connectivity at all.  If you followed these instructions for a 2.6-based system that you intend to upgrade, you'll need to undo them when upgrading to a 3.0-based system.

Tuesday, September 28, 2010

More EL Wire

W00! This is a test of the "angel hair" 1.2mm EL wire. I picked up a few short lengths of a few colors. This one's the "blue-green." I just ordered a bunch more, so I can try tacking it to my little-used lighter-weight motorcycle jacket. TRON Halloween, anyone?

Wednesday, September 15, 2010

Keep Momentum .. from Haystack to eVoting Machines

The internet is abuzz about Haystack Network.  Their product was a network anonymizing system that promised to undetectably pierce Great Firewalls, and obfuscate the location of internet-connected dissidents.  Haystack's abilities were trumpeted as a victory for free speech -- and since the buzz coincided with Iran blocking internet sites during its elections, it enjoyed bi-partisan praise from both John McCain (R) and Hillary Clinton (D).

It turned out to be snakeoil.  Like its metaphorical counterpart, Haystack contained inneffective ingredients at best, and poison at worst.  Not only did it fail to leap firewalls or protect the location of users, it announced itself on the network and was easily hijacked!  (It also does not cure bilious humors.  Don't ask how I know.)

The problem with snakeoil is the "secret ingredients."  Haystack refused to tell anyone how the app worked its magic -- claiming that to do so would allow attackers to foil it.  This is "security through obscurity" and it should give you the heebies.  Cypherpunks cite Kerckhoffs' principle and tell you that a truly secure system remains secure even after the enemy figures out how it works.  Otherwise, you're only buying time.

So here's my thought.  This tale runs directly parallel to that of electronic voting systems.  Yes, we're excited to have a system that avoids dangling chads and ballot stuffing.  And we're told that the systems we're buying are secure.  But we're told that if the general public knew how they work, they'd be instantly prone to foul play.[needs citation]  "Cures what ails ya?"  Shenanigans!  And research suggests the same.

Haystack Network's vaporware was celebrated on both sides of the aisle -- so backlash and embarrassment should be bi-partisan as well, right?  (Or swept under the rug twice as fast.) Can we take the momentum from this lesson learned and apply it to the electronic voting systems that are being peddled to us?  These things need to be secured, publicly proven, beat up and disassembled -- even if it's not cost effective for the suppliers.  Let's demand it!

Also, tin-foil hats for everyone.

Saturday, September 11, 2010

My Most Obscure Ping Artist : The Mynabirds

Setting up my Ping profile in iTunes, it was interesting to see how many followers each suggested artist currently had.  The most obscure of the artists I followed?  The Mynabirds.  In the interest of share-a-like (so to speak) here's their homepage, their info at Pandora, and a link to them in iTunes.  So, who's your least-followed artist?

Thursday, September 9, 2010

Installing the Ubuntu 10.10 Beta

Sometimes a product manager says "hey, why not?" and you don't have a good answer.  So you implement it.

I just kicked off an install of the beta of Ubuntu 10.10 Marvelous Merkin on my netbook and it does some things in parallel that totally make sense, but you never thought of it.  It starts partitioning your drive and copying files *before* it asks your timezone and keyboard layout -- it asks those configuration bits *while* mucking with your disks.  "Why not?"  Oh, did I mention, I'm writing this post on my netbook while Ubuntu is installing in the background?  This is a really subtle, but really kewl difference between this and other OS installs.  A focus on making your computer useful ...  even while you're installing a whole operating system.  I like it!

Sunday, September 5, 2010

Pinout of a PCB-mounted USB "B" Receptacle

Step one of making an Arduino impersonate other USB devices is to wire-up a USB "B" receptacle so you can attach it to the Arduino's 5V, Ground, and three digital outputs.  Finding the pinout of the receptacle is easy -- but I had to get out the multimeter to discover how that passes through to the bottom side of the thing.  I *think* I've got it...

Monday, August 30, 2010

The Blinky Take-Out Box

Alright, so here's what I came up with. It's USB-attached, but only for power. Next step, make it read the serial port and do what a Processing app tells it. Meanwhile, it's happy to loop randomly.



The loop() is very simple. It flips a coin to decide whether or not to glow red, then waits between 0 and 1000 milliseconds. It flips a coin to decide whether or not to glow yellow, and then waits between 0 and 2000 milliseconds. Finally it picks a random number between 1 and 8, and blinks the green lights that many times.

Saturday, August 28, 2010

Twenty-Four Hours of EL Wire

Now that I've got enough parts, and soldered the right ones to each other, I've got an Arduino controlling a few short lengths of EL Wire. I'll make a separate page for the complete saga, but the short story is this: I started with sparkfun's EL Escudo, soldered on header pins, used a transformer from coolight.com, used EL wire from a starter kit, soldered JST connectors on the EL wire, attached to USB for power.

I keep zapping myself, reminding me that, "volts hurt, amps kill."  It's surprising when it gets you, but it hasn't done any permanent damage.  :)

Friday, August 27, 2010

Ninety-Nine Cent Laser

This cheap little keychain laser-pointer was marked down to ninety-nine cents, at Fry's. It's so cheap, the "gold" on the "metal" parts is flaking off from something that looks corrosive. Also, it "Exceeds FDA Standards" ... whatever that means. I bought two! Dunno what it's gonna be when it grows up, but I'll send one to my brother and see what he comes up with...

Monday, August 23, 2010

Trouble with the EL Wire starter kit

I got out the EL Wire starter kit, but it's not entirely compatible with anything else I've got. The transformer makes a squeely sound when it's switched on, and the connectors aren't something standard. So I got parts delivered last week, and more parts on order for this week. By next weekend I should have everything to power it and control it from an Arduino.

Color me Kindlerlined

UPDATE: I've upgraded to a Kindle Fire.  The ability to automatically tweet the notes I take in books is either not available, or it's hidden.  Plenty of new and exciting social tie-ins, but nothing as simple as the old behavior.  The below-mentioned feed of tweets is now dormant.  (20120331)

Amazon recently added the ability to tweet the things you underline in your kindle.  So I set mine up.

And then I was thinking about my friend Andrew's flash app, where you tell it a keyword and it finds recent tweets that contain the keyword -- but then you tell it more sub-keywords and it colors the tweets in the original search if they include the sub-keywords.

Well, the amazon kindle tweets are easy to spot, because they all contain "amzn.com" in 'em.  So here's what happens if you use Andrew's flash app to find all the kindle-posted tweets, and then run some sub-keyword coloring on it.

Borrowing Icons for Presentations

I got to present an introduction to virtualization, for the project management group at my work.  Putting it together (keynote on iPad, believe it or not) I needed some clear illustrations of computers and things.  I ended up using icons from the Gnome "tango" interface.  And I borrowed another one or two from KDE.  If you have do technical presentations to non-technical people, they're both great sources of art to borrow.





Oh, and since I'm the official "anti establishment on principle" guy on the team, I ended the presentation with Mark Goetz' awesome powerpoint public service announcement.

Tuesday, August 10, 2010

New Toys

It's a really small VGA display!  I've been considering what it'd take to build a "KVM in a bag" for work and home.  You know, 'cause you only need to plug a monitor and keyboard into things, what, twice a year?  So why keep a fricken 21" wide-screen monitor and a full size USB keyboard in your closet all year?  I also got a power adapter. I'm gonna need a compact male-to-male VGA cable, tho. What is it about me and miniature crap?

Processing 1.2.1 on Ubuntu 10.04

Okay, so I've got my copy of Getting Started with Processing, and I'm also now signed up for Arduino and Processing in Tandem.  So I'd better get Processing 1.2.1 running on my netbook, which is running Ubuntu 10.04 LTS Lucid Lynx.

The trick is that when you untar the processing package, nothing that comes out of the archive is executable.  It's a sensible default, but means you gotta specifically make things executable.  If you know how linux works, just chmod the "processing" script 755, chmod everything in the included java/bin/ as 755 and run ./processing from its directory.

For the rest of you, here's how I did it, in extra-verbose detail, step-by-step:
  • Download Processing 1.2.1 for Linux.
  • Reveal the downloaded file in a directory window.
  • (In Chrome: click "Show all downloads," find processing, click "Show in Folder")
  • (in Firefox: the download manager lists your files, right click processing and click "Open Containing Folder")
  • Drag the processing tgz file onto your desktop.  (For this example, at least...)
  • Right-click the tgz file on the desktop and select "Extract Here"
  • Open a new Terminal window.
  • (it's in the main menu: Applications -> Accessories -> Terminal)
  • In the Terminal, change directory into Desktop, and into the extracted processing dir.
  • (in this example: type "cd Desktop/processing-1.2.1" in the terminal, but your version number might differ.)
  • Make the processing script executable by all users.
  • (for this example: type "chmod a+x processing" in the terminal)
  • The package includes a compatible version of java, which also needs to be made executable.
  • (for this example: type "chmod a+x java/bin/*" in the terminal)
  • And now you can get processing to open by running it from a Terminal.
  • (in this example: type "~/Desktop/processing-1.2.1/processing &" in a terminal
  • And that's it!  In the future, I just open a Terminal and type "~/Desktop/processing-1.2.1/processing &" again.
It took me a second to figure out, so hopefully this saves someone else a little trouble.  And of course it might save me some trouble the next time, when I've completely forgotten what I did.  Because that happens.  Often.

    Tuesday, August 3, 2010

    Shelving the Zipit Z2

    W00!  I've now got a million weekend projects queued up, so the Zipit Z2 is going on the shelf for a bit.  It tweeted SSIDs and base station MAC addresses from here to Las Vegas -- which I like to think is a sort of modern-day stellar cartography exercise.

    As soon as I need a cheap-ass, wifi-attached web/ssh server, it goes back into service. Meanwhile if anyone wants to borrow it ...

    Monday, August 2, 2010

    Two-Conference Backlog

    And now I've got two conferences-worth of notes on the ipad, and no blog posts about either.  I've just wrapped up at Defcon 18, in Las Vegas.  I took my Zipit with me the whole time and scanned wifi SSIDs and base station MAC addrs occasionally.  One has a really wacky vendor ID on its mac addr.  Also, I attended the beginner lock picking presentation, and showed my financial support for toool.us, for which I received some hardware.  There was a bunch of fun info on how people hack games.  And a whole bunch of kindling to add to my dreams of opening a San Diego hackerspace.  Now I just gotta get posting!

    Thursday, July 22, 2010

    Skyhook Geolocation with a Zipit Z2?

    I've been tweeting the wifi access points that my Zipit can see.  It just occurred to me, I should be able to stuff that into the Skyhook API and get a decent latlong value.  Hrm...

    Looks like I'll need to get python working on the Z2.  Another possibility would be to gather the base station MAC addrs and post them raw to a cgi-script elsewhere, letting my own server do the skyhook request (and SimpleGeo post).  That's cheating, tho.

    Tuesday, July 20, 2010

    New Netbook ... and the Old One Lives On

    I got a Vaio M111AX a few weeks ago, and decorated it with the new Cat Woman. Comic book heroes seem to work really well for netbooks. What's funny is it turns out this was perfect timing, as no sooner did I put my beloved Wonder Woman netbook in a cabinet, than my brother asked if I knew any netbook models that are good to purchase used.

    So, Wonder Woman is headed north, so that my brother can take her to burning man, just in case he needs to reprogram his pants. (Yep, I said "reprogram his pants.")  Recycling is awesome -- the Wonder Woman netbook has a completely new life, now!

    Monday, July 19, 2010

    Even more Zipit fun

    I know!  I know.  I can't stop.  I just loaded IZ2S (enhanced) 2.05b onto my Z2.  The dialog-based wifi setup is easier.  Also, the console font fits lots more columns on the page.  I copied over my script that scans for local wifi SSIDs and then posts to twitter -- it works just fine.  Gonna leave this one in the SD slot for a while -- it's great!

    Wednesday, July 14, 2010

    Zipit

    That's Sven messing with the Zipit Z2.  Shortly after this, he demonstrated that you can, indeed, record audio on the thing.  Then he discovered the nfs filesystem support.  Sadly, sunsite no longer exports a public, read-only nfs volume to test against.  (I'm not kidding, he tried.)  That was just the first thirty minutes.  It's only a matter of time before he cross-compiles bind and runs n.root-servers.net from it.  I'm taking it away before it becomes the first node in Skynet.

    Sunday, July 11, 2010

    A Weekend of Zipit Linux

    Okay, so I spent a bunch of time messing with linux on the Zipit Wireless Z2, and took so many notes I put them in a separate page.  Installing and booting into the manufacturer's shell environment wasn't too tricky.  Getting the wifi to talk WPA2 was sneaky, but simple.

    Next, I traded up to the IZ2S version of the shell, which has lots more stuff in it.  I got a web server running on the little toy, then figured out how to ssh to it, then finally topped it all off by making a twitter account and having it tweet something.  Zooom!

    Saturday, July 10, 2010

    The Island of Misfit Storage Formats

    So, the Zipit's add-on storage option was designed by Goldilocks.  The micro-SD format, that many cellfones use, is too small.  A standard SD card, that cameras and netbooks favor, is too big.  The "mini" SD is just right -- and who else uses it, I don't know.

    I found a package from Patriot gathering dust at the local electronics superstore.  It's a teeny 2g micro-SD card, but it comes with an adapter to make it a mini-SD card plus a second adapter that makes it a regular SD card.  Problem solved, for ten bucks.

    Now I just need porridge and bed adapter sets.

    Wednesday, July 7, 2010

    Zipit Wireless Messenger 2 (Z2)

    I added the keys, for scale.
    My new toy arrived today, a Zipit Wireless Messenger 2.  This little wifi-enabled palmtop computer caught my attention because you can hax0r it to run linux.  Oh, that and it costs fifty bucks, and we had a four-year-old target gift card for just that sum, gathering dust on a shelf.  Yoink!

    Okay, so I unboxed it, plugged it in to AC so it can charge, and immediately did a google search for "zipit linux."  I expected to see links to some of the hack a day posts, or linux-for-devices posts that I've enjoyed lately.  Instead, I get the company's very own portal to resources for running linux on this thing!  I mean, they even link to tons of detailed tech specs!

    This is a wonderful contrast to some companies' attitudes -- who've removed linux support to placate copyright bullies.  Seriously.  Homebrew.  It'll find a way in, with or without you.  "With" is whey more fun for everyone ... just sayin'.

    Tuesday, July 6, 2010

    Nature

    I've subscribed to Nature for about a decade, now.  It predates my biology degree, so there was a good span of time where I bought it not for the articles, but unabashedly for the photos.  I remember it was because I kept hearing news stories lead in with "as reported in the journal Nature, this week," and I wanted to get it directly from the source.  It's not a cheap subscription, but for me it's a keeper.

    Nowadays, my friend justkristin gets my hand-me-downs after I read them.  Most weeks, I add a post-it on the front, identifying my favorite item inside.  And although I understand the science content now -- a good set of photos is still just as sweet.  Ah, science pr0n.

    Monday, July 5, 2010

    Fixing wifi on a Sony Vaio M111AX running Ubuntu 10.04

    My cute new Sony Vaio M111AX couldn't see its wifi card, a RealTek 2860.  Luckily it's a popular netbook card, and after sifting through this ubuntu forum post, and ubuntu bug 541620, it turns out to be reeeeely simple.  When /var/log/messages (or dmesg) says this:

    Jul  5 14:38:17 smuurgh kernel: [   15.936530] !!! rt28xx Initialized fail !!!
    Jul  5 14:38:17 smuurgh kernel: [   16.409677] RtmpOSFileOpen(): Error 2 opening /etc/Wireless/RT2860STA/RT2860STA.dat
    Jul  5 14:38:17 smuurgh kernel: [   16.409686] Open file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed!
    It doesn't even care what's in the file, just that it exists.  So if you create an empty file:
    sudo mkdir -p /etc/Wireless/RT2860STA/
    sudo touch /etc/Wireless/RT2860STA/RT2860STA.dat

    Your wireless card should appear as soon as you restart the network-manager:
    sudo service network-manager restart

    Wednesday, June 30, 2010

    Dam(n) the torpedoes..

    Do you like being snarky?  And smugly superior?  Particularly about a turn of phrase?  So do I!  And I used to be all pleased with my brainy-ass self because I knew the real origin of the phrase "Damn the torpedoes; full speed ahead," which legend has it David Farragut uttered during a naval battle during the american civil war.

    You see, my eighth grade teacher (and latin teacher, and a naval history buff, and angry chalk-thrower) told us what it really meant.

    You, like the eighth-grade me, might have assumed that these were the brave (and nearly-final) words of a submarine commander.  This commander, upon receiving the news that his torpedoes weren't functional, decided to charge in to battle anyways, maybe to ram something.  Oh but you would be wrong.

    You see, eighth-grade latin-navy angry-chalk man told us, you're spelling it wrong.  It's not "damn" the torpedoes, it's dam the torpedoes.  That's exactly what you do on a submarine right before you launch them.  You load them in the tube, close the door and then "dam" the inside hatch you pushed them through.  That way, when you open the outside hatch to shoot, and water floods into the tube, it doesn't come inside and get on your nice battle-shoes.

    I know!  Is there nothing grown-ups don't know!?

    So I've carried this clever bit of homonym supremacy with me all these years, until just this week when I had to spell "Damn the torpedoes" in text.  I decided to check my facts.  If there's anything worse than being wrong, it's being wrong when you're telling someone that you're all clever for being right when they've been wrong all this time and aren't you a sneaky one for knowing it but then it turns out you've been wrong all this time anyways.  Seriously, it's awful; this is why I check my facts.  Snarkiness is not just a hobby, it's serious business.

    So get this.  It turns out that floating, nautical mines used to be called "torpedoes."  (You see where this is going, I know..) And here's Farragut leading a flotilla to attack some coastal fort or something, and a ship in the front explodes, because it hit a "torpedo."  And everyone's all crazy like "OMG Torpedoez" and Farragut tells them not to retreat.

    So he says, "damn the torpedoes, full speed ahead!"  And that's apparently what really happened.

    Monday, June 28, 2010

    Velocity and Momentum

    I just got back from Velocity 2010 and I'm quite pleased.  Most of the sessions were really informative.  I took tons of notes, so I'm hoping to use my mental momentum to get back in the habit of posting.

    I've also dusted off my little netbook, which is by far the easiest way to do a blog post. Unfortunately, the POS Atheros 5k wifi card is not well supported on the linux side.  It's actually not well supported on the XP side either, but at least you can disable any power-saving functions on that side and it mostly works.  I refuse to replace the card, on principle.

    Naturally, I would like to figure out how this means I need to buy a whole new netbook.  ;)

    Saturday, May 1, 2010

    "Junk" CDROM Blanks

    I was emptying out junk from a cabinet, last weekend, and realized that CDROM blanks are now "junk." Little USB drives are not only easier, they're re-usable. But even those don't get much use -- you can email a couple hundred megs without batting an eyelash. I paused long enough to take a photo on my phone, since this seems like a momentous point in personal digital distribution or something. Or maybe not.  I wonder what we'll be doing in ten more years...

    Be Vewwy Quiet


    I can't hear you Bert, there's a banana in my ear.  Or a tangerine.  I've been racking and hypervising a render farm, so I ended up with both flavors of earplugs in my pocket on Thursday.  The orange 3M ones are seriously industrial grade -- it's a shame they pop out if you try to put a helmet on over them.

    The render nodes' hardware didn't include power cables, so we added those to our order.  HP shipped us forty cables -- each one individually packed in a #5 Jiffypack envelope!  So now I've got forty envelopes, and included in each one is a pamphlet inviting me to visit HP's website for information on their environmental initiatives.  It's like a black fly in your chardonnay.

    It's lucky that I had twice the earplugs, because I ended up installing twice the vmware.  You see, my nodes' hardware isn't "officially supported" for the HP-branded install, but I assumed that I wanted to install HP's branded version of ESXi on them anyway.  Not exactly.  It installs, and reboots alright, but after two minutes it bluescreens.  My first pass, I was just installing and confirming I could reboot, then shutting down each node -- so I installed all forty with the branded hypervisor.  When I went to add IP addressing later, they all ran long enough to bluescreen.  D'oh!

    Everything works now, though!  I just need to come up with an art project that requires forty padded mailer envelopes.  Papercraft armor, perhaps?  With a plus ten enchantment against the purple screen of death, plz.

    Wednesday, April 21, 2010

    iographica for MacOS X

    Where does the time go? I don't know -- but thanks to IOGraphica on my Mac, I do know where my mouse goes. Pretty pictures, from tracking your mouse for a few hours. Goodbye, boring text-only weekly status reports!

    Tuesday, April 20, 2010

    Hard Drive Activity Lights

    Remember hard drive activity lights? Yeah, back in the day they all had them, so they could blink in self-importance when your disk was busy with data-doing things. Then they fell out of vogue, so people wrote little applets that blinked an icon on your screen to do the job. Then those went out of style. No more drive activity indicators.

    Well now that everything is virtual I'd like them back. I've been building an unfortunate number of windows servers, and during the initial tango of reboots and patch applications, you can't really tell when the disk is thrashing versus when the system is ready for input. You kinda get used to waiting for a few seconds of idle-looking-ness and giving it a sort of "are you done yet" drag of a window to see how quickly it redraws.

    I think a simple hard disk activity light would make me feel a little more in control of the situation.

    Tuesday, April 13, 2010

    New Tools

    Okay, I just placed the order for my next Timbuk2 bag. It's the new-fangled Laptop Messenger, with rubbery laptop sleeve and napoleon pocket. Size small, because I'm finding the iPad is just fine as my bring-to-work personal machine.

    I need some other tools too. I need another swiss-army language. Back in the day this was Perl (before that it was Hypercard) and I used it everywhere I saw a nail sticking up. Perl's showing its age and I wonder what I think of python or php. Really all I need is a language that I'm still learning, so that boring little automation tasks are a fun challenge to discover and implement, rather than yet-another stupid perl or bash script.

    Maybe by the time the bag arrives (four or five business days!) I'll have an idea of what language to learn. Or maybe I'll just flip a coin.

    Monday, April 5, 2010

    The Index Card Trick

    Every day you have an index card (Mac OS Stickies note) with the five things you're gonna that day. My lists are things like "load OS on blahblah" or "do draft project plan for froofroo" -- real accomplishments, not just fiddly bits. But I'm really feeling like I'm getting a lot done, with just five each day. So I figured maybe my friends might want to try.

    It's especially nice because five things is totally doable. Or you know exactly what got in the way. It's not a big critical path analysis on some monolithic project plan -- just five things. It's really working for me.

    Oddly, some folks who have no idea that I do this, seem to understand what I mean when I say "okay, I'm putting that on my index card for tomorrow." Maybe it just sounds official.

    Tuesday, March 30, 2010

    Data Exhaust

    I was thinking about data exhaust on the ride in, and I was still thinking about it at my afternoon tea break. So now I will share. I guess the idea of spending my time collecting, redirecting and analyzing the torrential flow of data that modern life creates -- well it sounds like a dream job! It's a cyberpunk thing, the "digital seer." Or maybe they'd have said "shaman."  Hrm.  A little to froofroo mystical, maybe.

    Basically it's what a sysadmin does already for part of their day. It's the especially fun part -- look at all the metrics and figure out what the *actual problem* is. Folks tell us "this server is slow" and we run a couple commands and tell you that you're probably missing some indexes on your database, even though we didn't look at the inside of your database. It's like magic, but not at all.

    Wouldn't it be interesting to try to formalize or mechanize that? Watch and see what handful of tools you use to take the pulse, then make that an automatic script? Isn't that basically what the data visualization nuts are doing -- translating metrics into something that doesn't require "work" to explore? Are there tell-tale metrics (or ratios of metrics, or red flags) that let you see the proteome of a running system, so to speak? If you show others how it's done, is it still magic?

    Maybe that's exactly what I like about my imagined profession.

    What if our diagnostic craft stopped looking like magic and started looking like art?

    Tuesday, January 5, 2010

    Arduino Mini

    Got my Arduino Mini yesterday, and hooked it up. Here it is with both the main board and the USB adapter fitting on a mini breadboard, saying hello world (on pin 10, rather than 13). The reset button is wacky, 'cause it's got to bridge adjacent pins, so it's kinda diagonal there.