It was working perfectly. Now can't connect to cloud

With your help in “Getting Started” and “Cloud Software”, I got my app working with 2 photons and Blynk. I had it running for days and everything was great.

THE problem - I disconnected the battery on one of my Photons for a couple days to weatherproof the connection to my sensor. When I reconnected it, I got rapid blink cyan. I tried re-setting it up on wifi using the phone app several times. In some cases, I got an error message during the set up, but repeatedly get all the way through to “Set up completed successfully” but the Photon shows Offline and I’m getting the rapid cyan flash meaning not connected to cloud - right?

Edit 5/20 1:45 MDT - I figured this out but haven’t yet got the the Photon to connect.
Another problem - I have spent several hours reading about my first problem and came to the conclusion the Command Line Interface would be helpful maybe to use DFU. This is deja vu from several months ago when I never did figure out how to use the CLI. I have gone through the instructions to install CLI in Windows 7 and repeated the installation process several times. I have gotten PuTTY working on a COM port, can get responses to the “i” and the “m” commands and used it to monitor serial output from my Photon. I have node.js installed and can bring it up, but is seems to do nothing. How do you start and use CLI? I have a program loaded called “particle.exe”, but when I start it it just flashes on the screen and closes. Is CLI a program that you actually start or is it a set of commands that run from a terminal (PuTTY)? If the latter, is there a command reference somewhere? BTW, when I use PuTTY, I never see what I type, but do see the responses from the Photon.

I would really appreciate any help getting my Photon working and, if that involves CLI, I would REALLY appreciate a pointer to how to start and use it.

Thank you for your help

CLI stands for command line interface so you need to run cmd or powershell and then type particle in this Windows command console.

That is the default behaviour, but PuTTY also has a setting for local echo to show what you type.

Thank you ScruffR. I appreciate your patience.

I finally have CLI working (sort of) and can get appropriate responses when I preface commands with “particle”.

However, when I use "particle keys doctor " and get “Unable to detect any devices in DFU mode” . My Photon is flashing yellow, but when I change from Listening Mode to DFU Mode the COM9 serial connection disappears. Reading various places indicates the “dfu-utils” driver should create a new “device”, but that doesn’t seem to happen. I tried using Zadig, but don’t see any appropriate options there.

Typing the command “dfu-util -l” comes back with “dfu-util 0.8” and a couple lines of copyright info so something is there - maybe not the right thing?

I’d appreciate your ideas.

Thank you very much for taking the time to respond.

ARRRGGGGH.

I have spent the past two hours trying to figure out why I can’t see the Photon in DFU mode. I read that USB3 may cause issues so I switched to a USB2 port on my computer. Now when I switch back to Listening Mode, it doesn’t even show on a COM port.

I went back and tried again to set it up from scratch using the App. It went all the way through to the “you were successful” message, but then it showed OffLine.

I haven’t (intentionally) changed the firmware from when it was working perfectly. All I have tried to do since 0900 this morning is get it to connect to the cloud. I would truly appreciate any pointers.

Thank you,

OK. 3 more hours of failing. I can’t get the Photon to show up on a COM port. It is in blinking blue listening mode.
I do see Photon under Universal Serial Bus Devices but not under a COM port.

When I run “particle list” from the CLI (I did finally get that to work) I see all three of my devices, but they all show offline - including the one sitting here blinking blue. I thought the CLI was a serial link to the Photons, but apparently it is a Command Line Interface to Particle - right?

OK, typing this out helps clarify. I think I just figured this out: particle xxx on the command line connects to Particle. Other commands can connect through USB/serial if that is what the command specifies - right?

In any case, I have tried and tried and after putting the Photon in DFU Mode, can’t get anything like “Photon DFU Mode” to show up in the Device Manager.

I really need to either get this Photon up and running or decide it is dead and replace it before I leave the country on Tuesday AM.

I’m sorry to keep adding updates, but I think I am getting to the crux of my problem. If a CLI command prefaced by “particle” sends the command to Particle to communicate with my Photon through the cloud and if my Photon won’t communicate through the cloud, then running "particle keys doctor " is doing nothing - right?

So, back to “THE problem” from my first post: How can I get my Photon back to communicating with the cloud?

Thanks,

Place the Photon in Listening mode and run the command particle setup

Hi Kennith,

Thanks, but I have already tried that. I get:

I think it is because my computer doesn’t have WiFi. It is connected to my router via ethernet cable. That is why I spent so much time trying to figure out CLI and DFU.

Step-by-step:
Using the CLI installer should also provide you with the necessary drivers, but if it doesn’t these steps should help.
To get the device listed as DFU device you need to

  • put the device into DFU Mode
  • then run zadig and in menu select Options - List All Devices
  • select the Photon in the Dropdown-List
  • select LibusbK as driver to install
  • hit Install Driver

For COM port

  • put the device into Listening Mode
  • double check if it’s not already in DevMgr listed as COM
  • if not search under USB Devices and right click
  • update driver

alternatively you can use zadig as above and select USB serial (CDC) as driver to install.

If you don’t rely on CLI searching your networks but enter the data manually you should still be able to set your devices up
In Listening Mode (once COM drivers are installed)

particle serial wifi

ScruffR

I sincerely thank you for your replies, but I have tried those steps several times using different USB cables. I have also tried reinstalling the CLI at least 3 times and have tried moving the USB cable to a dedicated USB 2.0 port.

Trying one more time in Listening Mode, I used Zadig and manually “Browsed” to a serial driver that got COM7 to finally show and using PuTTY, I can talk to the Photon. But, this doesn’t really get me to DFU key doctor.

Putting my Photon into flashing yellow - DFU Mode
Zadig does not provide any Photon related options. I get 9 Devices listed (Mouse, USBDevice, 3 x “USB 2.0 Device” on 3 different interfaces, USB Storage Device, 2 x USB Mass Storage Device and Win USB Device). This has been my frustration since yesterday. I have all this stuff:
, have executed the various *.exe files and still get nothing in Zadig that looks includes Photon. Not knowing what the “USB Device” was, I tried using Zadig to update its driver and found

but this gave me nothing in Device Manager related to Photon

and no joy in CLI

Even though I’m a total noob with Linux, I may try doing this on a Raspberry Pi, but I am running out of time.

Thanks again for your help,

The device you got selected there (VID/PID 2B04:D006) is in fact your Photon.
If it is blinking yellow at that point I guess at some point the wrong drivers were installed.
But that’s no problem as you can replace these with the correct ones (libusbK).
Just click the little arrow/triangle on the right of the Install WCID Driver button and select Install Driver instead. Then press the button.

I must have finally found the right combination of USB cable and USB2.0 port since for the first time in 24 hours I got “Photon DFU Mode” under “libusbK USB Devices” in Device Manger. :grinning:

Running "particle keys doctor ", I get:

I would really appreciate it if you would give me a pointer to the solution to this problem.

Thank you!!

Run the following two commands:

cd c:\OpenSSL-Win32\bin
particle keys doctor DEVICE_ID

Yay! Thank you kenneth. I finally got “particle keys doctor” to run.

Unfortunately, it did not fix my problem. My photon came back flashing cyan with an occasional red flash. It was this behavior that got me started in this maze 24 hours ago. But, since DFU is finally working, I’m off to search for a fix for this.

I may be back, but in the mean time, thanks for your help and patience.

OK - I found this

Put the Photon into DFU mode (blinking yellow) by holding down RESET and SETUP. Then release RESET while holding down SETUP while it blinks magenta, until it blinks yellow, then release SETUP. Then issue the CLI commands:

particle keys doctor YOUR_DEVICE_ID_GOES_HERE
particle keys server
particle flash --usb tinker

My Photon is Breathing Cyan again. :grinning::wave::+1:

Thank you all for your patience and help.

2 Likes