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.
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.
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.
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.
I am not sure about the company WiFi.
I have a local router with WPA and no success here.no rainbow whatsoever.
IDE says it is connected but can not flash the code.
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)?
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
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
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
First:
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 ;-))
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 WiFi.off() in one of your tests?
Have you tried flashing new firmware via USB?
Have you confirmed that your company network has port 5683 open?
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.