[SOLVED] Can't activate and claim my core

EDIT:
Explanation of the problem: https://community.spark.io/t/cant-activate-and-claim-my-core/6068/23
Solution to the problem: https://community.spark.io/t/cant-activate-and-claim-my-core/6068/24


Hi guys,

Just received my core. Following events have happened:

  1. Can’t activate using Android app: “No core found”
  2. Have found number of threads and this troubleshooting diagram: https://community.spark.io/uploads/particle/1637/af5a6277bf9302b9.png So I went for firmware upgrade
    2a) spark flash --usb deep_update_2014_06, spark flash --usb cc3000, spark flash --usb tinker
  3. Set up using spark-cli
  4. Core blinks green for about 2 minutes then blinks cyan for 5 (or more) minutes. Cycle repeats forever

Hey @ciukes,

So is your core able to be breathing cyan?

If that’s the case and your have spark-cli, press the MODE button for 4 seconds before entering spark identify in the terminal.

You will see the ID of your core. Next, we shall claim it!

Use spark core add core_id and it should work now :smiley:

I think the OP meant the LED rapidly blinks cyan (for quite some time) after blinking green for a couple seconds … but never breaths cyan.

I have seen this myself. It seems indicative of some kind of network problem, possibly a local firewall blocking the connection.

You might try the suggestions for “Flashing green then red”, which you can find here and are which are intended to resolve a similar issue (if I’m right.)

gruvin is right. The Core blinks green for about 2 minutes then blinks cyan for 5 (or more) minutes. Cycle repeats forever. I tried to use spark core add ... anyway and failed. Core is not connected.

It is alarming to me that core cannot be activated using mobile app. Both Android and iOS apps can’t find the core.

I did go through the “flashing green then red” steps many times. Changing WiFi access points, removing authentication, verifying accessibility of the websites etc. Bloody core still blinks green then cyan then green then cyan …

Blinking cyan means thay your core is able to connect successfully to Wifi BUT unable to connect to the internet or more specifically, the spark :cloud:.

With that say, it explains why the Apps are unable to find the core since it is not connected successfully to the cloud.

You can check if port 5683 is blocked.

You can check if port 5683 is blocked.

What is the host address core tries to connect to?

There could maybe be a (hopefully temporary) network routing issue between you and the Spark cloud server.

@kennethlimcp … what’s the IP (or URN) of the server that the 'core’s connect to? I cannot find it anywhere. If @ciukes had that, he could try telnet <IP> 5683 from his computer to check the link.

EDIT: {snap}

I can’t remember but it’s like the DNS IP address instead: device.spark.io or something.

Need to check! :smiley:

Yeah, that’s it!

So, the test would be …

$ telnet device.spark.io 5683
Trying 54.208.229.4...
Connected to device.spark.io.
Escape character is '^]'.
??>.iN{??Ȼ?X??~?;ˆ?ze?qoaL}?r????Z^]
telnet> close
Connection closed.

… or use Putty to do something similar, if on Windows.

If that’s working, then you might try a factory reset of the core. This is the same as going to DFU (bootloader) mode, but you keep holding the [MODE] button for about ten seconds, until you get other than the yellow flashing. After the reset, the 'core will be in listening mode (flashing blue) for USB access.

NOTE HOWEVER (for me and my early release cores anyway) that spark setup wifi fails with a timeout after a factory reset, until I flash the latest default firmware, using spark flash --usb tinker and re-enter listening mode from there. You may well not have that problem, but if you do, that’s how you fix it.

Sorry to make it sound as if these little babies are horribly unreliable. That’s not actually, usually, the case. The three I have are going great guns. So hang in there! :smile:

EDIT: The factory reset will not downgrade the deep update of the CC3000 module. So you shouldn’t have to do that again. THEN AGAIN, if something went wrong with that the first time, then maybe it wouldn’t hurt?

So…

Introduction:

  • core cannot be discovered neither by Android not iPad nor iPhone
  • telnet device.spark.io 5683 proves there’s no connection issue
  • Changed WiFi setup number of times:
    ** Apple TimeCapsule
    ** BritishTelecom home router
    ** Android Nexus 5 hot spot

Re-cap of the events

  • reset and flash the core
  • core blinks blue
  • supplied core with WiFi details through spark-cli
  • core blinks cyan for long period, then blinks green for long period and again cyan, green, cyan, green, cyan, green… forever.

Feels like the core can’t connect to the cloud (blinking cyan) and reinitiates network connection (blinking green). Please see yourself: https://www.youtube.com/watch?v=wpi4fzMFpiU. Core switches from blinking cyan to blinking green at 2:08

Starting to think my unit is broken :confused:

Ah ha! Apple timecapsule… You might be connecting the core to the 5Ghz SSID which is not supported by the CC3000.

Try setting up the 2.4Ghz SSID and connect again :slight_smile:

Hmmm. I’m using an Apple Airport Extreme (current version). It’s just set to automatic … EDIT: Oh wait, I see I don’t have a tick in the 5GHz name box …

I’ll enable 5GHz and see if it causes a problem for my 'cores. Will get back here shortly.

As I said I tried three different access points: Time Capsule, home hub and Nexus 5’s hot spot.

Just to confirm, my WiFi settings are no different from @gruvin. Then I also tried:

Always the same result… blinking cyan. blinking green

Weird stuff. As far as I know, the core is unable to reach the cloud when blinking cyan appears.

@teke might want to take over from here.

Right, so you did. Well, I just enabled 5GHz and set a 'core to use it’s unique SSID and it actually connects just fine, surprisingly.

What I was really confused about though, is that when I use spark setup wifi to install completely bogus credentials, my core still connects, though it takes a couple tries. It was then that I realised that the CC3000 module can in fact have multiple WiFi configurations, which it cycles through.

So right now, with this knowledge and other stuff in mind, I’m trying a bunch of stuff to see if I can duplicate the exact same symptoms you are seeing. I’ll get back shortly.

EDIT: Skip to next post first, then back here if no joy.


Here’s some steps I just followed and some observations I made, with a known working core …

  1. Factory reset
  2. Core into DFU mode
  3. spark flash --usb deep_update_2014_06
  4. Core reboots and enters listening mode (flashing blue). Deep update flash not performed yet.
  5. spark setup wifi … but using bogus credentials, so the core cannot connect. Core is now flashing green for a long time. Deep update is still not performed.
  6. Place core back in listening mode
  7. spark setup wifi with correct credentials. Core reboots, connects, then performs deep update, indicated by flashing crimson (purple). Core eventually reboots and connects to cloud.

This tells us that the core must be able to at least establish a WiFi access point connection before it will perform the the deep update. (I highly doubt a cloud connection would be required. But I’m not sure.)

So @ciukes … my question for now is, did you actually witness the lengthy session of crimson/purple LED flashing indicating that the deep update was in progress, directly after the DFU-spark flash --usb deep_update_2014_06 command? (I am guessing “No”.)

My main reason for asking right now is only so that I can replicate the events, to see if I can get my core in the exact same state as yours.

P.S: Incidentally, I’m not sure I have ever witnessed a core flashing cyan in quite that same ‘erratic’ manner. Rapid and for a long time, yes … erratic, no. I originally put this down to video frame rate interpolation, though. Perhaps you could confirm?

Ah!! I believe I may have now produced the exact same symptom. I think you have a corrupt (or invalid) cloud server public key.

I just purposely corrupted the cloud server’s public key and installed it back in my core. I now have the same sort of slow/fast/mostly fast cyan blinking, on and on – seemingly just like in your video.

So here’s how you fix that …

First, download a copy of the cloud server’s public key, here: https://s3.amazonaws.com/spark-website/cloud_public.der

Then put your 'core in DFU (bootloader - flashing yellow) mode and execute the following, from a directory containing that above file …

spark keys server cloud_public.der

Reset your core. Cross your fingers. Let us know!

  • I did update server’s public key. No improvement.
  • I did go through @gruvin steps. Core flashes as described but no success at the end

But…
I did set up local spark server ( https://github.com/spark/spark-server ). The core did connect successful to the local server although on number of occasions I have seen this message …

c8a11c6dddc19 HTTP/1.1" 200 2 "-" "-"
Handshake failed:  Handshake did not complete in 120 seconds { ip: '192.168.1.84',
  cache_key: undefined,
  coreID: '55ff6c065075555331341887' }

… or this one …

192.168.1.72 - - [Thu, 31 Jul 2014 18:44:11 GMT] "POST /v1/provisioning/55ff6c065075555331341887 HTTP/1.1" 200 10 "-" "-"
1: Core disconnected: socket error Error: read ECONNRESET { coreID: '55ff6c065075555331341887', cache_key: undefined }

I run out of ideas at this stage.

One more experiment:

  1. Factory reset
  2. Core into DFU mode
  3. spark flash --usb deep_update_2014_06
  4. Core into DFU mode
  5. spark flash --usb cc3000
  6. Core into DFU mode
  7. spark flash --usb tinker
  8. Core into DFU mode
  9. spark keys server cloud_public.der
  10. Unplug power & plug in again
  11. Core blinks blue, ready for setup
  12. spark setup
  13. setup done

Core blinks cyan for a brief moment then blinks yellow for long time and ends cycle with red flash. Cycle starts again, you can see it here:

According to the colors guide (https://community.spark.io/t/what-do-the-colors-on-the-spark-core-led-mean/533) blinking yellow/red means “Bad credentials for the Spark Cloud. Contact the Spark team (hello@spark.io)”. So I did.