I’m trying to connect my Photon to a local server on my Respberry Pi and I’m getting a “CryptoStream transform error”. I’ve seen other discussion regarding this problem, and I see on Github a “commit” that fixes the problem apparently posted yesterday.
CryptoStream error fix
So I am very new to all of this. I’ve never run a local server before. I’m not sure what a “commit” is. I’ve tried running
npm update in the spark-server directory and I still get the error. I’m not sure where to go from here.
How can I implement this fix?
Do you have
Yes, I do. Should I use git clone to redownload spark-server files and run npm-install again?
Nope, had to go in manually and edit CrytoStream.js to match the “commit”. Phew! Finally connected!!! Took me days of reading through various tutorials and learning way more about Linux than I wanted to know in order to make it happen. I really hope you guys make streamlining local server installation a priority for us not so sophisticated folks.
For anyone who happens to stumble across this and is looking for help getting a local server running on a raspberry pi, here’s a script I wrote to make it happen. Sprinkle
sudo reboot liberally throughout.
Load Raspbian Jesse
sudo apt-get update
sudo apt-get upgrade
sudo apt-get build-dep dfu-util
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install npm
npm config set prefix '~/.npm-global'
Open or create a ~/.profile file and add this line:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
npm install -g particle-cli
tar xvf dfu-util-0.7.tar.gz
sudo make install
git clone https://github.com/spark/spark-server.git
That will at least get the server running.