Espruino 2v09

Posted on
  • Another release that's been a long time coming, but with some big improvements!

    Bluetooth users specifically will likely really notice that connecting, uploading code and generally interacting with Espruino devices is a lot snappier than it was before!

    Bangle.js / Puck.js / Pixl.js / MDBT42Q

    • Update S132 Softdevice from 3.0.0 to 3.1.0
    • Increase MTU from 23 to 53. Doubles Bluetooth bandwidth!
    • Allow devices to remember the time between reboots (even if RTC is reset)
    • Use 'low accuracy' GPIOTE for watches so we can shut down the high speed oscillator
    • Add callback param to 'NRF.restart', allowing code to be called with softdevice disabled
    • Puck.js: Fix regression where IR LED was left on after transmission
    • Reset bluetooth advertising after load()/reset()
    • BLE: Allow 128-bit service data to be decoded


    • Increase advertising interval to ease connections
    • Make the 'home' button more configurable in code
    • Add Bangle.softOff to allow the RTC to keep running
    • Don't enter accelerometer power save mode if compass/barometer is in use
    • Add isXYZOn() functions for GPS/compass/etc
    • Apply g.drawImage fast paths even if image goes to the edge of the screen
    • StorageFile now uses 10x bigger chunks which reduces stress on Storage.list()
    • Storage.list now allows you to specifically request StorageFile, only ever reports first StorageFile chunk
    • When load(filename) is used, set global variable FILE to the filename (so FILE now reports app name)


    • Fix Espruino not sleeping when very low on free memory
    • Now use exponents when printing doubles >= 1E21 or < 1E-6
    • Regexp improvements
    • Util Timer now uses an based on estimated time from the hardware timer itself
    • Graphics.fillPoly now errors if >64 points (prev was 63)
    • Graphics: Support for palettes supplied in image strings
    • Fix Array.forEach when deleting the item you're currently iterating over
    • Graphics: Allow colors to be specified as '#rgb' strings
    • Graphics: Antialiased lines now read the background color so overlap nicely
    • Graphics: Add antialias/colour blending functions like fillPolyAA
    • Graphics: Fix overdraw when drawing ellipses/circles
    • Graphics: Fix 8 bit ArrayBuffer scroll not working correctly in some directions
    • Storage: Fix corruption issue with StorageFile write after a Storage compact
    • Fix invalid free / SIGFPE errors found using fuzzing
    • E.getSizeOf() and trace() now don't recurse into references back to the global scope (makes sizes and traces far more useful)
    • Fix issue parsing r=>print((e=>{})(r))
    • Add DHE RSA key exchange for TLS/HTTPS

    NOTE: If you're running 2v09 firmware and have a problem, please post your own thread on the forum - please don't reply on this announcement thread!

  • Increase MTU from 23 to 53. Doubles Bluetooth bandwidth!

    Only for that I will upgrade all my devices !

    Thanks a lot for all those improvements!

  • Thanks! The MTU increase is entirely @fanoush's work though, so he deserves all the credit for that!

  • Only for that I will upgrade all my devices !

    also it is now configurable at build time so if you would have some device that requires even larger MTU or you want to try to go for higher speed it can be enlarged.

    I have added it because @enaon and other guys with those unicycles had some wheel/device that didn't work well with default 20 bytes - it sent 56 byte packets as replies to some commands and the data over 20 was simply cut if MTU was lower than that. So the current choice of 50 is still low for those devices, but it takes extra memory so is not worth it if you don't have the need. Larger MTU would increase speed a bit more but it is not always linear increase.

    And looks like increasing MTU by 1 takes away 32-40 bytes of RAM (= 2-3 espruino variables) so it depends whether you prefer more memory available or possible speed increase - e.g. increasing from current 53 to e.g. 131 would take away additional 2 KB or RAM (out of 64 total)

  • I also want to thank @Fanoush, we have not finished the inmotionV11 client yet, this is why I haven't already posted about it, but the image is stable with a 59 bytes long mtu.

    Thank you both very much.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Espruino 2v09

Posted by Avatar for Gordon @Gordon