-
I can try something if you like though
Thanks, but I wouldn't worry - it's older firmware so it'd be hard for me to track down here (it could already be fixed if it is an issue). Glad you found a way around it though!
In a way it'd be nice to have a way to easily check how full the output buffer was, but doing setTimeout after as @fanoush suggested is nice and easy :)
-
When the bt signal goes low or near lost, the espruino device reboots
So is it that problem? That sounds a lot more serious than just a delay to me...
I always had issues when code in setInterval run longer than the interval. Since the interpreter is single threaded it won't run the code again if it did not finish but maybe it runs again right after previous one ends not giving chance to any other code or idle loop to run?
It should work ok - it tries to rechedule as soon as possible, but only after processing inputs and running through other intervals I believe. I guess it's possible if the first interval adds a timeout/interval itself it might trigger a re-run which might cause the behaviour you're having?
-
Well, the function at https://github.com/espruino/Espruino/blob/8f3a9cb52/targets/esp32/jswrap_esp32.c#L246 uses
ESP32_Set_NVS_Status(ESP_NETWORK_BLE,enable);
So it seems it uses
nvs_open/nvs_set_u32
withbleStatus
- I don't think it's related to efuse? -
you will see it blinking slower if you make the signal worse.
Oh, ok - well that's expected I think. It's not really a crash.
What's happening is you're writing a bunch of data, but because the signal strength is bad it's not able to send all of that data quickly, so at some point you call
Bluetooth.println
and rather than lose data it waits patiently until enough other data has been sent that it can fit the text in the buffer.Put another way, if you did
Bluetooth.println
with 10,000 characters of data, you'd hope that you would receive all that data - even though it wouldn't fit in the output buffer and theBluetooth.println
function might take a while to complete. It's the same sort of thing.Probably using raw characteristics fixes it for you because if you try and write when too much data is backed up, it just throws an exception and carries on (rather than waiting)
-
-
What happens if you set
Puck.increaseMTU = false
before connection? It's possible that earlier Espruino builds had issues with the increased MTU?The Puck.js lib will try and increase the MTU if it sees that it receives data in chunks of more than 20 bytes (because it assumes that for that to happen the MTU must have increased) and it's possible that it causes problems?
It'd be well worth trying with a newer firmware though, as I know there were some instability issues that have been fixed - 2.14 is quite old now
-
Thanks - the PR looks great!
If you're working with the repository in your PC itself then you can use the
git mv apps/font_Korean apps/fontkorean
command - but I'm not sure what's available on the Github website I'm afraid.Generally I'm not too bothered about having extra commits showing in the repo - but I guess if there are a bunch of single "rename X to Y" commits it's not ideal. I'm not sure if you can do it at your side, but it's just a quick button press when I click merge, so I just did it anyway.
-
Thanks - I guess I'll have to try and find some time to look into it. There must be a way to use the IDF without rewriting the build system just for it - even if it's only to create a CMakeList and then call
idf.py
-
-
-
-
You'll need a nightly build of Gadgetbridge, but with that you can reply - I tested and got it working a few weeks ago. If the message received has
reply:true
set then you can reply to it - you can't do it for all of them. See 'notify' under https://www.espruino.com/Gadgetbridge#messages-from-bangle-js-to-phoneThere are keyboard apps already too - see https://banglejs.com/apps/?q=keyboard and 'read more'... so actually adding the ability to post a reply is only a few lines
-
-
-
Yes, I think you can do it fine on the Pico as you have TLS there? it's literally just MQTT but over TLS
https://www.espruino.com/Reference#tls
Not tried recently, but this should work:
var options = url.parse("localhost:1234"); options.key = atob("MIIJKQ ... OZs08C"); options.cert = atob("MIIFi ... Uf93rN+"); options.ca = atob("MIIFgDCC ... GosQML4sc="); var mqttoptions = { // ALL OPTIONAL - the defaults are below client_id : "random", // the client ID sent to MQTT - it's a good idea to define your own static one based on `getSerial()` keep_alive: 60, // keep alive time in seconds clean_session: true, username: "username", // default is undefined password: "password", // default is undefined protocol_name: "MQTT", // or MQIsdp, etc.. protocol_level: 4, // protocol level }; var mqtt = require("MQTT").create(null, mqttoptions); require("tls").connect(options, function(client) { mqtt.connect(client); } );
certs can now be in storage too.
If this works please can you let me know? It'd be nice to add to the MQTT page
-
-
Thanks - yes, this looks good, but it'd be nice if the filename followed the same style as the other font apps like
fontall
andfontext
- so justfontkorean
and notfont_Korean
? It'd be nice if the README included the same text about how to recreate the font too.Basically the more similar you can make all the apps (same filenames/etc) the easier it'll be to maintain/compare them for other users.
jclock
seems really neat - all I'd say is as you have screenshots there it'd be nice to add them to the metadata so they show up in the app loader and not just the readme: https://github.com/espruino/BangleApps?tab=readme-ov-file#screenshots -
-
Is this mainly for ESP32 usage? I can't imagine many other devices where this makes too much sense? Using external flash would be neat but you'd have to be able to supply external read/write functions too.
But I guess possibly it could be done, although right now none of the functions take an instance parameter so doing
require("storage", options)
is nontrivial. There is already code in there to handle two flash areas, and usage ofC:filename
to force where data is stored - I guess making the address of the second area configurable would be possible - but I wonder whether this would be any more useful than if it were just configured for and baked into the firmware? -
Great!
I'm in the process of getting the first 1500 of https://www.espruino.com/Jolt.js ready - I'll have to wait a little for the cases to be manufactured, but hopefully they'll be ready in a month or so.
After that we'll see how it goes - I have started selling the Espruino WiFi again for now (as the STM32 prices are down to sensible levels again) but I think probably a Pixl.js with WiFi (and maybe a motor driver again) will be coming, but probably not until the end of the year earliest
-
How would I disable the built-in Tensorflow module, if it becomes necessary?
You literally just have to comment out the
TENSORFLOW
line here: https://github.com/espruino/Espruino/blob/master/boards/BANGLEJS2.py#L40 -
-
-
When using the library with a real-world sample of 250 values (not just [1,2,3,4]), I seem to get a timeout problem ("Prompt not detected - upload failed")
Yes, that's just that it's taking a while to execute - and when you upload via the IDE it checks that after the upload completes the device responds within a certain time.
If you can upload the minified file (
discrete-wavelets.umd.min.js
) instead, that will run a bit faster... And looking at the code there it's quite simple and there are likely quite a few things you could do to get it running more efficiently (like telling Espruino to keep functions that get called often in RAM, and maybe even asking it to JIT compile some) if you do need the extra speed.
@bobrippling recently posted a really nice way to debug where a variable is written into an issue on GitHub and it struck me we don't have any good sources of tips for debugging issues with Espruino/Bangle.js
I created a Wiki page at https://github.com/espruino/BangleApps/wiki/Debugging-Tips
I've added a few things that come to mind for me when I'm debugging (as well as Bob's trick) - if you're doing any development work you might want to take a look!
If you've got any good tricks you use to debug issues with your code in Espruino yourself, please post them up!