Attention lovers of all things cubic:
Cubes are a source of great joy and wonder, but occasionally, they can also be a source of frustration. Nothing can ruin a day like a cube that's not responding Well no longer! Today, we're releasing a new tool called CubeDoctor that can get a non-responsive cube back to factory-fresh condition with a single click. Just plug in your cube to your computer over USB, boot up the app, and click the button!
You can download CubeDoctor for Mac and Windows.
For the curious programmers, the source code for both versions is available on github.
But why was my cube screwed up in the first place? you may ask. And how does CubeDoctor fix it?
We saw a spike of cube issues come up about two months ago around a new automatic firmware update feature that Particle released for the photon firmware. When a user first connects a photon to wifi, it checks in with the Particle server to see if there's a newer version of firmware than what it's currently running. If there is a newer version, it downloads the new firmware over wifi and installs it. When this process goes well, this takes about a minute. The problem is that, for a small percentage of cube users, the firmware download would stall forever. We're not exactly sure what causes this -- we've been able to replicate the bug with some photons in New York and Hong Kong, while other photons with identical firmware work perfectly. It could be a subtle difference in antennas, or perhaps the firmware update moves into the wrong location, or perhaps there is a slight difference in hardware or software in the photon's wifi module -- it doesn't make sense to have two identical pieces of hardware and software repeatable give different results.
We've also seen users get to a point where they can't update their photon through cubetube, either flaky wifi or a user program that is keeping the photon from connecting to the cloud. In both these cases, the most straightforward way to fix the problem is to re-load code onto the photon over a hardwired connection.
We found that we can work around the problem by updating the particle firmware over USB, and the photon will go back to working normally. For people comfortable working with the command line, particle provided a helpful one-line command to update the firmware through the particle command-line interface. We used this command when debugging the issue with users, but it's a pain for non-terminal users to install homebrew, then node, then particle-cli, then dfu-util, and then finally run the firmware update command.
So we wrote a tool that does all that automatically. When you click 'fix my cube', CubeDoctor downloads a copy of the latest firmware from our servers, along with a binary of the demo code compiled against the latest firmware. This lets us keep CubeDoctor updated to the most recent firmware without requiring everyone to download a new release of CubeDoctor. CubeDoctor is bundled with the programming utility dfu-util that handles communication between the computer and the photon's firmware, so nobody has to install additional software. The program first loads the latest version of the system firmware, and then loads on the demo firmware. The whole process takes about 45 seconds after you click the button.
We hope that this app will brighten your day and leave you with a smile on your face. If you have any feedback for us, please tell us in the comments.
The L3D team