-
@Simon Espruino on ESP8266 is a port. It works very well, but it's not an official board, so it's not a security hole in Espruino as such.
Reflashing over wifi on that port would depend on many factors, but it wouldn't normally give up control of your device.
Wifi settings and program memory persist post-flash. A failed flashing attempt reverts to good binary stored on flash AFAIK.
Whether your stuff works after someone in the know and with access to board successfully flashes your ESP8266 is another matter. A successful flash 'could' leave saved code orphaned if the new Espruino version is different.
Maybe of interest, and you reminded me - the ability to flash over Wifi is disabled on ESP8266-01 - it does not have enough space to keep the good copy should flashing fail. What I don't know is whether flashing the 01 bin to 4Mb board like ESP8266-12 or NodeMCU (because you can) would give you pin availability but disable Wifi Flash.
I have wondered myself, but never asked.
-
-
On a puck itself, this. You will need latest firmware - http://forum.espruino.com/conversations/298877/#comment13422997
-
Web Bluetooth gateway
Control multiple pucks in console mode, relay a master's instructions to connected slaves and I've just got MQTT subscriptions working over websocket - control puck via topic subscribed to over MQTT.
https://github.com/olliephillips/webbleMQ
It's a bit like an Espruino Hub but in the browser, not on a Pi.
More planned with MQTT, including publishing and subscribing to each other in a master/slave fashion and an announced mode - an MQTT topic that lists listening pucks so we can control(hack) each other's
Not especially practical I guess, but the web bluetooth connections persist with browser in background, and I seem to think when computer sleeps, so maybe a bit useful.
Please note it's not secure. Although the WS connection is WSS the topics are on a public eclipse MQTT server. While the topic is fair contrived - someone would be hard pressed to guess it - it's obscurity only.
-
See other thread I responded on. If you're using tinyMQTT from here : https://github.com/olliephillips/tinyMQTT, that's all I have :)
-
-
@Ickis There is this module also: https://github.com/olliephillips/tinyMQTT. You may experience the same issues, but worth a shot. Note the API is slightly different but it's on the README
-
-
There's a bit of code required to toggle an LED. The LEDx.set/reset functions help (which I'd not used before getting a Puck - were they available before?), but it struck me that a
LEDx.toggle()
abstraction would be really useful, in general, and especially when sending commands over BLE/between Pucks given the buffer limit.Is this feasible?
-
Thanks - I have had 5 pucks connected. That's all I have so can't test 6 or 7.
Anyway, this is what I have so far if interested - basically a gateway using Web Bluetooth. I started from @François's boiler plate.
https://olliephillips.github.io/webbleMQ/
I plan to attempt to add the HTTP proxy and MQTT gateway but I think that's likely to need a server backend to be reliable. But I am out of time for now - unfortunately work beckons - but I will come back to this. Lots of potential!
Edit: README with some info on what it does https://github.com/olliephillips/webbleMQ
-
-
What is the limit to the number of connections over web bluetooth - is it hardware dependent?
And could the connection dialog that pops up allow selection of multiple devices. Say I am connecting 3 pucks, it would be good to select them all and leave the browser to iterrate through the connections, rather than have to go back to the dialog three times.
Just a thought after using the interface for a while now :)
-
-
Hi @Gordon. No it wasn't the puck.js library -I've had no problems with that, but I haven't tried to run multiple connected devices TBH or two way comms.
I was using the Web bluetooth API directly since I know nothing about it, and wanted to familiarise myself.
@François - i've just twigged that is your page - thanks! I'm afraid I don't have much of my code left to share, I was experimenting on a saturday afternoon so nothing under version control. The fact the boilerplate worked suggests it was me - promises are a bit new to me TBH. Should I be able to replicate it I will post code.
-
Solved both issues by starting again from this page which is very helpful boilerplate.
https://beaufortfrancois.github.io/sandbox/web-bluetooth/generator/
-
I see a bit of weirdness when connecting multiple devices via web bluetooth.
Connect first device, read RX to console. Connect second read RX to console, first devices stops being read - nothing in from it in console. Connect first device again. Both devices now show their RX in console.
I can repeat this. Anyone else?
Edit:
Can also ask about how people are differentiating the device responsible for the UART RX in their web bluetooth applications. I'm setting up two objects, but seeing RX from two devices associated with last connected device.
I'd like to be able to identify which device is sending what.
-
-
For your use case the magnetometer might be sufficient, given how it is to be worn..
Between set times (so not triggered by sleeping) if there was not much movement from magnetometer that would suggest wearer immobile. So this would pick up people who had fallen, but also those who who were incapacitated for other reasons - asleep, sick, laid up in bed etc etc.
Just a thought.
-
-
-
@CanyonCasa no, VS Code is the cut down editor, which I think is very good in general, I sometimes use it with a serial application that watches the file and loads it - like what Espruino tools does.
-
-
-
It's not your code anyway. Just turned it off.
Temp is 23.125°C : 9635 Temp is 23.125°C : 9636 Temp is 23.125°C : 9637 Temp is 23.125°C : 9638 Temp is 23.125°C : 9639 Temp is 23.125°C : 9640 Temp is 23.125°C : 9641 Temp is 23.125°C : 9642 Temp is 23.125°C : 9643 Temp is 23.125°C : 9644 Temp is 23.0625°C : 9645 Temp is 23.125°C : 9646 >reset()
Thanks for this. So Android Bluetooth capped at 7 connections, by design or otherwise.
I'm also interested in other hardware/stack constraints too. While it would be relatively simple to detect device and act on limits in a web app - we'd need to know what they are.
How can I find/monitor this?