Our products, Nanode, wireless, MCUs, electronics and more

AQE Bugs

Posted: January 26th, 2013 | Author: | Filed under: AQE, Repair, Software | Comments Off on AQE Bugs

The Short Story

There’s a bug with Cosm activation. If your Egg is not publishing data, here’s what you have to do, without getting into the details:

Option 1: Send us back your Air Quality Egg, along with prepaid return postage. We will re-program it for you.

Option 2: Update the software yourself. Steps:

  1. Get an “FTDI cable.” You can get one from us ($22 or $13), or your local reseller (or if you have an Arduino laying around…)
  2. Download the latest software from Git-Hub.
  3. Reprogram your Eggs (we’ll post a video and some instructions to help in the next few days).

How to choose an option: We may discover more bugs in the future. Option 2 empowers you to reprogram your Eggs whenever additional bugs are found, or enhancements are published. If you are not comfortable doing that, choose Option 1.

The Longer Story

I have some unfortunate news. Provisioning with Cosm seems to have stopped working somewhere along the way. The good news is I’ve already got a software fix. The not-so-good news is that it’s pretty likely we’ve already shipped your Egg.

As I’ve described in other posts, when your Egg is first plugged into a network it reaches out to Cosm to declare its existence. In exchange for this declaration, (and by virtue of the fact that we’ve pre-registered your serial number) Cosm issues your Egg an API Key and Feed ID. The Nanode should extract these bits of information, remember them, and thereafter use that information to post information to the Cosm website under the prescribed Feed ID. This was all working, but something has changed. The software I wrote for the Base Egg wasn’t prepared for the change. I think the Cosm responses used to be fragmented into two or more packets and that is no longer the case. In a nutshell, Cosm is getting the message and issuing the activation data to the Egg, but the Egg is ignoring that response, and just keeps re-attempting activation.

The technical detail is in Provision.ino in the AQEBase sketch:

static void provisioningCallback (byte status, word off, word len) {

if (status == 1){ //we’re getting the body —

… all the parsing of the response happens here …

and  status is being returned as 0 from the EtherCard library so the response is not being parsed. The fix is stupidly easy: remove the guard and everything works as expected. Honestly, I can’t remember why I put the guard in there in the first place. It was probably cut-and-paste from an EtherCard example.


The simple truth is that this will probably not be the last bug we find that needs to be patched. I wish that weren’t true and that I were a perfect programmer, but I’m not. We (Wicked Device) also can’t afford the shipping costs of offering to personally reprogram everyone’s Egg every time a bug is found and needs to be patched. Fortunately, the whole project is open source and I can push patches up to Git-Hub and announce when bugs are found to the Google Group and blog. I can also post instructions / videos showing you how to update your own units. The problem that remains is that you need a “special” cable to program the Egg units, commonly called an FTDI cable. In retrospect, I wish we had just included one with the Eggs, but we were already up against a wall with cost.

Here is a solution I think is reasonable: we will send you a suitable programming cable from our store (linked above), or  buy an FTDI cable (or equivalent) from the supplier of your choice. This will allow you to reprogram the Egg units anytime you need to. This cable will also be a necessary ingredient for performing sensor calibration in the future.

Please accept my apologies. We appreciate your understanding as we continue to do our best to support the Air Quality Egg community! This has certainly been a learning experience so far.

Fixed My Clicking Roomba!

Posted: May 26th, 2011 | Author: | Filed under: Repair | Tags: , | Comments Off on Fixed My Clicking Roomba!

OK, so it’s not like I cured cancer or anything, but, inspired by my pilgrimage to the Maker Faire in San Mateo this past weekend, I saw coming home to a broken Roomba robotic vacuum a welcome challenge. In a nutshell, the symptom being exhibited was the brushes not turning and the brush cage rising and falling at about 1Hz, resulting in a distinctive clicking sound. After a few minutes of this, the robot eventually gave up and announced that I should clean the brushes or something useless like that.

So I asked the almighty Google if it knew anything about this mysterious phenomenon, and, lo and behold, I arrived at this amazingly clear and eminently useful video on the You Tube.

Roomba Clicking Brushes Repair

I thought to myself, hm… that’s a lot of small moving parts, but yea sure I can follow that…  so I commenced with the disassembly, diving head first into the belly of the beast. Now I don’t know life is like in @dfraser’s household, but I’ve got two shedding cats and a shedding dog, and a generally dusty house. Having watched the video, I was completely unprepared for what I found when I finally cracked open the gearbox for the brushes. I was, to say the least amazed at the scale of the infiltration. I took some photos as I went, and thought I’d share them here. Hopefully they don’t gross anyone out too much!

Anyway, I cleaned it all up, resorting to a toothpick to clean between the teeth of every gear, applied a fresh coating of synthetic grease to the plastic gears, put it all back together, and…. IT WORKS just like new! I’m not gonna lie, I felt like a legend of robotic vacuum repair for about 15 minutes. The moral of this story is that you’d be surprised what you can fix and do yourself. I frequently hear people express a fear of programming, but for me it’s kind of a fear of the mechanical – screws, washers, and gears are mysterious… but once you dive in and take it apart, it’s really not so scary after all! Now for those gross pictures :).