Will not complete setup via app [SOLVED]

I’ve tried without success to connect my Photon via the Android app. The sequence usually stops at the second step, connecting to the WiFi network, but occasionally will make it to the fifth step, verifying product ownership, before failing.

I’ve tried the suggested workarounds - particle-cli and putty over USB, connecting to my mobile phone hotspot, even connecting to an unsecured WiFi source. I’ve spent about three hours going through the forum messages - any suggestions of where else to look? Not an auspicious start for any sort of product development!

Thanks,
maf

Could you try this?

  • npm update -g particle-cli
  • place the device in DFU mode
  • particle update
  • place the device in DFU mode
  • particle flash --usb tinker
  • hold the SETUP button until the Photon blinks blue
  • release and hold the SETUP button until the Photon blinks blue rapidly
  • particle serial wifi
  • Setup wifi credentials and let me know how things go. :slight_smile:
2 Likes

The ‘particle update’ step failed because dfu-util is not installed. I tried downloading that utility yesterday, but did not recognize the .xz compressor extension. The ‘particle flash’ command fails for the same reason.

I used the ‘particle serial wifi’ command earlier as well, and that timed out after supplying the WiFi credentials. Same with the putty serial connection and the ‘w’ command. Any suggestions on getting the dfu-util installed?

Thanks,
maf

This should help:


If you’re on windows, you could use this (AWESOME!) installer, which contains the CLI along with DFU-util as well:

1 Like

Well, the first set of instructions got the DFU driver installed and the system firmware updated. At this point, the unit blinks blue rapidly with a bit of red thrown in. It will also drop back to a slow blue blink. Nothing new seems to appear on the port scanner though (WICED DHCP Client maybe?).

The Particle app doesn’t appear to see the unit, and it can’t even provide WiFi credentials when the unit is put into program mode? Any suggestions as to what state the unit is in and how to connect to it (assuming the WiFi credentials from the serial step are still valid)?

Thanks,
maf

Have you tried the steps provided above? Don’t try the mobile app for now, try a serial connection to be sure nothing gets lost ‘over the air’.
Blue with red is magenta which means there is either an update going on (blinking), or the device is in safe mode (breathing). Blinking blue is listening mode, which is what you need to configure credentials.

The unit did accept the WiFi credentials using the ‘particle serial wifi’ command. After it reboots though, it no longer responds via the USB COM port. What at this point is required to complete setup if the Android app is not used?

Thanks,
maf

Wait, to be clear, we’ve now got breathing cyan, right?
If so, then indeed it should no longer respond to the command line, since a serial connection is only possible in listening mode, or when you’ve got Serial.begin() in your code.
If it’s breathing cyan, hold the Setup button for 3 seconds until it starts blinking blue. Then using the CLI, issue particle identify, which should give you a deviceID. Copy that ID and paste it in a new command: particle device add [deviceID]. That should add it to your account. After that, hit the reset button on the Photon, and it should go back to breathing cyan.

Well, the unit responds to the device add command with an error (Device is not connected). Makes sense if it is in USB mode.

The breathing mode is not continuous, switching from rapid cyan back to blinking blue. Doesn’t sound like it is making a permanent connection since it eventually remains in the blue state.

maf

In going back through the original steps, I found this detail in the flash tinker step:

Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!

Flash success!

So, a success message with a warning of some sort. Significant, perhaps?

maf

I’ve repeated the initial reset and re-flash instructions with a liberal sprinkling of ‘particle login’ to insure my account credentials are valid. At this point, the unit alternates between a fast blue blink and an alternating red/blue blink (“breathing?”), with occasional rapid blue blinking. The periods of breathing get fewer and further between. The unit does not accept the device add command and no longer responds to the Android app when in setup mode. WiFi seems to be NoGo.

At this point, unless there is another suggested approach such as a factory reset, I’m ready for an RMA and return address. One happy side effect of the last three days is that I’ve managed to memorize my random 11 character WiFi password.

Thanks for the help,
maf

I don’t think you need to RMA this just yet. The pattern sounds familiar but the colors are a little unusual. What color is the LED when the device first starts? If you’re able to post a video that would help greatly!

Good suggestion! I’ll try a video after the meeting…

Well it seems only images can be uploaded to a forum post. Is their a general support email address to which a video can be sent?

maf

the LED starts white, then after a few seconds blinks green, then switches between blinking blue and alternating between red and blue. After a minute or two, the blue period grows longer while the alternating blue/red becomes less frequent. Eventually it only blinks blue. Attempts to go into setup mode and claim the device fail because it is not recognized by the server.

This behavior would seem to correspond to the furthest progress from the Android app, where it would reach the fifth step of “Verifying product ownership” before failing. It would seem to not being making it through the router, though a client “WICED DHCP Client” shows up on an IP scan when the unit is powered and isn’t there when power is removed.

Problems contacting or handshaking with the Particle server perhaps?
maf

Alright, describing colors in text is evidently not working. If possible, upload the video to youtube and post the link here. A dropbox link, or a google drive link should also work. If neither of those is available, try mailing it to support (at) particle.io If so, do reference this thread so they know what it’s about.

With the steps described in my first post, you should be able to get to breathing (not blinking) cyan, which is a mix of red and blue. (I often find it easier to differentiate between colors when I place a thin paper sheet over the LED, diffusing the colors. That makes it more uniform.)
So, the LED shout be breathing cyan, regardless of whether it’s been claimed or not.

Here are the steps I take for a device that’s in blinking blue mode on startup, thus without credentials. It’s also unclaimed.

  • place it in DFU mode by holding setup, and pressing reset. Hold setup until blinking yellow:

  • Device should now be in blinking blue mode (listening mode). Copy the deviceID for later.

  • With the Photon still in blinking blue:

  • To be very sure there’s no user application on there messing with the LED, place it in DFU mode again:

  • Now, it should be breathing cyan (green/blue):

  • It now shows up when I do a particle list:
1 Like

Try the link below

It should give an idea of the initial behavior. I can do a longer sequence if needed. I’ve followed much the same sequence you’ve listed:

npm update -g particle-cli
particle update
particle flash --usb tinker
particle login
particle serial wifi

DFU mode or setup mode in the appropriate places. At this point, the LED shows what you see in the video (no breathing). After holding the setup button until it’s blinking blue, the ‘particle identify’ returns a device id, the ‘device add’ fails, and a ‘particle list’ returns “No devices found” so it is certainly stuck somewhere. Hope the vid helps.

maf

YES! “A picture speaks a thousand words”, that video certainly helped!

It’s the ‘blinking orange’ issue as far as I’m able to tell from the video :smile: That means that, somehow, your key probably got corrupted. Not to worry, there a solution for that :smile:
First, back-up your current key, you know, just in case…
https://docs.particle.io/support/troubleshooting-support/photon/#how-to-backup-save-your-key-

Then, get yourself some new keys:
https://docs.particle.io/support/troubleshooting-support/photon/#how-to-change-your-key-

In Theory, that should fix the issue. Give it a try, and let me know if that worked for you :smile:

1 Like

Backing up the keys resulted in

C:\Projects>particle keys save mykey.der
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -d 2b04:d006 -a 1 -s 34:612 -U mykey.der
running openssl rsa -in mykey.der -inform DER -pubout  -out mykey.pub.pem
Error saving key from device... Error: Command failed: C:\Windows\system32\cmd.e
xe /s /c "openssl rsa -in mykey.der -inform DER -pubout  -out mykey.pub.pem"
unable to load Private Key
10224:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:./c
... (rest deleted for space)

Having little to lose, I went ahead with the 'particle keys doctor ’ command which printed “New Key Created!” followed by several failures to save the keys (similar “header too long” error messages as the previous command). The message “Unable to load Private Key” was repeated three times in the output.

The ‘particle keys send’ command did succeed but ‘particle list’ and ‘particle device add’ do not. LED behavior remains the same. The .new.pub.pem file, if it is valid:

It does not look as though this guy is going to recover. Any other thoughts?

Thanks,
maf

Ah yes, since it might be pertinent, the version of OpenSSL I have is 0.9.8 rather than the latest 1.0.x source available online.