Cube misbehaving? Fix it in a single click with Cube Doctor

532 views
Skip to first unread message

momo

unread,
Dec 17, 2015, 1:26:12 AM12/17/15
to cube...@googlegroups.com
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.
<3,
The L3D team


Luke Fisher

unread,
Dec 17, 2015, 5:05:10 AM12/17/15
to cubetalk
Good job with this, I haven't had any real problems yet but its good to know there is an unbricking tool out there, and its for windows!

Werner M.

unread,
Dec 17, 2015, 9:08:22 AM12/17/15
to cubetalk
Behold!

rcybe...@aol.com

unread,
Dec 20, 2015, 10:19:30 AM12/20/15
to cubetalk


On Thursday, 17 December 2015 14:08:22 UTC, Werner M. wrote:
Behold!


iam now having trouble even posting on the forum 

LilRedFlamingo

unread,
Dec 20, 2015, 12:01:16 PM12/20/15
to cubetalk
I can't get it to install. It tells me I'm missing a .dll file on my computer. I looked up something to install that and was told there was nothing that could open that file.
And I've gone thru everything multiple times and still can't get the cube to connect to wifi long enough to do anything. I was hoping this would have helped that, going thru the computer.

LilRedFlamingo

unread,
Dec 20, 2015, 12:25:24 PM12/20/15
to cubetalk
On Sunday, December 20, 2015 at 11:01:16 AM UTC-6, LilRedFlamingo wrote:
> I can't get it to install. It tells me I'm missing a .dll file on my computer. I looked up something to install that and was told there was nothing that could open that file.
> And I've gone thru everything multiple times and still can't get the cube to connect to wifi long enough to do anything. I was hoping this would have helped that, going thru the computer.
Running Windows 10, by the way.

rcybe...@aol.com

unread,
Dec 20, 2015, 1:53:47 PM12/20/15
to cubetalk
it looks like the cube doctor has now been removes as it wont let me down load

Werner M.

unread,
Dec 20, 2015, 1:59:31 PM12/20/15
to cubetalk
@rcybe: Just tested and te download is available. Please check if your browser isn't allowing pop ups or downloads.

@LilRedFlamingo: Please provide more details on your specific error. If possible, include a screenshot to help us pinpoint the issue.

Werner M.

unread,
Dec 20, 2015, 2:23:58 PM12/20/15
to cubetalk
Hi all Windows users,

The 2 required libraries (.dll) to run CubeDoctor are available for download here: https://drive.google.com/folderview?id=0Bz_pHL0Vq241OTBTRldIMm9NVmc&usp=sharing
Just download the .zip file and extract both .dll files to the same folder where the .exe is located and run the app.

@Alex: I think it's best to zip these along with the executable and replace the existing download target with the zipped one.


momo

unread,
Dec 20, 2015, 9:03:55 PM12/20/15
to cubetalk
Sorry about that, folks -- I updated the link in the original post.  The exe with the DLLs is up for download here.

--me

Werner M.

unread,
Dec 21, 2015, 10:00:02 AM12/21/15
to cubetalk
Hi,

If you're running Windows 8.1, and you get the following message: "This app can't run on your PC. To find a version for your PC, check with the software publisher":
The first thing we need to determine is if your downloaded files aren't corrupted (this could be caused by a download that was terminated before it had a chance to finish). So have a quick check in all of the 3 files you've unzipped to a local folder in your PC by following this simple procedure.
If you confirm that the EXE and/or any of the DLL files have a 0-byte length, then you will need to download them again because the files haven't been downloaded completely the first time.
This is also the case if you get an error when trying to open the ZIP file. If Windows can't open the ZIP file, it's likely corrupted as well.

jon

unread,
Dec 23, 2015, 4:45:27 AM12/23/15
to cubetalk
Hi,
I have downloaded cubedoctor, with all the relevant drivers, and it installed ok.
I pressed the 'fix my cube' button, but it doesnt get further than 'switching to DFU mode. Waiting'
The led on the photon board flashes red (5 long, 9 short, 5 long) then white briefly. At this point the computer makes the USB disconnected and reconnected noise, and the cycle repeats.
What do i need to do now to get the cube to 'unbrick'?  It got itself into this state just from loading a program from the gallery.
thanks
jon

Werner M.

unread,
Dec 23, 2015, 9:10:09 AM12/23/15
to cubetalk
Hi,

Please read through this description of the different "SOS error codes" and try to identify which one your photon is reporting. Then post it back here.
Also, let us know which one of the viz'es you think brought your photon to this state. So we can try and duplicate your error.

-Werner

jon

unread,
Dec 24, 2015, 8:35:27 AM12/24/15
to cubetalk
hi,
Thanks for that.

It is 5 flashes, which indicates 'usage error', but i couldnt see on their forum what would have caused that, or how to get it back from this.

help welcome!

thanks
jon

Werner M.

unread,
Dec 24, 2015, 9:22:01 AM12/24/15
to cubetalk
Ok, so first thing we need to do is get your photon into SAFE MODE (photon LED flashing purple).
Afterwards, go to cubetube gallery, select any viz that's good (filter by 'name', either alex or wmoecke - hint: clicking the author's name will do the trick for you -; pick any viz from the filter results) and try flashing that viz into your cube (while it's still in SAFE MODE).

Got that viz loaded and running? If yes, then your photon should be 'breathing cyan' by now.
No? Follow these steps:
  • Bring your photon back to SAFE MODE;
  • Plug it into your PCs USB port.
  • Run FixCube app and wait.
Still got problems? Post back a detailed description of the steps you performed with the results obtained for each step (if different than expected).

-Werner

Werner M.

unread,
Dec 24, 2015, 9:24:00 AM12/24/15
to cubetalk
BTW, when doing "pick any viz from the filter results" make sure it's not an "interactive" one - consider only those that have a "cube" logo (not the "computer" logo) in the viz "card".

-Werner

jon

unread,
Dec 24, 2015, 9:47:23 AM12/24/15
to cubetalk
thanks.
the safe mode did the trick. I've now regained control of my cube!
thanks for the help
jon

LilRedFlamingo

unread,
Dec 27, 2015, 1:39:16 AM12/27/15
to cubetalk
With updated .dll files I was able to install the CubeDoctor and run it.  The photon flashes white, green, then the cube freezes and the photon flashes yellow.  And that's all it does. I've waited for an hour. I've tried resetting it.  I tried again a few days later and waited longer. That's all it will do, freeze and flash yellow. Any ideas?  


On Thursday, December 17, 2015 at 12:26:12 AM UTC-6, momo wrote:

Werner M.

unread,
Dec 27, 2015, 3:11:25 PM12/27/15
to cubetalk
Did you try the 'safe mode' approach, as described to Jon?
Might just work for you as well. Otherwise, post back here.

LilRedFlamingo

unread,
Dec 28, 2015, 12:54:56 AM12/28/15
to cubetalk
I finally got it to safe mode and was able to get the original demo reloaded. Thanks!

On Thursday, December 17, 2015 at 12:26:12 AM UTC-6, momo wrote:

docino

unread,
Jan 4, 2016, 1:26:00 AM1/4/16
to cubetalk
My cube with Photon is steadily blinking blue.  Trying to connect with the Android app did not work.  I installed the CubeDoctor (Mac version) and received the following when Fix my Cube:


============================================

Install dfu-util

============================================

Installing dfu-util

Install dfu-util successed failed.{

    NSAppleScriptErrorAppName = CubeDoctor;

    NSAppleScriptErrorBriefMessage = "/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0";

    NSAppleScriptErrorMessage = "/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0";

    NSAppleScriptErrorNumber = 1;

    NSAppleScriptErrorRange = "NSRange: {0, 84}";

}


Am I missing something?



Werner M.

unread,
Jan 4, 2016, 2:00:33 PM1/4/16
to cubetalk
Prior to that, were you able to set up wifi credentials to your cube and get it to 'breathing cyan' state?

Werner M.

unread,
Jan 4, 2016, 2:47:54 PM1/4/16
to cubetalk
Hi flamingofuture,

My previous question was directed to docino, I assumed you solved your problem with the safe mode approach.
Please note I won't be able to answer questions posted to me directly; please use the forum address or avoid using "reply privately" option in the forums.

The new Spark Pixels app (v2.0) along with the new sketch (v2.0) in the gallery should now let you text messages directly from the app in your phone. Try that.

-Werner

2016-01-04 17:38 GMT-02:00 flamingofuture <flaming...@gmail.com>:
No. I got it to connect briefly and when it dropped the wifi signal again. 
I've had a terrible time getting a consistent wifi signal. I've started from scratch setting up the photon, reset it, etc.  I've had Spark Pixels find it, but then say it's off line. I've got it to breathe cyan and still say it's offline on Particle and Spark Pixels.  I finally got the Cubetube.org to find it if it's connected by usb to the laptop after running the Cube Doctor with the dll fix. And putting it in safe mode and downloading the original demo mode again.  
I'm hoping I can customize the wording again for a new party we're doing this weekend and download it with usb at least. 


Sent from my Sprint Samsung Galaxy S® 6.

--
You received this message because you are subscribed to a topic in the Google Groups "cubetalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cubetalk/BCVTLcxjqdM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cubetalk+u...@googlegroups.com.
To post to this group, send email to cube...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cubetalk/9bf9c7d0-f339-414a-82c0-766b2082bc43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

docino

unread,
Jan 5, 2016, 1:59:07 AM1/5/16
to cubetalk
No, not with this photon. With the Set/Reset buttons I can change its state. But only for an instant after which it blinks blue.

docino

unread,
Jan 5, 2016, 2:03:15 AM1/5/16
to cubetalk
No, not with this photon. Using Set/Reset buttons, I can change the state but only for a second. Promptly returns to blinking blue.

Werner M.

unread,
Jan 6, 2016, 9:45:47 AM1/6/16
to cubetalk
@docino, So you're saying you never set up the wifi credentials in this photon to begin with?
I'm posting below a few pointers that I've posted in here way back (when photons were much more difficult to deal with than they are today) - try following the guidelines below and if you get stuck at some point we need you to post details in here in order to be able to help you further:

If you never got your cube online in the first place, then you need to do that first. If with the particle app it was an epic fail (not surprisingly), then you may try to set up your photon via USB: http://docs.particle.io/core/connect/#connecting-your-device-connect-over-usb

Cube went dead; WiFi connection works (photon LED 'breathes cyan') - or, it used to, and now it's in a different state - then do this first:
1) Put the photon in "Safe Mode" - details here: http://docs.particle.io/photon/modes/

Is it "breathing-cyan" now? Great, then let's go ahead and re-flash the demo reel visualization code into it:
2) Open https://build.particle.io/ - that's the web editor. You will reflash your cube from there.
3) Make sure your device is already registered and named (or, "claimed"): Click on the "Devices" icon (looks like a crosshair) and it must be listed there. If you only see a yellow button ("Add new device"), - and assuming your cube is successfully connected (breathing cyan) - then you haven't claimed it yet (probably like me, you got frustrated at the particle app that did not go through the claiming process all the way, no matter how many times you attempted it) - but you can do that now by clicking that yellow button and entering the cube's hex id.
In order to get that hex ID, the only means I found is to download and install the standalone particle ide environment from the particle website (it looks the same as the web one, but it installs on your pc). Then, you should notice in the lower part of the ide window there's a status bar, where you'll see a round icon with "No device selected" text beside it; clicking in this text will popup an information bar on the top of the ide window, and your cube should appear there as "Unnamed", followed by a long string (that's the hex id, btw). You can copy that string (by eye only, there's not even a copy&paste for you in that ide) into the web ide and it will then ask you to name it.
4) Ok, so you got the cube listed in the Devices section. Create a new file in the web ide by following the instructions provided here: https://github.com/enjrolas/L3D-Software - go only as far as doing step 3 (adding the neopixel library) - you don't need to go further and add the colors.h and colors.cpp files to the sketch. Save your work up to this point.
5) The updated Demo code for the new photon processors is available here: http://pastebin.com/tp6dV711. Copy and paste it to your new sketch on the web ide, overwriting everything that was automatically added by the ide when you followed steps 1-2-3. Save. Click "Verify" and wait. Hopefully, it should say "Code verified! Great work". Excellent!
6) Now, make sure your cube is online (breathing cyan). Click the lightning button and wait a while. It should compile again (no errors, hopefully), and soon enough you should see the photon led flash purple (or "magenta" if you will). When it's done and back to breathing cyan, your visualizations should be running. Yay.

-Werner

Maurizio De Sanctis

unread,
Apr 2, 2016, 6:08:48 PM4/2/16
to cubetalk
MOMO SEI UN GRANDE
Avevo un grande problema...ripristinare il Cubo
E tu con questo programma hai risolto in 45 secondi le frustrazioni di giorni
GRAZIE!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Il giorno giovedì 17 dicembre 2015 07:26:12 UTC+1, momo ha scritto:
amanti attenzione di tutte le cose cubi:

Cubi sono una fonte di grande gioia e meraviglia, ma di tanto in tanto, possono anche essere una fonte di frustrazione. Nulla può rovinare un giorno come un cubo che non risponde bene non è più! Oggi, stiamo rilasciando un nuovo strumento chiamato CubeDoctor che può ottenere un cubo non risponde di nuovo alla condizione di fabbrica-fresco con un solo clic. Basta collegare il vostro cubo al computer via USB, avviare l'applicazione e fare clic sul pulsante!

È possibile scaricare CubeDoctor per  Mac e di Windows .  

Per i programmatori curiosi, il codice sorgente per entrambe le versioni è disponibile su GitHub .

Ma perché è stato il mio cubo avvitato in primo luogo? si può chiedere. E come CubeDoctor risolvere il problema?

Abbiamo visto un picco di questioni cubo venire circa due mesi fa attorno a una nuova funzione di aggiornamento automatico del firmware che particelle rilasciato per il firmware fotone. Quando un utente si connette prima un fotone al WiFi, controlla con il server di particelle per vedere se c'è una nuova versione di firmware di quello che è attualmente in esecuzione. Se vi è una nuova versione, scarica il nuovo firmware tramite WiFi e lo installa. Quando questo processo va bene, questo richiede circa un minuto. Il problema è che, per una piccola percentuale di utenti cubo, il download firmware stallerebbe sempre. Non siamo esattamente sicuri che cosa provoca questo - siamo stati in grado di replicare il bug con alcuni fotoni a New York e Hong Kong, mentre altri fotoni con il lavoro del firmware identica alla perfezione. Potrebbe essere una sottile differenza di antenne, o forse l'aggiornamento del firmware si sposta nella posizione sbagliata, o forse vi è una leggera differenza di hardware o software nel modulo WiFi del fotone - non ha senso avere due pezzi identici di hardware e software ripetibili danno risultati diversi.  

Abbiamo anche visto gli utenti arrivare a un punto in cui non possono aggiornare il proprio fotone attraverso cubetube, sia Wi-Fi traballante o un programma utente che sta mantenendo il fotone di connettersi al cloud. In entrambi i casi, il modo più semplice per risolvere il problema è quello di codice ricaricare sul fotone tramite una connessione cablata.

Abbiamo scoperto che siamo in grado di aggirare il problema aggiornando il firmware delle particelle tramite USB, e il fotone torneremo a lavorare normalmente. Per le persone che lavorano confortevoli con la linea di comando, particella ha fornito un comando utile una riga per aggiornare il firmware attraverso l'interfaccia della riga di comando di particelle. Abbiamo utilizzato questo comando quando il debug del problema con gli utenti, ma è un dolore per gli utenti non-terminali da installare homebrew, quindi il nodo, quindi particella-cli, quindi DFU-util, e poi finalmente corre il comando di aggiornamento del firmware.  

Così abbiamo scritto uno strumento che fa tutto questo automaticamente. Quando si fa clic su 'risolvere il mio cubo', CubeDoctor scarica una copia del firmware più recente dai nostri server, insieme a una binaria del codice demo compilato contro il firmware più recente. Questo ci permette di mantenere CubeDoctor aggiornato al firmware più recente senza richiedere a tutti di scaricare una nuova versione di CubeDoctor. CubeDoctor è fornito in bundle con l'utility di programmazione DFU-util che gestisce la comunicazione tra il computer e il firmware del fotone, in modo che nessuno deve installare software aggiuntivo. Il programma prima carica l'ultima versione del firmware del sistema, e quindi carica sul firmware demo. L'intero processo dura circa 45 secondi dopo aver fatto clic sul pulsante.

Ci auguriamo che questa applicazione sarà illuminare la vostra giornata e vi lasciamo con un sorriso sul tuo viso. Se avete tutte le risposte per noi, ci informi nei commenti.
<3
Il team L3D


Reply all
Reply to author
Forward
0 new messages