Hi,
P.S. I’ve posted this question here and so far I didn’t get any help. Hence, I’m posting this under the General category hoping to get some help.
I’m trying to setup the spark cloud on my google cloud compute. I’ve been following this tutorial to setup the local cloud. I’m having problems getting the local cloud to work on my google cloud environment. Here is what I’ve tried so far:
I nearly got it worked but stuck at this error:
Your server IP address is: 10.x.x.x
server started { host: 'localhost', port: 5683 }
42.x.x.x - - [Wed, 01 Apr 2015 02:46:56 GMT] "POST /v1/provisioning/53xxxxxxxxxxxxxxxxx HTTP/1.1" 400 109 "-" "-"
Here is what I’ve tried on my Google cloud server so far:
$ mkdir spark-core
$ cd spark-core
$ wget https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q2-update/+download/gcc-arm-none-eabi-4_8-2014q2-20140609-linux.tar.bz2
$ tar xvjpf gcc-arm-none-eabi-4_8-2014q2-20140609-linux.tar.bz2
$ export PATH=$PATH:$HOME/src/spark-core/gcc-arm-none-eabi-4_8-2014q2/bin
$ git clone https://github.com/spark/core-firmware.git
$ git clone https://github.com/spark/core-common-lib.git
$ git clone https://github.com/spark/core-communication-lib.git
$ git clone https://github.com/spark/spark-server.git
$ npm install -g spark-cli (need either root or sudo)
$ cd spark-server
$ npm install
$ node main.js
On my local PC with dfu-util installed, here is the following done on my PC:
$ git clone https://github.com/spark/spark-server.git
$cd spark-server
$node main.js
While my local server (on my PC) is running I then did the following on a new terminal window:
$ spark config googleCloud apiUrl http://mydomainname.com:8080
$ spark config googleCloud
$ cd spark-server
$ spark keys server default_key.pub.pem mydomainname.com
I then did this on my local server (PC with DFU-UTIL):
$cd core_keys
$sudo spark keys doctor 53fxxxxxxxxxxxxxxxxxxx
I end up with the following error message when I try to upload the keys on the spark (Spark is in DFU mode). The below DFU message was too long. I am just pasting the error message portion of it.
File downloaded successfully
Transitioning to dfuMANIFEST state
Error during download get_status
Saved!
attempting to add a new public key for core 53xxxxxxxxxxxxxxxx
*********************************
Please login - it appears your access_token may have expired
*********************************
submitPublicKey got error: invalid_grant
Make sure your core is in DFU mode (blinking yellow), and that your computer is online.
Error - invalid_grant
On my google cloud server, I got the following error:
Your server IP address is: 10.x.x.x
server started { host: 'localhost', port: 5683 }
42.x.x.x - - [Wed, 01 Apr 2015 02:46:56 GMT] "POST /v1/provisioning/53xxxxxxxxxxxxxxxxx HTTP/1.1" 400 109 "-" "-"
What am I doing wrong? Any help would be highly appreciated.