[Particle Official] Windows 10 Full CLI and DFU Setup

Thanks for this guide! But I had trouble getting it to work and figured out why:

Two typos in Step 3: you have min32-mingw32 twice instead of “win32-mingw32” (including in the text intended for copy and pasting).

Took me a while to figure out what was wrong with my setup and why DFU wasn’t accessible (since it technically wasn’t in the PATH).

1 Like

thanks! Just updated it now! Great eye :eyes:

My CLI install dies here:
npm ERR! serialport@2.0.5 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.5 install script ‘node-pre-gyp install --fallback-to-build’.

This is a clean install of Win10. Not much else happening on the machine just yet.


Could you try npm install -g serialport?

Just tried that and got basically the same result.

So it looks like it’s trying to build something related to the serial port stuff. The install didn’t work, and it failed with a “python not found” error. I installed Python, and made it to a VC++ compiler problem/missing .NET framework (v2 of all things).

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew
ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\Mheere\AppData\Roaming\npm\node_modules\serialport\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2

If you’re on Windows, would you be interested in trying this installer? It has worked beautifully for me in the past. Makes the installation painless. It allows you to choose what you want to install from a drop-down. If you select the CLI, you should be good to go.

Alternatively, there’s this more elaborate tutorial on how to install the CLI and its requirements:

Thanks for the info! I will try the installer package, but I’m going to have to build a virtual machine for particle development 1st. There’s just too many out of date moving parts in this setup. No way I’m exposing my day to day machine to all these known bugs and security issues. Guess I’m stuck with the WebIDE and no serial support in the mean time.

Thanks again!

A VM is never bad, although I haven’t had any issues with my setup yet. If you install it manually, you should be able to install newer versions of software.
Depending on what you want to use serial for, you could use another serial terminal. Putty works well on windows.

Yeah, the serial issue is a separate problem. I can’t for the life of me get the photon to show up in device manager. I would probably use the Arduino IDE serial monitor if I could get the Photon to connect. I’m actually getting suspicions of the Photon itself because I have had no success in this department on either the new Windows machine or my Macbook.

Well still no joy. I decided to go ahead and try the installer package on the host machine because I didn’t want to add a VM into the serial port issues.

Anyway, I installed everything in the toolchain package. Ran the firmware make. Rebooted. Tried to manually install the particle-cli (I noticed it failed in the toolchain with the same serial error).

No luck with any of it. I’m blowing this mess away and putting the Photon on the shelf. I’ll get back to it when the toolset comes even remotely close to the Arduino IDE…

@TheMadTexan, I get a similar problem on Win10 which I recently upgraded to. @kennethlimcp, @Moors7, I get this when installing the latest CLI:

C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport>node "C:\Program Files\nodejs\n
ode_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fa
llback-to-build --module=C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport\build\
Release\node-v14-win32-x64\serialport.node --module_name=serialport --module_path=C:\User
child_process: customFds option is deprecated, use stdio instead.
Building the projects in this solution one at a time. To enable parallel build, please ad
d the "/m" switch.
..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared deprecated [C:
          C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433) : see dec
  laration of 'GetVersionExA'
..\src\win\disphelper.c(1164): warning C4267: '=' : conversion from 'size_t' to 'UINT',
possible loss of data [C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport\build\s
     Creating library C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport\build\Re
  lease\serialport.lib and object C:\Users\Paul\AppData\Roaming\npm\node_modules\serialp
  Generating code
  Finished generating code
  serialport.vcxproj -> C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport\build\
  Copying C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport\build\Release\/seria
  lport.node to C:/Users/Paul/AppData/Roaming/npm/node_modules/serialport/build/Release/
          1 file(s) copied.
serialport@2.0.5 C:\Users\Paul\AppData\Roaming\npm\node_modules\serialport
├── bindings@1.2.1
├── sf@0.1.7
├── async@0.9.0
├── nan@2.0.9
├── debug@2.2.0 (ms@0.7.1)
└── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)

I also noticed that the device driver for the Electron will not load in Win10.

got me going on both win 8 and win 10

Microsoft Windows [Version 10.0.10586]
© 2015 Microsoft Corporation. All rights reserved.

C:\Users\Brian>node -v

C:\Users\Brian>npm -v

C:\Users\Brian>particle --version

C:\Users\Brian>npm list serialport -g --depth=0
└── serialport@2.0.2

I really appreciate all the suggestions folks. Great group you have here!

I still have to wonder why in the world this toolset has to be so damned complicated. It’s a command line for heaven’s sake. GCC, Python, Node.JS, Visual Studio, Java + Netbeans, and who knows what else thrown in for good measure? That’s just nuts.

I work for a software company and I can tell you from 1st hand experience that Particle isn’t doing themselves any favors leveraging so many parts. It may help to get some functionality out the door quickly in the short term, but it’s completely unsupportable and it’s a lousy experience for most users.

Anyway I’m sticking with my decision to shelve the Photon. It’s not that complicated to get WiFi working on a stock Arduino and make a few RESTful calls. At this point, the lousy dev environment is more than offsetting any advantage that the hardware has. That’s a shame too because the hardware, and the concept behind it, are beautiful!

1 Like

Any specific errors you’re seeing when doing any of the above? I’m sure we can help you out if you can give us some more details.

For what it’s worth, I had to try 3 different USB cables before I found one which worked reliably with the Photon. I think that’s more an indication of the state of USB cables than the Photon though.

I tried this setup again this week. Looks like the serial library has been updated and it now installs without fuss using Node.js 4.2.6 I’d like to upgrade to Node 5.5 since it has a lot of security related fixes in it, but I really, really don’t want to break the CLI.

I can’t make guarantees, but the CLI seems to work on 5.5 for me :slight_smile:

Thanks for you response.

After basically cleaning up my machine, removing drivers, etc, I finally got it to work.

I also deleted my post because, well, it wasn’t helping anything.

I don’t have much to add on the process except to say that I think the documentation needs improvement.

Other than that, it is a really cool product. Just wish I didn’t burn a day getting it to work.


I followed instructions from start to finish no problems well one right at the end with the dfu _driver. I agree its a bit of a process but just about anything I do with these is. its always just a matter of setting up your machine like the developers who made the product and thats always a product of the chipsets and devices you use. As you build up a product you end up installing the peices as you go, by the end of it youve got half a dozen things installed and working together. If people just followed the steps and didnt advance until each one was working properly they would get through it I worked in this stuff back in the day (2000) and belive me it was a lot harder and you had to write your own drivers half the time because most of the stuff was only part of a solution

1 Like

thanks @m0j0r1s1ng !! We’re still working on making this whole “setup” process much easier for all operating systems.
Yes, this is working and it is long, but I truly believe that it can be easier–and soon enough it will be :smile:

Thanks for Building with us!

  • Corey @ Particle

Hi, I can’t install particle.
I have installed node and npm
I have downloaded particle from https://github.com/spark/particle-cli (particle-cli-master.zip)
I have executed npm install -g particle-cli-master
And this is the result:

C:\Program Files\nodejs>npm install -g particle-cli-master
> serialport@2.0.6 install C:\Users\Carlos\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\Carlos\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-x64\serialport.node" is installed via remote
C:\Users\Carlos\AppData\Roaming\npm\particle -> C:\Users\Carlos\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.11.0 C:\Users\Carlos\AppData\Roaming\npm\node_modules\particle-cli
├── xtend@4.0.1
├── cli-spinner@0.2.4
├── semver@5.1.0
├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
├── chalk@1.1.1 (supports-color@2.0.0, escape-string-regexp@1.0.5, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── node-wifiscanner2@1.2.0 (os-locale@1.4.0)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@2.0.10)
├── inquirer@0.11.4 (strip-ansi@3.0.1, ansi-regex@2.0.0, figures@1.4.0, ansi-escapes@1.2.0, through@2.3.8, cli-width@1.1.1, run-async@0.1.0, readline2@1.0.1, string-width@1.0.1, cli-cursor@1.0.2, rx-lite@3.1.2)
├── latest-version@2.0.0 (package-json@2.3.1)
├── when@3.7.7
├── hogan.js@2.0.0
├── request@2.69.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.5, tunnel-agent@0.4.2, oauth-sign@0.8.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.7, combined-stream@1.0.5, qs@6.0.2, tough-cookie@2.2.1, mime-types@2.1.10, form-data@1.0.0-rc3, aws4@1.3.2, bl@1.0.3, hawk@3.1.3, har-validator@2.0.6, http-signature@1.1.1)
├── binary-version-reader@0.3.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
├── moment@2.11.2
├── lodash@3.10.1
├── softap-setup@1.1.4 (nconf@0.7.2, node-rsa@0.2.30)
└── serialport@2.0.6 (bindings@1.2.1, sf@0.1.7, async@0.9.0, debug@2.2.0, nan@2.0.9, optimist@0.6.1)

But when I write

particle login

the result is that particle isn’t a correct command.

What is the problem?