Comments (11)
It sounds like you ran these two steps:
particle keys server ..\spark-server\default_key.pub.pem IP_ADDRESS
particle keys doctor your_core_id
When you weren't using the correct config. -- particle config profile_name
If that isn't the case, you didn't run this step correctly:
particle config profile_name apiUrl "http://DOMAIN_OR_IP"
from spark-server.
I ran:
particle config local apiUrl "http://10.10.10.10:8080"
particle config local
particle keys new
particle keys server device.pub.pem 10.10.10.10
particle keys doctor your_core_id
I'm pretty sure the config was pointed over to the local server because I could see it getting the other calls like GET /v1/devices and POST /v1/device_claims. It looks like the photon is trying to connect but gets the same handshake error every few seconds (this is also when the photon flashes red momentarily).
Handshake failed: error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error { cache_key: '_93', deviceID: null, ip: '::ffff:10.10.10.117' }
1 : Core disconnected: Error: error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error { cache_key: '_93', deviceID: '', duration: undefined }
Connection from: ::ffff:10.10.10.117 - Connection ID: 93
from spark-server.
Ok, you don't need to run particle keys new
. That will generate a new key for the device but it is not the server's key.
When the server starts up for the first time, it generates some server keys in ~/src/data/default_key.pub.der
. That's the key you need to use when setting up your devices.
from spark-server.
Ah, OK, thanks! I had looked around for the key but for some reason didn't see that before :)
So I did the above with the proper keys and got this error when attempting to connect the photon to the local server (particle setup
). As well, the photon is now fast flashing cyan with 3 amber flashes every 20 seconds or so.
::ffff:10.10.10.10 - - [30/Jan/2017:05:44:03 +0000] "POST /v1/device_claims HTTP/1.1" 200 122 "-" "-"
uncaughtException { message: 'this is not a typed array.',
stack: 'TypeError: this is not a typed array.\n at Function.from (native)\n at ChunkingStream._this._transform (C:\node\spark-server\node_modules\spark-protocol\dist\lib\ChunkingStream.js:139:27)\n at ChunkingStream.Transfor
m._read (_stream_transform.js:167:10)\n at ChunkingStream.Transform._write (_stream_transform.js:155:12)\n at doWrite (_stream_writable.js:292:12)\n at writeOrBuffer (_stream_writable.js:278:5)\n at ChunkingStream.Writable.write (
_stream_writable.js:207:11)\n at Socket.ondata (_stream_readable.js:528:20)\n at emitOne (events.js:77:13)\n at Socket.emit (events.js:169:7)\n at readableAddChunk (_stream_readable.js:146:16)\n at Socket.Readable.push (_stream
_readable.js:110:10)\n at TCP.onread (net.js:523:20)' }
from spark-server.
If you follow the instructions in the readme, you don't need to run particle setup
. The device should have already been claimed when you run particle keys doctor device_id
.
@AntonPuko - you have any idea about why it isn't being reclaimed?
from spark-server.
@Snazzypants - did you get this resolved or are you still having issues?
from spark-server.
Thanks for following up - I'm still having the same issue. I tried updating spark-server and spark-protocol (since I saw that that referenced in the error message) but no change.
PS. The error that I pasted in the last message (also copied below) is the same as what I get after sending particle keys doctor device_id
.
::ffff:10.10.10.10 - - [31/Jan/2017:23:45:28 +0000] "POST /v1/provisioning/[devid]HTTP/1.1" 200 128 "-" "-"
uncaughtException { message: 'this is not a typed array.',
stack: 'TypeError: this is not a typed array.\n at Function.from (native)\n at ChunkingStream._this._transform (C:\node\spark-server\node_modules\spark-protocol\dist\lib\ChunkingStream.js:139:27)\n at ChunkingStream.Transfor
m._read (_stream_transform.js:167:10)\n at ChunkingStream.Transform._write (_stream_transform.js:155:12)\n at doWrite (_stream_writable.js:292:12)\n at writeOrBuffer (_stream_writable.js:278:5)\n at ChunkingStream.Writable.write (
_stream_writable.js:207:11)\n at Socket.ondata (_stream_readable.js:528:20)\n at emitOne (events.js:77:13)\n at Socket.emit (events.js:169:7)\n at readableAddChunk (_stream_readable.js:146:16)\n at Socket.Readable.push (_stream
_readable.js:110:10)\n at TCP.onread (net.js:523:20)' }
from spark-server.
@Snazzypants could you tell please: Os, node version and version of system firmware on your photon ?
from spark-server.
Hey @Snazzypants - turns out it was happening because we were using a newer version of Node APIs. @AntonPuko switched to use older APIs so you should be good as long as you pull again.
from spark-server.
Thanks! All seems well now (I'm still not completely sure what I'm doing or what to expect but my photon is now 'breathing' cyan as expected).
from spark-server.
Yeah, I think you should be good to go. Thanks for being a guinea pig :)
from spark-server.
Related Issues (20)
- Error on spark-server update-firmware HOT 4
- Response timeout for event: spark-server/call_device_function HOT 5
- ERROR: DeviceServer.js for local server HOT 2
- firmware device counter increases with failed flash attempts HOT 2
- Cannot upload device IDs with non-numeric characters
- Hook for device status change? HOT 3
- Is there a way to pass the contents of the publish event directly to MQ? HOT 7
- Memory Leak
- update-firmware requests failing HOT 3
- support for mesh devices HOT 1
- Function call returns error when firmware function returns zero HOT 6
- Electron session end after every 30 seconds HOT 5
- Throws error on starting spark-server HOT 1
- device names not accepted as deviceId - breaks particle-cli HOT 15
- Device.js/14528 on hostName: Device disconnected (cache_key=_5, deviceID=deviceid, duration=46.791, disconnectCounter=1) HOT 1
- Error with handshake process HOT 32
- Claiming / provisioning a devices without an deviceID HOT 5
- Does this still work? HOT 15
- Is there a renamed implementation of Particle.subscribe(particle/device/name); ? HOT 5
- P2 compatibility? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-server.