-
• #2
Hi, what about section
Firmware Updates
on page http://www.espruino.com/Puck.js ? -
• #3
@MaBe , I do not see any instructions for how to make the firmware update using serial cable there.
I do see "via nRF Toolbox App (Android & iOS)" there, which I understand to mean by Bluetooth, and also I see "via nRF Connect App (Android)", which I understand to be via Bluetooth also.
Look at section 5.5.4. on page 25 in http://infocenter.nordicsemi.com/pdf/nRF6930_Beacon_Ref_Design_UG_v1.1.pdf , this is NordicSemi's dev toolkit. That one has a separate set of "Programming Interface" "SWD" PIN:s.
They seem to have published some notes on how to program it by cable at https://devzone.nordicsemi.com/question/20473/loading-ble_app_beacon-to-smart-beacon-kit/ .
However I can't correlate this with the Puck.JS .
There was some Puck.JS page where I read that it can be updated via UART/TTY but I can't remember where.
Your pointers to understand how to reflash the Puck.JS from scratch by some kind of cable would be most appreciated!
By the way, as a secondary question, the ordinary updating via Bluetooth, is that really an overwrite of the whole used flash memory? If so I guess the actual Espruino system firmware only occupies a minor portion of the flash, so the second copy of the firmware is transfered over Bluetooth, is integrity-checked by flash memory, and then overwrites the original installation - and failure during that process would.. brick the Puck.JS?
-
• #4
Hm, over serial cable, sorry not as far as I know.
-
• #5
OTA - that's a key point of puck: update Over The Air.
Some more details you can also find in most recent release information: Espruino 1v94 released!, item 3: press and hold button on boot until after the 5 flashes of the red LED will clear all flash... (boot means de-power/re-power: take battery out and put it back in).
-
• #6
@allObjects , wow that sucks - the air is not safe. The air is fine for your program to interact with, but pulling the software from the air is not safe.
-
• #7
Now: Is there some way to flash by cable?
-
• #8
So regarding how to flash via cable, all my questions above prevail currently.
-
• #9
...creativity never sucked... otherwise we would not have this communication... because I'm not sure if the person of post #6 and #7 are the same... and you would have to go to a trustworthy place and cable connect your phone for an update... I though get your concern. Device ID and (asymmetric - public/private) encryption could help here, and Espruino includes encryption... Microchip has I2c connectable secure devices - using same protocol as serial memory - that can help with that.
Since your requirement is not OTA, which I assume means: I can touch my device at the update attempt/event, you can 'enter a code' to accept update request on your puck - for example, sequences of short/long presses of the built in button like Morse Code - that only you know as told by the updating device/apparatus/mechanism. The code is randomly generated by the the updating device/apparatus/mechanism, displayed to you, entered on the puck by you and communicated from puck back to the updating device/apparatus/mechanism while in connected mode. This is about as safe it can get and and the implementation of near absolute authentication concept (you may need to go into a Faraday's cage to really really really make sure that no one close by will jump in after authentication with overpowering RF and take the update process from there...).
I'll made a RFU to @Gordon to implement a secure feature in Web IDE and Puck to implement a version of above like this: update will not happen until such code is 'entered' on Puck, displayed in IDE, and confirmed by 'operator' in IDE. ...which makes the operator('s brain) the security/encryption device... (inspired by make-your-bluetooth-low-energy-iot-device-more-secure).
-
• #11
@user81549, see this post.
Espruino Puck has the BLE module's has SWIO and SWCK on pads. Most likely this is where wired programming takes place, and I could imagine this is the way Espruino bootloader is loaded for the very first time... When @Gordon will be back, I'm sure he will shed some light in this option.
-
• #12
Hi - to totally update the Espruino interpreter firmware via cable, you'll need to connect to the SWIO and SWCK pads as @allObjects says. You have to do that with a special SWD programmer (like the nRF52832DK) though - it can't be done with a normal USB TTL adaptor.
Having said that, if you just want to update your JS software and not the interpreter, you can easily do that with a wired connection using http://www.espruino.com/Puck.js#serial-console
If you're after Puck.js devices pre-flashed with a certain firmware then I can do that for you though - or potentially I could provide you with a flashing jig for Puck.js devices if you want one, but you'll still have to buy the nRF52832DK.
Hi!
Can you please explain how to flash the Puck.JS via a serial/TTL cable?
Namely:
Exactly which programmer USB/serial cable to you suggest me to buy to do this
How do I connect the programmer cable to the Puck.JS, can this be done reliably without soldering?
What software tools do I need to install on my Unix/Windows computer to do the flash?
Unlike other flashing methods, if the flashing fails,
Is there some requirement on in what state the Puck.JS should be, for it to be flashed - should it be turned off, or be newly turned on, etc.?
Since the Puck.JS is actually just a NordicSemi nRF52832 ARM board, the flashing is done on a low level and does not actually relate with any software that the ARM chip is running, right?
Flashing will overwrite the flash memory directly and may hence wreak havoc on a program running on the Puck.JS, if that program uses the flash memory too, right?
Can I flash the Puck.JS while it is turned off?
To activate the newly flashed software on the Puck.JS, I just start/restart it right?
The switch under the Puck.JS is a power switch, so I just flip it off/on quickly - no need to remove the battery right?
The programmer/flashing program, will just write an image to the Puck.JS' flash memory, right?
In what file format is the image that I write to the Puck.JS?
Thanks!!