Particle CLI not working for duo?

I have been using the CLI for months now to make libraries and programs for the Redbear Duo with no issues.

A couple of days ago it stopped working. At first I thought it may have something to do with an OS X update, but I tried it on Linux and no joy there either.

My test was as simple as I could make it; just did a particle project create to make an empty project and then first compiled for photon, which worked, then for duo, which did not.

What’s going on?

[edit] forgot to say that compiling for duo via the desktop Particle IDE does work…

How did it 'not work'? Were there errors? Did it compile but wouldn't run? What version of firmware are you targeting? The more info, the better...

Example code:

knud 17:21:05 $pwd
/Volumes/Michael/Development/Duo/DuoTest2
knud 17:21:10 $cat src/DuoTest2.ino 
/*
 * Project DuoTest2
 * Description:
 * Author:
 * Date:
 */

// setup() runs once, when the device is first turned on.
void setup() {
  // Put initialization like pinMode and begin functions here.

}

// loop() runs over and over again, as quickly as it can execute.
void loop() {
  // The core of your code will likely live here.

}knud 17:21:15 $

Photon works;

knud 17:21:15 particle compile photon

Compiling code for photon

Including:
    src/DuoTest2.ino
    project.properties
attempting to compile firmware 
downloading binary from: /v1/binaries/5ac55e42ea9dcc4b17bd35aa
saving to: photon_firmware_1522884156023.bin
Memory use: 
   text	   data	    bss	    dec	    hex	filename
   3308	      8	   1376	   4692	   1254	/workspace/target/workspace.elf

Compile succeeded.
Saved firmware to: /Volumes/Michael/Development/Duo/DuoTest2/photon_firmware_1522884156023.bin
knud 17:22:42 $

Duo does not;

knud 17:23:39 $particle compile duo

Compiling code for duo

Including:
    src/DuoTest2.ino
    project.properties
attempting to compile firmware 
Compile failed. Exiting.

Compile a source file, or directory using the cloud compiler
Usage: particle compile [options] <deviceType> [files...]

Global Options:
  -v, --verbose  Increases how much logging to display                                     [count]
  -q, --quiet    Decreases how much logging to display                                     [count]

Options:
  --target  The firmware version to compile against. Defaults to latest version, or version on
            device for cellular.
  --saveTo  Filename for the compiled binary

Examples:
  particle compile photon                            Compile the source code in the current
                                                     directory in the cloud for a Photon
  particle compile electron project --saveTo         Compile the source code in the project
  electron.bin                                       directory in the cloud for a Electron and
                                                     save it to electron.bin

Param deviceType can be: core, photon, p1, electron, etc

knud 17:24:02 $

Output;

knud 17:24:02 $ls
README.md                          project.properties
photon_firmware_1522881947317.bin  src/
photon_firmware_1522884156023.bin
knud 17:24:35 $

… and, yes, I reinstalled particle-cli

knud 17:26:16 $particle version
1.29.0
knud 17:26:28 $
1 Like

Have you tried using po? It is able to compile firmware for all Particle devices locally.

You can install it using:

$ bash <(curl -sL get.po-util.com)

Update:
I’m getting the same error as you, and I’m on 1.29.0. It seems like the command is timing out so it just shows the error message.

Hey, thanks for the pointer to po. Probably something I want regardless.

Interesting you get the same problem. I am kind of leaning to hack the CLI to add some debugging so that I can see what is really going on. Timing out is a possibility, which, because it still works for photon, means that maybe there’s a broken link to something Duo-specific. But that’s speculation…

1 Like

That’s probably the case, and one of my primary reasons for creating po. I like to know what is going on.

Hi Steven! Could you try again now? I think this might’ve been caused by our unreleased firmware being picked up as a default for Duo by mistake. We removed it yesterday 1AM PDT.

1 Like

I did try again later yesterday afternoon and that fixed it.

So, this was a problem missed by release testing?

Yes, I believe so. I’m sorry for the inconvenience it caused!

Thanks. Not like I’ve never made a mistake… :-/

Glad to be back working.

1 Like