Comments (20)
@dmiddlecamp @emilyrose what testing have we done with the Photon on spark-server
? Can we confirm what is known to work?
from spark-server.
I'm not aware of any specific photon testing so far on the local server, but we should expect all normal protocol bits to work. The photon more or less doesn't get any special accommodations server side except we skip requesting the describe payload before auto-update (which the local server doesn't do.)
from spark-server.
@kennethlimcp I'm guessing you've played with this - have you tried the Photon with spark-server
? Any reports?
from spark-server.
I have not personally done any testing with spark-server yet, but am happy to when we decide to give it priority!
from spark-server.
@zsup i haven't done anything with Photon + spark-server but i can try things out :)
from spark-server.
@kennethlimcp would love your help if you've got a sec to play with it!
from spark-server.
Just tested and the handshake failed with:
Handshake failed: plaintext was the wrong size: 214 { ip: '192.168.2.6', cache_key: '_4', coreID: null }
from spark-server.
Ah sure, that's a quick fix, thanks!
Sent from my iPhone
On May 30, 2015, at 9:39 AM, Kenneth Lim [email protected] wrote:
Just tested and the handshake failed with:
Handshake failed: plaintext was the wrong size: 214 { ip: '192.168.2.6', cache_key: '_4', coreID: null }
—
Reply to this email directly or view it on GitHub.
from spark-server.
I override the check here: https://github.com/spark/spark-protocol/blob/master/js/lib/Handshake.js#L343
and the photon went online.
Tested OTA which did not work. I think we need to wait for more tests to be done but for now i think the cloud functions should work (never tested)
from spark-server.
@kennethlimcp @emilyrose
Hi, I was testing the Photon with the local cloud and everything but the OTA works (server interruptions correctly managed, events, calls, keys, etc.).
How to reproduce the issue:
$ particle list
XXXXXXX [3a00300003XXXXXXXXXXXXXX] is online
Functions:
int function1(String args)
int function2(String args)
$ particle flash 3a00300003XXXXXXXXXXXXXX tinker.bin
Including:
tinker.bin
attempting to flash firmware to your device 3a00300003XXXXXXXXXXXXXX
flash device said {"id":"3a00300003XXXXXXXXXXXXXX","status":"Update started"}
$ particle list
XXXXXXX [3a00300003XXXXXXXXXXXXXX] is online
Functions:
int function1(String args)
int function2(String args)
After this call the LED changed to a fixed magenta color during aprox. 1s and then the photon was restarted (LED in white, then green, cyan, etc.). So it didn't start blinking in magenta as when the firmware is really being flashed.
Do you have any timelines for a new spark-server release that support the OTA updates with the Photon?, or is there any workaround that could be applied to the spark-firmware (develop 0.4.3) or to the spark-server code to support OTA upgrades in the local cloud?
Thanks!.
from spark-server.
Hi again.
I have discovered that the fixed magenta color during aprox. 1s observed during the failing OTA update is similar to when the module manually enters in Ymodem mode by changing the USB device baudrate to 28800.
I don't know if this comment helps or not... I'm just trying to understand why is the OTA update not currently working with the Photon in the local ☁️ 😞
from spark-server.
I can't get the photon to work at all locally.. after commenting out the handshake check and then running key doctor (and placing the pub file in the right place):
After loading a key unto my photon:
CryptoStream transform error TypeError: Cannot read property 'length' of null
CryptoStream transform error TypeError: Cannot read property 'length' of null
on ready { coreID: '370029000747343232363230',
ip: '::ffff:44.44.92.215',
product_id: 6,
firmware_version: 65535,
cache_key: '_0' }
Core online!
CryptoStream transform error TypeError: Cannot read property 'length' of null
CryptoStream transform error TypeError: Cannot read property 'length' of null
Coap Error: Error: Invalid CoAP version. Expected 1, got: 2
routeMessage got a NULL coap message { coreID: '370029000747343232363230' }
CryptoStream transform error TypeError: Cannot read property 'length' of null
Coap Error: Error: Invalid CoAP version. Expected 1, got: 3
routeMessage got a NULL coap message { coreID: '370029000747343232363230' }
CryptoStream transform error Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
Coap Error: Error: Unknown message code: 254
routeMessage got a NULL coap message { coreID: '370029000747343232363230' }
It sorta looks like it saved? There is an error at the bottom but dfu did write /something/:
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000022, size = 608
Download [=========================] 100% 608 bytes
Download done.
File downloaded successfully
Error during download get_status
Error saving key to device...
from spark-server.
Hey @lrburton
try this starting from the latest 0.4.3 develop firmware source code.
from spark-server.
@javier-rodas unless I'm missing something that's for local flashing -- I'm having issues connecting the photon to the local spark-server instance. The photon is running 0.4.3 fwiw.
from spark-server.
@lrburton just make sure to update both the modules and the main firmware before trying to connect to your local ☁️ as explained in the link I gave you.
I would start trying only with the first step (with modules -> program-dfu, which rewrites 2 module firmware parts plus the default tinker app), and then I would try connecting to the global Particle ☁️
Then I would just update the public key and static IP of the local ☁️ in the Photon using:
$ particle keys server default_key.pub.pem 192.168.0.X
where default_key.pub.pem
is your local ☁️ public key. You can find it in your spark-server directory.
If you want to reverse the public key and use again the global Particle ☁️ you should use the der file that can be downloaded from here and update it without giving any IP address to this command:
$ particle keys server cloud_public.der
Finally I would try with the second step (compiling from the main directory -> program-dfu), to write my own custom app in the Photon.
from spark-server.
I've got part1/part2/tinkervlatest of the 0.4.3 update on my 2 photons and they work fine with the public cloud. I reverted the one I had pointed at my local cloud with:
particle keys server cloud_public.der
particle config spark
particle cloud login
particle keys send 370029000747343232363230 370029000747343232363230_new.pub.pem
And it seems to work just fine on the public cloud -- the local server was throwing errors but the photon did breath cyan some of the time when connected to the local server.
Attempting to move it back to my private cloud:
particle keys server spark-server\default_key.pub.pem 44.44.92.3
particle config local apiUrl http://44.44.92.3:8080
particle keys send 370029000747343232363230 370029000747343232363230_new.pub.pem
results in the errors I saw above (but with the photon breathing cyan except ever few seconds when it reconnects) after commenting out the check @ https://github.com/spark/spark-protocol/blob/827ded3f20d43fa0ffe2e092a2316998c8b4812d/js/lib/Handshake.js#L343
Unlike particle keys doctor (in my first post) all of the commands above completed entirely successfully according to their output.
Are you using a different version of spark-server / spark-protocol? Or do you see something wrong with the above?
Thanks,
Lee
from spark-server.
@lrburton In which operating system are you testing this? And, have you correctly installed all the dependences as commented in the README files of the spark-server, particle-cli and spark-firmware?
Please review that, because in your log I see some problems related to the CoAP version:
CryptoStream transform error TypeError: Cannot read property 'length' of null
Coap Error: Error: Invalid CoAP version. Expected 1, got: 2
from spark-server.
Hi All,
The photon firmware behaves slightly differently during the handshake, I'll be submitting a pull-request to the spark-protocol project hopefully today that should resolve the handshake errors you're seeing.
Thanks!
David
from spark-server.
@javier-rodas Windows... I ran npm install as per the instructions in spark-server readme .. I don't have repo locally for spark-firmware but also ran npm to install particle-cli. Are the other dependencies I'm missing? Readme/Install don't say to have anything additionally..
from spark-server.
I'd like to close out the photon / local cloud issues if possible. I've tested this recently and the photon seems to be working as expected. Can someone who was having this issue confirm it's fixed or still a problem?
Thanks!
David
from spark-server.
Related Issues (20)
- OTA firmware update for Photons not working HOT 15
- Photons subscribed to SSEs do not return data HOT 1
- Subscribing to SSE using prefix filter does not work
- Installing dependencies fails HOT 3
- photon not works with the spark-server HOT 1
- Recommended Node.js version HOT 9
- Suggestion: safe mode healing / fleet management HOT 2
- SparkServer in production HOT 3
- Invalid CoAP version HOT 2
- Every time after "particle keys doctor core_id", "particle list" have no device which just added.
- Error: Invalid CoAP version HOT 5
- Not compatible with 0.5.x firmware HOT 1
- Subscribe does not work HOT 2
- device list is not udpated after addition of new Photon
- 0.6.0-rc.2 firmware no longer able to connect to spark-server HOT 8
- What are the features that are present only on the Particle cloud ? HOT 2
- How does this compare to the cloud server?
- Give this Repo some love :)
- Date Time format for DateTime Field HOT 1
- Photon handshake decryption error
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.