[Particle Official] Windows 10 Full CLI and DFU Setup


#27

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


#28

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

#29

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?

Thanks!


#30

Should be npm install -g particle-cli (without “master”)


#31

Thanks,

But, if I write

npm install -g particle-cli

the result is:

Could not install C:\Program Files\nodejs\particle-clic

Because the file that I downloaded is particle-cli-master.zip and it is decompressed in particle-cli-master folder.


#32

You don’t need to download the repo in order to install CLI.

npm will do that for you, and are you sure you didn’t type npm install -g particle-clic since this would explain the response you got :wink:


Sorry @kennethlimcp, that typo you corrected for me was actually meant to be there as it should reflect the suspected typo that would be explaining the error message - so I corrected it back to the wrong command :wink:


#34

Good!

Really isn’t necessary to download the repo.

npm install -g particle-cli

And everything works correctly

Thanks!


#35

I’m adding this here in case I forget how I fixed it and hopefully for others in the future:

The guide above talks about using Zadgig for the DFU mode, but it’s easy to mess up and set the driver for your standard Electron, which will break the particle serial identify command.

TO FIX IT:
Your electron setup from Zadig should look like this:

Your DFU setup should be as the guide describes.


[Solved] Particle Dev CLI Serial Confusion - Uncaught Error: Invalid port specified: undefined
[Solved] Proper way to update Particle Dev? (Windows)
#36

Huh?

For DFU Mode you don’t want USB Serial (CDC) or usbser as driver.
Best consistent results we get with libusbK

And for USB Serial you don’t need Zadig to install the drivers - DevMgr will do just fine.

Unless things changed considerably recently :blush:


#37

OMG! This totally fixed my ! serial: No devices available via serial issue!

Thank you so much!!!


#38

@corey At the end of step 3, you say this:

I don’t think this does anything.

This script appears to be a build script to run in Linux. The binaries included in dfu-util-0.8-binaries\win32-mingw32\ are already built for windows, so this script is just there to show how they were built.


#39

Also, was I supposed to be in DFU Mode this whole time? Should I just turn it on to DFU mode before step 4?


#40

Nope, not before Step 4, but the first few lines under Step 4 read

Maybe the term while … still should rather be once, since you can just enter DFU Mode there and then before you list all devices.


#41

I have got to this section of the tutorial:

<Now, go to the folder in the C:\ and into the folder where win32-mingw32 is located and then right click the file build-mingw32-libusb and click OPEN>

I am on Windows 10 and it doesn’t know which program to open this with. Is there something I should have installed?


#42

What extension has that file? (You might have to deactivate the dredded checkbox which hides the known file extensions by default)

And then you could do what’s stated directly at the top of Step 3:


#43

In the folder the file has a .sh ending, which after I did some Google research found out it is a Linux executable file. I am a complete beginner to everything in this tutorial (including the spark core) so I will be asking some very basic (dumb) questions so feel free to correct me wherever I am wrong. In order to get build-mingw32-libusb.sh to do anything when I click on it I downloaded Cygwin to my Windows 10 machine and managed to get a prompt window to open briefly and close. I had to leave for work this morning shortly after getting that far so I will report back if I am still lost.


#44

Actually you won’t need that file.
There should be a folder with already prebuilt Windows executables called win32-mingw32
Just copy all the files in this folder to your desired location (the one you added to your PATH).


#45

Was able to perform a deep update on the core and was successful in claiming the device through the CLI. Thanks for this guide and input from everyone else, I appreciate all of the help.


#46

I have just gone through loading node.js, npm, particle cli, zadig on a new Windows 10 Home laptop. All seemed to go well and I loaded node and npm and particle cli and logged in. Then I setup the usb-serial and dfu-util. Then I came out of the shell/command prompt and left the PC. When I came back it does not recognise the Particle command and if I try to re-install I now get a warning

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegEx DoS issue

It appears to carry on through the install OK but the particle name is still not recognised as a command. What is happening?


#47

Have you restarted your PC to ensure the PATH extension got in effect properly?