Comments (20)
I think I know what the error is. Can you try specifying platformId
as '6'
? If that fixes it, I will fix the library.
from particle-api-js.
var fdPr = particle.flashDevice({
deviceId: deviceId,
platformId: '6',
files: {"temp.cpp": "./" + deviceId + ".cpp"},
auth: authToken
});
I tried it as both 6
and '6'
with the same error message resulting.
Edit: fixed spelling error and same error message.
from particle-api-js.
Are you using this from node
or the browser? I noticed you are using a relative file path too, so I would verify that is correct.
from particle-api-js.
I am doing this from node, and yes, the relative file path is correct.
--
Ethan McGee
Sent with Airmail
On March 21, 2016 at 2:15:33 PM, Bryce Kahle ([email protected]) wrote:
Are you using this from node or the browser? I noticed you are using a relative file path too, so I would verify that is correct.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
from particle-api-js.
Another note is that you can call only flashDevice
if you want, and it will compile and flash.
from particle-api-js.
I noticed that from the documentation on the main site. However, when I encountered the stream error with flashDevice
I wrapped it in a compile thinking maybe flashDevice
failed if there was a syntax error in the cpp.
from particle-api-js.
I've definitely tested this from node and had success. Can you try using the absolute file path?
from particle-api-js.
Oh, is compileCode
succeeding but flashDevice
is failing?
from particle-api-js.
Yes,
That is the issue that I am experiencing. Compile works correctly, flash throws the streams error.
--
Ethan McGee
Sent with Airmail
On March 21, 2016 at 2:26:14 PM, Bryce Kahle ([email protected]) wrote:
Oh, is compileCode succeeding but flashDevice is failing?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
from particle-api-js.
Got it. I know the issue. New release forthcoming.
from particle-api-js.
Thank you much. Please let me know when to pull.
from particle-api-js.
5.2.4
just published
from particle-api-js.
Also, as an aside.
The documentation on docs.particle.io hasn't been updated to reflect changes to the JS API. It states that compile and flash both take a list of files rather than an object. Anyone that does some poking can find the discrepancy, just an FYI.
from particle-api-js.
Thanks for the heads up on that.
from particle-api-js.
Does flash device queue the binary until the device turns on? The API call returns true even though my device is definitely off.
from particle-api-js.
Not at the moment. Are you using a Photon or Electron?
from particle-api-js.
Photon.
from particle-api-js.
Should I continue passing the platformId of 6?
from particle-api-js.
For flashDevice
it is not needed because you are passing the deviceId
.
from particle-api-js.
Okay, well in any case, flashDevice
returning true even when the device is off is not problematic to my use case. It just wasn't what I expected.
Thanks for your assistance.
from particle-api-js.
Related Issues (20)
- Uncaught Error: only one instance of babel-polyfill is allowed HOT 1
- Create Typescript compatible version of API HOT 1
- downloadFirmwareBinary and downloadProductFirmware don't check this.prefix HOT 1
- downloadFirmwareBinary and downloadProductFirmware need tests
- listProductFirmware returns "response" instead of parsed response HOT 1
- uploadProductFirmware only tests with Buffer, and doesn't test with filename HOT 1
- Particle.CallFunction Not Working HOT 3
- loginAsClientOwner only uses default token duration
- particle-api-js ^9.1.0 not working with Svelte ^3.37.0
- 429 error is not properly converted to an object
- Unsupported engine warning, even when node + npm versions meet requirement HOT 1
- EBADENGINE Error because of wrong Version of rpm?
- addDeviceToProduct doesn't appear to reject on error? HOT 1
- Possible issue with activateSIM with products
- Version 7.1.0 not published to npm HOT 2
- How to detect by code the moment of WIFi deconnection?
- Update coveralls when new version is released
- Add tests for EventStream
- Drop Support for Node v4 HOT 1
- `EventStream` doesn't handle dropped connections HOT 7
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 particle-api-js.