Updating multiple Espruino devices #1918
Replies: 6 comments
-
Posted at 2023-01-18 by @fanoush As far as I know it always needs some physical access - holding button to get into update mode. It is on purpose so that someone else would not 'update' your device. Which specific device you mean? Most nrf52 based devices don't have space to download the update while running so you need to switch it to bootloader and overwrite existing version which is not failproof. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-18 by Zinke89 @fanoush I have a few MDBT42Q. Makes sense from a security perspective, although there are other security features like passkey, connectable: false, etc.. just seems like it would be a great application for remote updates, that boot loader mode is definitely the wrench in the plan. Also, not particularly taking about firmware updates, rather, what if I wanted to for example, extend or change functionality by writing more robust or feature rich Javascript and pushing it out to all of my devices. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-18 by @gfwilliams Do you mean updating the JS code on the devices, or updating the Espruino firmware itself? If it's the JS code then you can absolutely push firmware updates on connection - but it'd be up to your app to do it. There is an app for Bangle.js devices where you can supply some code and it will automatically connect to any Espruino device in range and program it: https://banglejs.com/apps/?id=espruinoprog But I'd recommend that you only use that when preparing for production - normally you'd have added some code to your device that would either disable the bluetooth UART functionality or would password protect it so someone else couldn't write to it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-18 by Zinke89 Thanks @gfwilliams that was definitely my initial question, so a stand-alone application would have to be responsible for connecting and pushing the updates. Makes sense, I was imagining a scenario where the onboard software, as long as it has a BLE connection to any phone, would be able to connect and pull the latest code, even if that meant some remote security feature. In my case, there is no app, it’s Bluetooth based with a bunch of neopixel functionality and just a connection to a phone/device for sound playback of music, etc.. in this case I figured, what if I wanted to adjust the neopixels to do something else. In this case I couldn’t do that without physical access to the device. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-18 by Zinke89 @gfwilliams as a concept, would it be possible to use something like Firebase via NPM package to establish real-time connection via the Javascript interface? In which case, technically could act on “real-time” updates, for example, pass a command to a function within the MDBT42Q, connected through BLE to light up an LED? Basically use Firebase or any teatime database as a command center. Can BLE share Internet with the host device? I would imagine so. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-19 by @gfwilliams
The issue is that the bluetooth spec doesn't provide any provision for internet access over Bluetooth LE. So any communications with the internet have to be via some special software on the phone.
If you run that on the phone, then yes absolutely. But as above, you can't do internet directly via BLE so it can't all be on the MDBT42Q. You can use 'Web Bluetooth' on the phone though (which is just a website) so there's no need for an app - and that could trivially use firebase/etc to fire commands off |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-01-17 by Zinke89
Is this possible or on a road map?
What if I have 50 devices which run on the same code, is there a possibility that live updates could be pushed in bulk to these devices when they’re connected to a host device, ie: phone? Or would you have to essentially flash each device individually with no possibility of future updates if it’s not in your possession?
Beta Was this translation helpful? Give feedback.
All reactions