particle-iot / spark-server

UNMAINTAINED - An API compatible open source server for interacting with devices speaking the spark-protocol
https://www.particle.io/
GNU Affero General Public License v3.0
441 stars 136 forks source link

looking for core pub.pem in wrong location #6

Closed kennethlimcp closed 10 years ago

kennethlimcp commented 10 years ago
Expected to find public key for core 48ff6a065067555008342387 at /Volumes/dd/github/spark-server/js/node_modules/spark-protocol/data/48ff6a065067555008342387.pub.pem
1: Core disconnected: Handshake did not complete in 120 seconds { coreID: '48ff6a065067555008342387', cache_key: undefined }
Session ended for 4
Handshake failed:  Handshake did not complete in 120 seconds { ip: '172.16.10.240',
  cache_key: undefined,
  coreID: '48ff6a065067555008342387' }
1: Core disconnected: Handshake did not complete in 120 seconds { coreID: '48ff6a065067555008342387', cache_key: undefined }
Session ended for 4
Handshake failed:  Handshake did not complete in 120 seconds { ip: '172.16.10.240',
  cache_key: undefined,
  coreID: '48ff6a065067555008342387' }
Connection from: 172.16.10.240, connId: 5
Expected to find public key for core 48ff6a065067555008342387 at /Volumes/dd/github/spark-server/js/node_modules/spark-protocol/data/48ff6a065067555008342387.pub.pem
dmiddlecamp commented 10 years ago

Hmm, that setting should be getting overwritten by the settings.js file property 'coreKeysDir'

what command are you running in which directory? -- are you running the protocol module separately?

kennethlimcp commented 10 years ago

Nope. I just fire up with node main.js and see the core connect

kennethlimcp commented 10 years ago

@dmiddlecamp,

I just copied to where the spark-server is looking for now and got this:

Connection from: 172.16.10.240, connId: 16
on ready { coreID: '48ff6a065067555008342387',
  ip: '172.16.10.240',
  product_id: 0,
  firmware_version: 6,
  cache_key: undefined }
Core online!

I'm getting PANIC SOS code for now and unable to perform spark list

  1. We need to fix the path where the pub.pem i checked for. I think spark-server installs spark-protocol as a node_modules currently which ends up in the spark-server/js/node_modules/spark-protocol
kennethlimcp commented 10 years ago

fixed with spark-protocol commmit ec4971a4f80d564cb31a643f9001a376eec2186