I have some problems with the command spark setup. I managed it to successful create a account. After that I should enter my wifi credentials and then it says “Please wait until your core is breathing cyan and then press ENTER” - but all the time I tried that it flashes white then green, white again and then 3 times red.
I have reset the core a dozen times, but could not manage it to the “breathing cyan”. Where should I post that correctly? As a new thread?
Thanks for the help
@clyde, did you go through the steps 5, 6 and 7?
5,6,7 from here https://github.com/spark/spark-server
or from the first timer tutorial from @kennethlimcp?
I made it to send the pub keys to the core, then i am able to do the “identify” which gives me my core ID and then I come to the spark setup here is the output:
Setup your account
You are already logged in as email@example.com
Logged in! Saving access token: 1234567890ABCDEFG
Finding your core id
Your core id is: 123abc456def890
Setup your wifi
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: 3
Wifi Password: MySuperSecretPassword
Attempting to configure wifi on /dev/ttyACM0
I said: w
Serial said: SSID:
I said: MyWifi
Serial said: MyWifi
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2:
I said: 3
Serial said: 3
I said: MySuperSecretPassword
Serial said: MySuperSecretPassword
Thanks! Wait about 7 seconds while I save those credentials...
Serial said: Awesome. Now we'll connect!
If you see a pulsing cyan light, your Spark Core
has connected to the Cloud and is ready to go!
If your LED flashes red or you encounter any other problems,
visit https://www.spark.io/support to debug.
Spark <3 you!
Done! Your core should now restart.
Please wait until your core is breathing cyan and then press ENTER
Mhm ok blinking 3 times red is “The Cloud is inaccessible, but the internet connection is fine” Ok that makes absolute sense because I could not see a connection in the spark-server. If i try to enter the server with a browser from another computer I got a bunch of error messaging with failed handshake and decryption. snafu…
@clyde, can you try resetting the core?. First time I had the same issue, but once I setup the core again it is all normal and I can see core is online. Please ignore if you already done that.
I am using Windows 7 32-bit machine.
Not the problem, I am using my raspberry pi. All things works just fine.
But I think I fucked it up something around “Perform Str+C” after you logged in. All the time I try to give the Core my Wifi credentials. So I reset the Core and tried it exactly like @kennethlimcp wrote it. But after I saved the core keys to the core_key folder and reset it it flashes blue. No network credentials. So I tried it once again and fire up the spark setup with correct network credentials. But again it stops at “Please wait until your core is breathing cyan…” think at this point the core should connect to the local and last step is to give it a name… but thats not possible mhm
At the moment…no ideas but I think I should open up a new thread
@clyde, claiming a core will not work I think they are about to add that feature.
@clyde, I like the Raspberry PI as Local , if you managed to get it working that will be great!.
I will do my very best
Opened up a new thread for ya!
Thanks everyone for your help troubleshooting, and sharing your findings! I still have tons of documentation to write, and I’m here to help and fix bugs as they’re discovered. This is still a very early release, but most things should be working. Please feel free to ping me with @dave, or open an issue on the spark-server repo https://github.com/spark/spark-server if you find bugs, or have suggestions / feedback.
@clyde, I have Eclipse setup to compile locally. When I am connected to the local server and upload a simple Blink sketch , I am getting the same error as yours, red blink and then reset. If I am connected to Spark Server the no problem, it is working fine.
@Dave, anything I am missing here? I should be able to compile sketch locally and upload to core, I am having problem here, could you please suggest something?
Made a step back, because at some point my dfu-util is freaking out and throws me all the time somthing with “Make sure your core in in X Mode (blinking blue/yellow), and is connected to your computer”.
Restarting the Raspberry fix the problem, then I simply reset the Core download the public key and send it with the spark keys server cloud_public.der to my core.
My Wifi Credentials from the last time I have used the spark setup are still in the cache so the Core immediately connect to the and I am able to flash my firmware again.
I am absolutely proud that I did not fuck it up completely
What is with that spark-protocol? I think some of my problems are within this piece of code. I cloned it from git and did a npm install in that folder. Exactly like I did with the spark-server. But the spark server must be started with node main.js, what is with the spark-protocol do I need to start it the same way?
Second I have connected from my Mac to my Raspberry (where the spark-server runs) and got a “Problem loading the page”. I can see in the output of the server a Handshake decryption error. with something like “Core disconnected: decryption failed”. Should the Core linked to the local first?
I think you one step in front of me, because my problem seems to be that the Core did not connect to my local cloud. I have no output in the spark-server daemon log.
@Krvarma i had same problem.red.blink.and then reset. Could you wait 3 or 4 minutes?. Ater that i think your.core will connect.
Can you try this ?
Remember that your core “alias” names have to be setup again on the local cloud using:
spark core rename core-id name
Where core-id is the numerical ID of your core.
So lots of questions, I’ll try not to miss any:
why isn’t my core connecting?
Your local server probably doesn’t have a internet addressable static IP, instead it’s probably something like a 192., or a 10., etc. Make sure your core and server are on the same range of IPs, and can see eachother.
make sure you set that ip when you copied the key to your core, and make sure you used the public pem key file from your server. The command should be something like
spark keys server default.pub.pem mine if you’re running the command from your server and only have one IP address.
Keep in mind without a static IP, your server IP address might also change day to day, so you might want to make it static, or use a Dynamic Dns service of some kind.
Also make sure the server program is still running
uploading to core
- you can flash a bin file just as you normally would, with the exception that the CLI can’t compile for you when they’re pointing at your local server just yet. So this shouldn’t have any impact on whether or not your core can connect.
what is the deal with spark-protocol?
the spark-protocol module is used by spark-server like a normal NPM module. It hosts the connection to the core, and deals with all the non-API type stuff. Since both the modules are released, you don’t have to link it in separately, just try these installation steps, instead of cloning in the spark-protocol module. The important thing is that you make sure you have installed the dependencies needed by spark-protocol.
git clone firstname.lastname@example.org:spark/spark-server.git
If you do clone it separately, just do an npm install from that directory, e.g:
git clone email@example.com:spark/spark-server.git
git clone firstname.lastname@example.org:spark/spark-protocol.git
npm install ../../spark-protocol/js
Ok it seems that I made everything right, but I could not get it to work.
My ddclient works so dynamic dns is not the problem.
@yasin, the core “alias” was setup, I waited for 10-15 minutes. First time I got the core working and I can see the LED blinking. But second time onward it is not connecting the same issue. Tried 5-6 times.
I will try tomorrow again and will update here.
gentmat$ spark keys save ff7207553515324***
Apparently I didn’t find a DFU device? util said
Error saving key… no dfu device found.
I am sure that the core is in DFU mode and its blinking yellow . Any idea why this is not saving guys ?
Fixed seems i missed to install dfu-util so i ll keep the answer in case someone stuck there.
brew install dfu-util