Failure in final step of WiFi connection

Hello folks,

When my Photon is in the last step of connecting to the WiiFi network (i.e. fast cyan flashing) it fails. It blinks yellow/ / red (see video below) and it returns to flashing cyan again. It stays in this look indefinitely without connecting to the cloud.

I have try to setup the Photon using the mobile App and passing the credentials through serial mode. I have also installed 0.4.5 through DFU successfully.

Any ideas what is going on or how to connect the Photon to the cloud?

Thanks!

https://vine.co/v/ePqz5FWm6pY

I’m guessing your keys got corrupted somehow. Would you be willing to try this?
https://docs.particle.io/support/troubleshooting-support/photon/#how-to-change-your-key-

2 Likes

Hi @Moors7,

I tried to use the keys doctor but I’m getting the following error:

C:\Users\sergio>particle keys doctor 22002a00154734XXXXXXX
running dfu-util -l
Found DFU device 2b04:d006
running openssl genrsa -out 22002a00154734XXXXXXXX_new.pem 1024
Error creating keys... Error: Command failed: C:\Windows\system32\cmd.exe /s /c "openssl genrsa -out
 22002a00154734XXXXXXX_new.pem 1024"
'openssl' is not recognized as an internal or external command,
operable program or batch file.

Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - Error: Command failed: C:\Windows\system32\cmd.exe /s /c "openssl genrsa -out 22002a00154734
XXXXXXXXX_new.pem 1024"
'openssl' is not recognized as an internal or external command,
operable program or batch file.

I ran npm update -g particle-cli and tried again but no luck. Any tips? Thanks!

@sazp96, did you install openssl on your system?

1 Like

No I hadn’t. Now I have :smile:

Now I’m getting the following error when trying to save the key to the Photon.

C:\OpenSSL-Win32\bin>particle keys doctor 22002a001547343XXXXX
running dfu-util -l
Found DFU device 2b04:d006
running openssl genrsa -out 22002a001547343XXXXX_new.pem 1024
running openssl rsa -in 22002a001547343XXXXX_new.pem -pubout -out 22002a001547343339383037_new.p
ub.pem
running openssl rsa -in 22002a001547343XXXXX_new.pem -outform DER -out 22002a001547343339383037_
new.der
New Key Created!
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -d 2b04:d006 -a 1 -s 34:612 -U pre_22002a001547343XXXXX_new.der
running openssl rsa -in pre_22002a001547343XXXXX7_new.der -inform DER -pubout  -out pre_22002a001547343XXXXX7_new.pub.pem
Error saving key from device... Error: Command failed: C:\Windows\system32\cmd.exe /s /c "openssl rs
a -in pre_22002a22002a001547343XXXXX_new.der -inform DER -pubout  -out pre_22002a001547343XXXXX7_ne
w.pub.pem"
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
unable to load Private Key
7916:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:.\crypto\asn1\asn1_lib.c:
157:
7916:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:.\crypto\asn1\tasn_dec.
c:1186:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:747:
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:666:
7916:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1198:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:762:
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:694:Field=iqmp, Type=RSA
7916:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:.\crypto\rsa\rsa_ameth.c:119:
7916:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1198:
7916:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec
.c:372:Type=X509_ALGOR
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:694:Field=pkeyalg, Type=PKCS8_PRIV_KEY_INFO

Error saving key to device... Error: Command failed: C:\Windows\system32\cmd.exe /s /c "openssl rsa
-in pre_22002a001547343XXXXX_new.der -inform DER -pubout  -out pre_22002a001547343XXXXX_new.
pub.pem"
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
unable to load Private Key
7916:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:.\crypto\asn1\asn1_lib.c:
157:
7916:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:.\crypto\asn1\tasn_dec.
c:1186:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:747:
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:666:
7916:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1198:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:762:
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:694:Field=iqmp, Type=RSA
7916:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:.\crypto\rsa\rsa_ameth.c:119:
7916:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1198:
7916:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec
.c:372:Type=X509_ALGOR
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:694:Field=pkeyalg, Type=PKCS8_PRIV_KEY_INFO

Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - Error: Command failed: C:\Windows\system32\cmd.exe /s /c "openssl rsa -in pre_22002a001547343XXXXX_new.der -inform DER -pubout  -out pre_22002a001547343XXXXX_new.pub.pem"
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
unable to load Private Key
7916:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:.\crypto\asn1\asn1_lib.c:
157:
7916:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:.\crypto\asn1\tasn_dec.
c:1186:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:747:
7916:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\t
asn_dec.c:666:
7916:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1198:
7916:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:.\crypto\asn1\tas
n_dec.c:762:

i have the same problem with one of my photon. glad i found this post. running particle keys doctor solve everything. the photon suddenly restart and act like nothing happening at all. my device name is back (although i already unclaim the device through web IDE), my last firmware that i flashed is back. funny.
anyway thank you Moors7 & peekay123!

2 Likes