Set up using CLI - Rainbow

When I set up the spark using the CLI, it is supposed to shout rainbows at one point.
The spark just breath cyan with period of flashing cyan. The rainbows never came.
If I try spark list, it tells me the spark is off line.
I tried resetting to factory without any success.

Any idea what I should do?

Would you tell us the steps you’ve been through? What have you done after the factory reset? Did you try to configure it again with the CLI?

Thank you for the quick answer.
Yes I did try to configure it again with the CLI. Same as before, it went all the way but no rainbow.

Ok I got it to work using the WEP security level.
I am doing the first tutorials.
Newbie question: Where do you write the code to control the Core through the Cloud?
Electric Imp has an agent to do that but could not find anything here.

Thank you

Glad to hear you’ve got it working!

I’m not sure what you mean by “write code to control the Core through the cloud”, but I’m going to assume you want some sort of interface? The thing is, there isn’t really a universal interface. The Spark devices communicate using a REST API, which you can call using multiple different methods/programming languages. For web applications, you can use PHP, JavaScript, node.js, Ajax, pretty much anything that can make GET and POST requests.
I tried to build something with the SparkJS JavaScript library, which you may, or may not, find useful as a starting point. Can find it here.

Let us know if you need any more help!

1 Like

As @Moors7 said there are loads of options to do the remote side of your communication.

But if your question

did refer to the local (Core) side of the communication, you’ve got several options too.

  • WebIDE (easiest for starters)
  • Spark DEV
  • Local ToolChain (down to bare metal)

Thank you.
Yes, I was looking for a friendly interface for non IT people for the remote side. I installed Postman extension on Chrome.
I saw somebody used a Python module. I will give it a try too.

Ok, I managed to make it work at home using WEP, which is not supposed to work according the the message in the CLI.
Now, I am back at work and impossible to get the rainbow whatever network I choose or security level.

Any idea is appreciated.


What is your infrastructure at work?
Your work network might throw several obstacles into your way, two of them are

  • The firewall might block the port you’d need for cloud communication (e.g. outbound TCP to on port 5683)
  • If you’d use WPA2 it needs to be Personal, since Enterprise is not supported
1 Like

I am not sure about the company WiFi.
I have a local router with WPA and no success rainbow whatsoever.
IDE says it is connected but can not flash the code.

All the available WiFi are WEP

OK, but excuse my ignorance, why do you actually need to see rainbows?

I must admit I never used CLI to register my Cores, but I guess you’ve registered it once, you won’t need to see rainbows again.
Should it thereafter not behave like any other registered Core at power up (unless programmed to behave differently)?

  • short white
  • green blink
  • cyan flashing
  • cyan blink
  • cyan breathing (if your credentials fit)

So no rainbows required, or are they?

THe CLI asked if I see rainbow. The iPhone App tells me than now that my Core shouts rainbows I can give it a name.
I noticed that when there is no rainbow, the Core seems to be connected but stays unresponsive.

Aaaaand OK again :wink:
I somehow lost track of the root problem. I don’t really like putting through all of that again, but if you don’t mind, I’d like to establish where we actually are :blush:
What does spark list report?
Do you see your claimed Core?
Has it already got a name? I guess it’s offline.
Have you tried putting the Core into listening mode (blue blinking) to provide WiFi credentials via serial?
Do you get a selection of security options after you entered your SSID?

There’d be more questions, but that should do for now :wink:

I managed to connect the core at home using the CLI. After the breathing cyan, it went to the rainbow phase and the breathing cyan again after naming
I was then able to flash some code and send URL request succesfully.
Now I am at work and try to repeat the process so I can develop more useful application. I never get to the rainbow phase. Breathing cyan bu not able to flash anything or send request.

for your questions:
spark list says the core is offline (even if it is breathing cyan and the ide says it is there)
Yes the core has a name as I was able to use it at home
It is always in listening mode when I use serial
For the security options WEP at home worked. WEP at work doesn’t. WAP at work doesn’t either. Tried WAP2 as well without any success.

Is there any firmware update I should know about? I got it directly from Spark two weeks ago.


I see. So you already have your Core claimed and named, hence you don’t need to go through all that (including rainbows) again.
Are you sure, you’re seeing cyan breathing and not white (if you look closely at the LED no red dot allowed - otherwise it’s white - don’t get blinded by it :eyeglasses: ;-))

There might be some misunderstanding. You can use Serial in your firmware to “listen” for input, but listening mode (blinking blue) is something else.
Once you enter you WiFi credentials via serial your Core should go from blinking blue (listening) to white, to green blinking, to cyan flashing, to cyan breathing.
Does this happen?

Have you by any chance tried SYSTEM_MODE(SEMI_AUTONATIC), SYSTEM_MODE(MANUAL), Spark.disconnect() or in one of your tests?
Have you tried flashing new firmware via USB?
Have you confirmed that your company network has port 5683 open?


Yes it is going through the colors

then rainbows and breathing again.

I just did it at home and it works fine. The company wifi config might be the issue here. I will have to check with IT.

I haven’t tried the functions you mentioned in my tests. Should I?


The “functions” I mentioned would have explained some of the behaviour, if you had used them.
Since you haven’t, other causes than the ones I’ve been thinking of, would be more likely.

Just for the record: WEP on my Apple router has never worked. WPA2 is great.

One of the things I learned about WEP is that it is not part of the standard how you change a password into a 40-bit hex number for the key so most manufacturers use one way, but apparently Apple uses a different way. There are several websites that translate a password into a hex key and vice versa and none of them work on my Apple password/hex key pair.