[SOLVED] Unknown issue with Photon EDIT: Photon cannot connect to cloud

Hi, I've recently purchased the photon. I have run into the problem of connecting the particle to the wifi. I used the ToolChain and successfully logged in. My device manager shows DFU mode when blinking yellow and Photon with Wifi while blinking blue as expected. However, I am having trouble with the cmd command particle serial wifi. I am getting an error message which looks like this:

C:\Users\Atique>particle serial wifi
Error loading command C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\commands\SerialCommand.js Error: Cannot find module 'C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-x64\serialport.node'
particle: Unknown command: "serial"

[EDIT 1]
I have tried the make clean all from the firmwares main path but I am getting the following

C:\Users\Atique\Desktop\New folder\firmware-develop\main>make clean all
fatal: Not a git repository (or any of the parent directories): .git
../build/arm-tlm.mk:6: C:/Users/Atique/Desktop: Permission denied
../build/arm-tlm.mk:6: folder/firmware-develop/build/top-level-module.mk: No such file or directory
../build/arm-tlm.mk:10: C:/Users/Atique/Desktop: Permission denied
../build/arm-tlm.mk:10: folder/firmware-develop/build/arm-tools.mk: No such file or directory
make: *** No rule to make target `folder/firmware-develop/build/arm-tools.mk'. Stop.

[EDIT 2]
The photon suddenly started blinking green. I don't know what to do anymore
Anyone know how to solve this issue?

Does particle setup work? How about the mobile app? How did you install the CLI? Have you got the latest version of the CLI? Was your device in listening mode while executing the serial wifi command?

@Moors7 Yes sir ! Particle setup on command lets me login and when I hold the setup button , the green flash becomes blue and cmd recognizes particle connected via usb. However device manager says this usb device is malfunctioning…

I am not sure whether I have downloaded latest version of CLI, but I’ve used the toolchain to install all those automatically

Have you downloaded and installed the serial drivers?
https://s3.amazonaws.com/spark-website/Particle.zip

What does npm -v and node -v report?
And what version does particle report?

Try to avoid paths containing blanks (like in New folder)

Sorry for late reply sir,
Yes i have downloaded the serial drivers before but device manager doesn't recognize the usb when it shows green blinks

However if I hold the setup button, the flash becomes blue slower flash

and this is what is shown

My npm -v and node -v reports this

C:\Users\Atique>npm -v
2.11.3

C:\Users\Atique>node -v
v0.12.7

@ScruffR

@atiquechowdhury, the time to install the serial driver is when you have the Photon in listening mode (slow blue flash). Putting the Photon in DFU mode is when you install the Zadig driver.

Also, I found that Particle CLI installation was weird with node 0.12.x. It had issues installing the nodejs serial drivers. When I installed Nodejs 4.2.4, CLI installed without issues. I had to first purge my older CLI installation, remove nodejs and then install Nodejs 4.2.4 and then the latest CLI.

1 Like

This is what I get when I try to install serial drivers while it is on listening mode (slow blue flash)
So do you suggest I reinstall CLI by reinstalling Nodejs?
@peekay123

When installing serial drivers, you should not let Windows search for the drivers, but direct Windows to the directory where you have downloaded and unzipped the Particle drivers to.

This is independent of the Node/CLI reinstall. You should do that as well

@atiquechowdhury, when you install the driver, you are manually selecting the driver from the particle drivers found in Particle.zip (referred to by @ScruffR)?

If this is giving you problems, make sure you are using a USB 2.0 port and not a 3.0 port.

Yes I was directing Windows to the Particle drivers folder and that message on the image above popped up, however, @peekay123 just mentioned below your comment that USB 3.0 might give you problems, time to switch to usb 2.0. I will get back to you gentlemen in 2 minutes

@atiquechowdhury, you also need to MANUALLY select the photon driver, not just point to the folder. Windows is really stupid that way.

You might want to follow this for serial drivers:

Just make sure you use the updated files where necessary.

Looks like usb 2.0 recognized the device, what shall I do now? Is it better to install the node to older version* as aforementioned and then DFU Zadig?
@peekay123 @Moors7 @ScruffR

Node and zadig are independent as well.

You’ll need both tho’

I have installed driver in blue blink mode (listening) and Zadig in DFU mode. I have also installed the older Node.js What is the next step to getting this bird online gentlemen?

@peekay123 @Moors7 @ScruffR

What do you mean with older Node.js? :confused:

4.2.4 is more recent than what you stated before 0.12.7

My apologies, I meant 4.2.4. Thought 0.12.7 is the new version 5 which was installed before. However my motherboard recognizes the device properly. Now that everything is restored, should I check whether particle serial wifi works? Or should I run this command instead

npm install -g particle-cli

Nope, 0.12.7 is 0.12.7 and 5.x.x is newer than 4.2.4, but 4.2.4 is a long term release while 5.x.x is not.
Sure you can use 5.x.x too.

But if you had installed 5.x.x and got 0.12.7 reported by node -v your path is still directing Windows to the ooooooold version that is still somewhere on your machine.

1 Like

Windows is rather finicky, and due to all the different setups, it’s pretty much impossible to tell whether or not a specific combination of software is going to work. That said, I’ve been able to get it working with 0.12.x, 4.x, as well as 5.x

I suggest you read the (various) tutorials that are available here. The tool chain has always worked for me, but I did have the drivers installed properly.

Much like @ScruffR said, choose one version of node.js, and stick to it. Definitely don’t install them side by side, or things get messy, unless you know what you’re doing…

So, pick a version, make sure it’s the only one on your machine, and try the Particle command again.

So this is what I got from Particle Serial Wifi command

C:\Users\Atique>particle serial wifi
Error loading command C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\commands\SerialCommand.js Error: Cannot find module 'C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v46-win32-x64\serialport.node'
particle: Unknown command: "serial"

C:\Users\Atique>npm install -g particle-cli
-
> serialport@2.0.6 install C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v46-win32-x64\serialport.node" is installed via remote
C:\Users\Atique\AppData\Roaming\npm\particle -> C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.9.3 C:\Users\Atique\AppData\Roaming\npm\node_modules\particle-cli
β”œβ”€β”€ cli-spinner@0.2.2
β”œβ”€β”€ xtend@4.0.1
β”œβ”€β”€ 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, ansi-styles@2.1.0, escape-string-regexp@1.0.4, has-ansi@2.0.0, strip-ansi@3.0.0)
β”œβ”€β”€ cli-table@0.3.1 (colors@1.0.3)
β”œβ”€β”€ node-wifiscanner2@1.1.1 (os-locale@1.4.0)
β”œβ”€β”€ when@3.7.7
β”œβ”€β”€ glob@4.5.3 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@2.0.10)
β”œβ”€β”€ inquirer@0.11.3 (strip-ansi@3.0.0, ansi-regex@2.0.0, ansi-escapes@1.1.1, figures@1.4.0, cli-width@1.1.0, rx-lite@3.1.2, through@2.3.8, run-async@0.1.0, readline2@1.0.1, string-width@1.0.1, cli-cursor@1.0.2)
β”œβ”€β”€ binary-version-reader@0.3.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
β”œβ”€β”€ latest-version@2.0.0 (package-json@2.3.0)
β”œβ”€β”€ hogan.js@2.0.0
β”œβ”€β”€ request@2.67.0 (aws-sign2@0.6.0, forever-agent@0.6.1, tunnel-agent@0.4.2, caseless@0.11.0, is-typedarray@1.0.0, oauth-sign@0.8.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.1, qs@5.2.0, node-uuid@1.4.7, combined-stream@1.0.5, mime-types@2.1.9, form-data@1.0.0-rc3, bl@1.0.1, hawk@3.1.2, http-signature@1.1.0, har-validator@2.0.6)
β”œβ”€β”€ moment@2.11.1
β”œβ”€β”€ 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, async@0.9.0, sf@0.1.7, nan@2.0.9, optimist@0.6.1, debug@2.2.0)

C:\Users\Atique>particle serial wifi
? Should I scan for nearby Wi-Fi networks? (Y/n) Y
? Should I scan for nearby Wi-Fi networks? Yes

! serial: Unable to scan for Wi-Fi networks. Do you have permission to do that on this system?