Spark-CLI can't change Key to local server

Hi All,

I have set-up one of my Raspberry Pi’s as a Local Server and it’s running fine.

However I now want to get my Spark Cores to use this new server and following these instructions

However I can’t get passed step 5 changing the keys as I get the following error "Command Failed: ‘openssl’ is not recognised…

I have looked to install Open SSL but not sure how to do that.

On a separate note I have also looked at trying to install Spark-CLI on my RPi but can’t get that to work either. Basically I am trying to get my Cores to connect to a local cloud so I can play with the data without a web connection.

Ta for the help.

Cliff.

I presume you are performing the steps on a Windows machine?

You can follow the tutorial here: https://community.spark.io/t/tutorial-spark-cli-on-windows-01-oct-2014/3112

It should setup Spark-cli properly.

Just take note that you have to add OpenSSL to windows $PATH to use it globally

spark-cli installation is straightforward on Rpi as well.

1.) Install nodejs (sudo apt-get install nodejs)
2.) Install npm (sudo apt-get install npm)
3.) sudo npm install -g spark-cli

I think step 1 might fail on Rpi so see this: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js

@kennethlimcp Thanks I have Node.Js on the Rpi but fails to install the Spark-CLI.

I have added the OpenSSL to the Path and now see that the DFU-Util is missing so going to try and find how to install that and I may be in business.

1 Like

Ok have DFU-Util installed and now have it working but getting a message that says:

Please specify a server key in DER format.

I copied the .pub.pem file direct from my RPi server so it should work…

1 Like

You coped the default_key.pub.pem from the RPI to your own laptop?

Or are you trying to use Spark-cli on Rpi to do it?

I am using the Spark-CLI on my laptop (Windows) to connect to the core and the RPi is runnine the Local Spark-Server.

Sounds good! Was DFU-util working before on Windows?

If that’s the case the server key uploading should work well.

The command is:

spark keys server default_key.pub.pem IP_ADDRESS

@kennethlimcp Thanks I got it working but then some how bricked by Core and now can’t get it to connect to anything. It was working fine and connecting to the Local Cloud and I unplugged as I had other work to do and when I came back it would not connect to anything.

I get flashing Green then Blue then 3 red flashes and it repeats this cycle… Did a factory reset and all sorts but nothing so now using a spare core to get this project done… Hey ho all good fun.