Particle and dfu install issues

Hi,
particle-cli install seems that finally went through with no errors (I was getting stuck due to nodes4).

I try now to run particle command on cmd line and particle is not recognized. This should be easy… like path setting, but not sure what to use.

I am trying to setup DFU-util…

Thx

How did you install particle-CLI?

npm install -g particle-cli

I ran this again and now get errors…
I installed win64openssl… did this mess it up?

This is the most complicated and troublesome install ever… :S

I was counting on an easy setup and planned to have code done by now… and still fighting with this thing…

Try this: http://community.particle.io/t/tutorial-particle-cli-on-windows-07-jun-2015

that is the tutorial I am following.
I have 64bit system, so I guess openssl 32 bit won't work, based on comment about use all 32 or 64, right? So I think either tutorial should have 64bit install instructions also... or clearly we should sue 32 ::smile:

Here my install results
C:\Users\testUser>npm install -g particle-cli
\

serialport@1.7.4 install C:\Users\testUser\AppData\Roaming\npm\node_module
s\particle-cli\node_modules\serialport
node-pre-gyp install --fallback-to-build

C:\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\node_modules
\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" cl
ean ) else (node clean )

C:\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\node_modules
\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" co
nfigure --fallback-to-build --module=C:\Users\testUser\AppData\Roaming\npm\n
ode_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release
\node-v14-win32-x64\serialport.node --module_name=serialport --module_path=C:\Us
ers\testUser\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seri
alport\build\serialport\v1.7.4\Release\node-v14-win32-x64 ) else (node configu
re --fallback-to-build --module=C:\Users\testUser\AppData\Roaming\npm\node_m
odules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release\node
-v14-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\n
uno.lambuca\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialpor
t\build\serialport\v1.7.4\Release\node-v14-win32-x64 )

C:\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\node_modules
\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" bu
ild --fallback-to-build --module=C:\Users\testUser\AppData\Roaming\npm\node_
modules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release\nod
e-v14-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users
testUser\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialpo
rt\build\serialport\v1.7.4\Release\node-v14-win32-x64 ) else (node build --fal
lback-to-build --module=C:\Users\testUser\AppData\Roaming\npm\node_modules\p
article-cli\node_modules\serialport\build\serialport\v1.7.4\Release\node-v14-win
32-x64\serialport.node --module_name=serialport --module_path=C:\Users\nuno.lamb
uca\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build
serialport\v1.7.4\Release\node-v14-win32-x64 )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
serialport.cpp
serialport_win.cpp
enumser.cpp
..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared depre
cated [C:\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\node
modules\serialport\build\serialport.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433)
: see declaration of 'GetVersionExA'
disphelper.c
..\src\win\disphelper.c(1164): warning C4267: '=' : conversion from 'size_t' to
'UINT', possible loss of data [C:\Users\testUser\AppData\Roaming\npm\node

modules\particle-cli\node_modules\serialport\build\serialport.vcxproj]
Creating library C:\Users\testUser\AppData\Roaming\npm\node_modules\pa
rticle-cli\node_modules\serialport\build\Release\serialport.lib and object C:
\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\node_module
s\serialport\build\Release\serialport.exp
Generating code
Finished generating code
serialport.vcxproj -> C:\Users\testUser\AppData\Roaming\npm\node_modules
particle-cli\node_modules\serialport\build\Release\serialport.node
Copying C:\Users\testUser\AppData\Roaming\npm\node_modules\particle-cli\n
ode_modules\serialport\build\Release/serialport.node to C:/Users/nuno.lambuc
a/AppData/Roaming/npm/node_modules/particle-cli/node_modules/serialport/build
/serialport/v1.7.4/Release/node-v14-win32-x64\serialport.node
1 file(s) copied.
C:\Users\testUser\AppData\Roaming\npm\particle -> C:\Users\testUser\AppD
ata\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.8.3 C:\Users\testUser\AppData\Roaming\npm\node_modules\partic
le-cli
├── fast-luhn@1.0.2
├── cli-spinner@0.2.1
├── xtend@4.0.0
├── when@3.7.3
├── chalk@1.1.1 (supports-color@2.0.0, ansi-styles@2.1.0, escape-string-regexp@1
.0.3, strip-ansi@3.0.0, has-ansi@2.0.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── glob@4.5.3 (inherits@2.0.1, inflight@1.0.4, once@1.3.2, minimatch@2.0.10)
├── node-wifiscanner2@1.1.0 (os-locale@1.4.0)
├── hogan.js@2.0.0
├── request@2.64.0 (aws-sign2@0.5.0, forever-agent@0.6.1, caseless@0.11.0, strin
gstream@0.0.4, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, json-string
ify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, qs@5.1.0, combined-stream@1.0.5,
mime-types@2.1.7, http-signature@0.11.0, form-data@1.0.0-rc3, bl@1.0.0, tough-co
okie@2.0.0, hawk@3.1.0, har-validator@1.8.0)
├── lodash@3.10.1
├── moment@2.10.6
├── inquirer@0.8.5 (ansi-regex@1.1.1, figures@1.4.0, cli-width@1.0.1, through@2.
3.8, readline2@0.1.1, rx@2.5.3)
├── softap-setup@1.1.4 (node-rsa@0.2.25, nconf@0.7.2)
└── serialport@1.7.4 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.8.4, debug@2.
2.0, optimist@0.6.1)

C:\Users\testUser>

C:\Users\testUser>particle login
’particle’ is not recognized as an internal or external command,
operable program or batch file.

C:\Users\testUser>

If you want to, give this a try, it should have all the software you need:

Thx
Isn’t this the tools/compiler for the core itself?

It looks like the serialport package is not working for you. I guess you installed all the dependencies already to run it like Python and Visual Studio?

Also, what is it that you are trying to resolve using DFU-util? We can make that work easily and take off from there as well.

I am not able to load code using the cloud…
The simple led toogle code you guys have on the web ide.
I get message that flash ok and nothing happens. Actually, it resets (if I have it pulgged in on my laptop I see device restart also), and after…nothing. will connect to cloud I think and nothing happens…

You can install DFU-util using this guide: Tutorial: Installing DFU-Driver on Windows [24 Feb 2015]

:smiley:
Thank you for pointing me to tutorials… I did read them before posting…
It seems I need DFU… which I cannot have working as subject of message states…

Did you add it to PATH then?

To use DFU-util:

  • open a command prompt
  • place the Photon in DFU mode
  • type dfu-util -l
  • You should see 2 items listed
  • to load a new firmware, download from the Web IDE and run dfu-util -d 2b04:d006 -a 0 -s 0x80A0000 -D firmware.bin

Maybe it would be more appropriate for you to tell us what’s wrong with flashing user firmware via the Web IDE so that we can help you resolve it.

CORE does not even get listed as CORE DFU… And I used that util, but my device lists as unknown. I force driver and get error also

Good to know, so I'll just ask these questions since this sounds puzzling

Have you tried different USB cables, that do definetly work?
Does your Core blink yellow and does Windows play the "USB connected" sound when you enter DFU Mode?
Have you found the Core in zadig and installed the "libusbK" driver for it?
Does your Core get listed in DevMgr under "Ports COM/LPT" when put into Listening Mode (blinking blue)?


I'm also a bit confused about the mixture of the terms "dfu-util" and "Particle CLI"
If you want DFU only, you don't need to install it, you only unpack the tar file linked in the tutorial, copy the contents of the subfolder win32-mingw32 somewhere where it will be accessible via %PATH% or add it to your %PATH% and then try running dfu-util -l again.

:smile:
OK answering in order.
I tried 2 different cables, and one is actually the one I use on my phone...
Core blinks yellow, correct. It sounds also on windows new usb device.
Core does not show on zadig. I know it is there because I see it pop up. Tried forcing to use that driver and get an error. [update as tried once more before posting] this time it listed as DFU and I was able to install the driver. Will now follow tutorial to see what is next obstacle. This is weird... yo uleve it resting for a while and all the sudden it works...

It does list as comport, Photon xx

It was supposed to be working and I load from web build. Said Ok but nothing happened.

I tried to follow also the factory reset.. but guess what... blinks cian, yellow, green, white, off and back to cian. according to this page it should turn solid white... but only after I remove mode button on white flash or off state. Then it gets white. After goes to listening : blue blink.

After, using Android I set it up... all good, it restarts, blinks green (registering) and starts blinking cian immediatly... FOR HOURSSSS :frowning: If I hit reset would do the same.

[update] following tutorial for next step

Also, I just started with particle-cli at first.... I want one version to work with it. It seems DFU is better for my application anyway.

Thanks for the help

OK. Down to the last item on tutorial… and seems like it works. Thank you all…

Now need to check if I am able to load finally an led blink… ( I had less trouble with raspberry pi some years ago :slight_smile: )

2 Likes

I thought you've got a Core? My Core lists as "Spark Core" and my Photon as "Photon".
Depending on the actual device the factory reset will do different things.

So what is your current status after this? I couldn't quite figure if your [update] indicated any change to the blinking cyan or not.
Rapid (5-10Hz) blinking (not 0.5Hz breathing!) cyan indicates ongoing cloud handshake, if it doesn't succeede your Core might not be claimed properly or if you have the occasional red flash in between the keys might have been damaged.


Edit: Just seen you have posted a new status while I was typing the above
:+1: glad to hear you got it working