Sorry but.. cannot connect core to wifi :( - SOLVED!

Hi there,
I am so sorry to open another thread on this subject, but after going through all the troubleshooting forum & support docs, I’m still stuck with my core not connected / unresponsive!

After all the various tests I also rewrote the firmware over DFU, now at least after a factory reset the behaviour is as expected. Before reflashing even a factory reset was useless. After this reflash I managed to configure by usb the core (send SSID and password) a couple of times, but still no success…

My “default” LED situation - in which I’m stuck - when I power up my core is actually the current:
(> = next means next step in led sequence)

white (pulse) > green (Slow) > light blue (fast) > loop “orange” (? I see the red and the green leds flashing, seems orange) & random couple of white / light blue blinks.
I try both spark app & ticonfig app, no core found, the core seems stuck in the loop.

if I do a simple reset, restarts same as above (loop & no cores found)

If I do factory reset: green > white (pulse , fast) > blue (normal, not fast). Normal, I hope
If now I use spark app now > starts with steady blue > green flashing > loop of “orange” and white/ light blue random blinks, as above, of course “no cores found” :frowning:

So again I’m stuck in the “default” LED configuration, unless I perform a factory reset again.
Wifi is WPA (tried also WEP and WPA2), AES encryption, channel 5. mode b&g mixed, router at 2 meters from the core, where Wifi usually works. :frowning:

Is there anybody who can suggest me what to do before dropping definitively the core in my drawer?

Thanks since now to anybody who will help,

Nicola

1 Like

@cerocca,

This is normal for factory reset:

Look of orange sounds like the keys are not correct and therefore not connected to the :spark: cloud.

Can you do the following:

  1. Factory reset

  2. Send Wifi credentials

  3. See the RGB led and tell us the colour. Should be red/yellow

2 Likes

Hi @cerocca,

Thank you for posting! If your core is flashing yellow/red after connecting to the cloud, then the keys on your core need updating. Can you install / upgrade the spark-cli on your box? https://github.com/spark/spark-cli

1.) connect your core, and place it into Listening mode (flashing blue), type spark identify to get the core id.

2.) reset your core and place it into DFU Mode

3.) type spark keys doctor your_core_id

4.) then type spark keys send [your_core_id] [your_new_key_file.pub.pem]

I hope that helps! If that doesn’t work, or if you’re sick of troubleshooting, please email us at hello@spark.io and we’ll get you sorted. :slight_smile:

Thanks!
David

1 Like

First of all, thanks for your replies!

@kennethlimcp : done it. It keeps behaving like in my first post (starts with steady blue > green flashing > loop of “orange” and white/ light blue random blinks)
I “clearly” see red and green LEDs flashing, seems orange on the circular LED ring.

@Dave: I’ll try also your way, a new one at least :smile: ! But it will be done in the next days, I’ll post about it

Thanks in the meanwhile!

1 Like

@dave: tried it.
I was able to do 1) and 2) from your post, only after a factory reset.
Ok also step 3, even if at the end I get an error , see here below (error in bold):

FOUND DFU DEVICE 1d50:607f
running openssl genrsa -out --force_new.pem 1024
running openssl rsa -in --force_new.pem -pubout -out --force_new.pub.pem
running openssl rsa -in --force_new.pem -outform DER -out --force_new.der
New Key Created!
FOUND DFU DEVICE 1d50:607f
FOUND DFU DEVICE 1d50:607f
running dfu-util -d 1d50:607f -a 1 -s 0x00002000:1024 -U pre_–force_new.der
Saved!
checking file  --force_new.der
spawning dfu-util -d 1d50:607f -a 1 -i 0 -s 0x00002000:leave -D --force_new.der
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU capable USB device… ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"
Error during spawn TypeError: Cannot call method ‘on’ of null
Claiming USB DFU Interface…
Setting Alternate Setting #1
Error saving key… TypeError: Cannot call method ‘on’ of null
Make sure your core is in DFU mode (blinking yellow), and that your computer is online.
Determining device status: state = dfuUPLOAD-IDLE, status = 0
aborting previous incomplete transfer
Error - TypeError: Cannot call method ‘on’ of null
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "SPI Flash : SST25x"
Downloading to address = 0x00002000, size = 610
.
File downloaded successfully
Transitioning to dfuMANIFEST state
Error during download get_status

After this, at step 4 I’m stuck… I tried to use my core id. with _new at the end, or directly a “new” (invented by me) core ID, which was the original id with the last number changed. in both cases I get this:

Please provide a filename for your core’s public key ending in .pub.pem
Potentially unhandled rejection Please provide a filename for your core’s public key ending in .pub.pem (WARNING: non-Error used)

How to proceed now?

thanks!

Hi @cerocca, I had the same problem and the same error after spark keys doctor your_core_id, but searching on the spark-cli’s GitHub issues I found this issue and it’s worked for me.

Simply run spark keys doctor [your_core_id] and ignore the errors, then spark keys send [your_core_id] [your_core_id]_new.pub.pem.
If a new public key was successfully submitted you are now able to connect and claim your core.

Hope this helps!
Gianluca

2 Likes

Hi @gianlupu
thanks for the feedback

In fact I already ignored the error after spark keys doctor your_core_id
Niw the problem is that when I write “spark keys send your_core_id_new.pub.pem” , regardless of what I use as “your_core_id_new.pub.pem” , I get the following error (in bold)

Please provide a filename for your core’s public key ending in .pub.pem
Potentially unhandled rejection Please provide a filename for your core’s public
key ending in .pub.pem (WARNING: non-Error used)

for “your_core_id_new.pem” I used both my core id , adding _new at the end, and my core id with the last character changed.

Am I missing something?

@cerocca I think you’re wrong to give the command. After the send keyword you have to put [your_core_id], and then [your_core_id]_new.pub.pem.

Gianluca

1 Like

spark keys doctor should do the job to fix everything.

Try again? :slight_smile:

@kennethlimcp : i tried again the spark keys doctor but I don’t understand how it should fix everything, or better I don’t get the next steps to be done.

@Dave @gianlupu : I managed to do the spark send keys command, thanks to gianlupu suggestion, here in bold is the output of my terminal (linux mint):

sudo spark keys send 53ff6f065067544856431287 53ff6f065067544856431287_new.pub.pem
attempting to add a new public key for core 53ff6f065067544856431287
submitting public key succeeded!

Now I retried to use both spark app and ti config app on my iphone, but again no success… what should I do after havong submitted a new public key?

1 Like

@cerocca,

when you say no success, what exactly are you referring to?

Sometimes, the OpenSSL doesn’t generate the right file for upload. (something to do with even bytes files i think)

If your core is still flashing yellow/red then there’s still an issue with the keys.

For blinking green, the core managed to connect to the Wifi router but unable to reach the :spark: cloud.

Let us know what is happening and we can work it out together :wink:

@kennethlimcp : when I say no success I mean that the spark app doesn’t find any core, and that the TI’s smartconfig app doesn’t do anything (seems stuck)

When I power now my core (or after resetting it) I have pulsing cyan, flashing green (slow) , flashing “orange” (green and red together, same as in my previous posts)

But the core when from Blinking Blue --> Solid Blue --> Blinking Green --? Blinking Orange (red/yellow)

@dave, you might have to do a manual add of keys for this core.

@kennethlimcp
thanks for writing me back. I retested my core with more attention after your post for “finding” the Blue led and describing my current situation, which is this:

I connect/power up my core, LED goes pulsing cyan, slow/medium flashing green , couple of pulsing cyan, then flashing “orange” (green and red together, same as in my previous posts).
Same after a reset. The core “by default” does not EVER get to Blue, neither blinking or solid.

Now I put the core in listening mode (3 secs MODE button), the LED goes solid solid , then blinking Blue. Should be fine.

I launch now the Spark app, SSID is already there, insert the password and the LED goes solid Blue, then Blinking Green > (fast) Flashing Cyan > Blinking Orange (red/GREEN) as after the startup (see above)
And the app ends un saying “no cores found”.
Same behaviour with TI’s smartconfig app, but without any failure message (the button simply goes back to “start”)

One difference between our posts is that for the orange you write me (red/yellow) while I see red and GREEN leds on. green in upper left corner, red in lower right corner of the main led ring, having the core with the usb connector facing up (same as in “Connecting your Core” section of the website)

In any case thanks so much for your fast replies on this post. Very appreciated :smiley:

So indeed it’s an issue with the keys with the Blinking orange.

I will let @dave take over from here :smiley:

Hey All!

Thank you for troubleshooting and working on this! It sounds like you’re doing the right steps, but for some reason the new key on your core isn’t working yet. What spark keys doctor is meant to do is make a backup of your core’s key, and generate and flash a new key, and send the new public key to the server, but there’s a bug that interrupts the last step at the moment. ( I logged a bug for this here: https://github.com/spark/spark-cli/issues/53 ).

I’d be happy to send you a replacement core if you’re bored troubleshooting :slight_smile: I suspect you’re really close, and might just need another try to get it going, I’d try something like:

1.) put your core back into dfu mode

spark keys new test1
spark keys load test1.der
spark keys send 53ff6f065067544856431287 test1.pub.pem

and then restart and try that?

If that doesn’t work, I’m guessing somethings out of date, or broken on your core, and please email me at hello@spark.io / david@spark.io for a replacement.

Thanks!
David

1 Like

Hi @Dave
thanks for your continuos feedback. Of course I tried also your last suggestion, I was going to write that I had an error during the spark keys load test1.der command: Error saving key... Error: Command failed: Cannot open device , even if the spark keys send 53ff6f065067544856431287 test1.pub.pem command seemed successful.
But before doing this, I retried with superuser power (sudo) and… it worked!

I FINALLY have my core connected, seen by the app and from the online editor… thanks so much to you and to all the other people who helped me ( @kennethlimcp , @gianlupu ) ! It was really a nice surprise to see all this support for my problem. Now, let’s start doing something :wink:

For the records, here is my console output:

ciru@CiruHP ~ $ sudo spark keys new test1
[sudo] password for ciru: 
running openssl genrsa -out test1.pem 1024
running openssl rsa -in test1.pem -pubout -out test1.pub.pem
running openssl rsa -in test1.pem -outform DER -out test1.der
New Key Created!
ciru@CiruHP ~ $ sudo spark keys load test1.der
FOUND DFU DEVICE 1d50:607f
FOUND DFU DEVICE 1d50:607f
running dfu-util -d 1d50:607f -a 1 -s 0x00002000:1024 -U pre_test1.der
Saved!
checking file  test1.der
spawning dfu-util -d 1d50:607f -a 1 -i 0 -s 0x00002000 -D test1.der
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU capable USB device... ID 1d50:607f
Run-time device DFU version 011a
Error during spawn TypeError: Cannot call method 'on' of null
Error saving key... TypeError: Cannot call method 'on' of null
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuUPLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "SPI Flash : SST25x"
Downloading to address = 0x00002000, size = 608
.
File downloaded successfully
ciru@CiruHP ~ $ sudo spark keys send 53ff6f065067544856431287 test1.pub.pem
attempting to add a new public key for core 53ff6f065067544856431287
submitting public key succeeded!

Again, thanks so much!
All the best

Nicola

3 Likes

Awesome! Glad you got things working! Thanks for troubleshooting with us :slight_smile:

Thanks,
David

2 Likes
 spark keys load test1.der

Reply ,

Apparently I didn't find a DFU device? util said
Error saving key... no dfu device found.

Why ?
Please help me , my sparkcore blink yellow and driver dfu is good.

Works fine for me…

Try sending again? :smiley: