self-propagating code #2121
Replies: 12 comments
-
Posted at 2016-12-17 by trezm Still can't figure out why my own example doesn't work when I change some bits, but just a note that line 43 should read
as |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-17 by ChristianW Thanks @trezm for pointing out. Just changed that bit. One think I'd like to improve is checking some version number before updating a remote. But without reading the response (not possible to receive notifications yet) this is tricky.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-17 by stevie4711 Hi @christianw, one idea would be to advertise the installed version number. So when scanning, the sender would skip the pucks which have the same or a higher version number. That's not completely fool proof, when two pucks are sending at the same time with different versions, the older version could in theory win. But it's better than nothing... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-17 by stevie4711 BTW: This is a seriously cool method to program many Pucks automatically! Very useful |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-18 by JamesS Cool. I like it. Will recruit all nearby pucks:-)
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-28 by user73560 Hi Gordon, How can I get the optimized js code which is deployed on the Puck ? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-28 by @gfwilliams You might be able to get it as a string by looking in the 'console' under settings... However if you install the command-line tools https://www.npmjs.com/package/espruino you can use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-28 by user73560 Thank you Gordon. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-03-31 by user73560 Hi @gfwilliams, Along with self-propagating code is it possible to do a firmware update if needed, avoiding user interaction ? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-04-01 by @gfwilliams You need to have physical access to the Puck to put it in to bootloader mode - to do the steps shown here: http://www.espruino.com/Puck.js#firmware-updates It's a security thing - by default I leave the Pucks open to make it easy for developers to get started, but allowing anybody to remotely change the interpreter software would be a recipe for disaster. The bootloader is protected by a key, but because Espruino is Open Source and people want to be able to use their own firmware the key is public - so anybody can write whatever they want onto their Pucks. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-04-02 by user73560 Hi @gfwilliams, Please advice how to update the firmware to a fairly huge number of pucks without manual interaction, may be puck password protection is enough for such mode ? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-04-03 by @gfwilliams Do you want to update Puck's interpreter firmware, or your JavaScript firmware? You won't be able to fully update the interpreter firmware without any manual interaction - it'd be a massive security risk. I think it would be possible to remotely send JS code that would totally reset a Puck.js device, and then all someone would have to do is hold the button down while the device reset. It could look like this:
However if you want a lot of new ones pre-programmed then you could get in touch and if there were enough I could arrange that they were shipped out to you. Either that or potentially I could come up with a pogo-pin programmer for you so you'd peel off the silicone top, hold it onto the Puck for ~20 seconds and it'd be programmed. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by ChristianW
So this is it.
Thanks to a few hints from @gfwilliams my first self-propagating Puck.js code
(Kind of worm if you like)
Feedback and improvements welcome.
Output for 4 Pucks:
Beta Was this translation helpful? Give feedback.
All reactions