Skip to content

Moddable SDK 5.11.0

Choose a tag to compare

@mkellner mkellner released this 11 Sep 21:15
· 94 commits to public since this release

Moddable SDK 5.11.0 contains improvements made between August 12, 2025 and September 11, 2025.

New ECMA-419 BLE Server

This release contains a completely new API for implementing Bluetooth Peripherals (also called BLE Servers). Our original Peripheral has worked well for many years, but has some shortcomings that we wanted to address. Moddable has proposed this API to Ecma TC53 to become part of the ECMA-419 standard.

The server API is mostly about describing the BLE services, characteristics, and descriptors that make up the device. Rather than a long list of APIs to call to define all those, a single JavaScript object fully describes the hierarchy of services, characteristics, and descriptors within a device. This results in extremely direct, readable code that makes creating and maintaining a BLE Peripheral much easier. Check out our heart-rate monitor server example to see how it works.

The server is implemented for both ESP32 using the NimBLE stack and macOS using Core Bluetooth. This is the first time we've supported Bluetooth server in the simulator. This has proven to be incredibly powerful for accelerating Bluetooth development, even with the limitations of Core Bluetooth.

The new BLE Server is still experimental, so you can expect changes. But it is working very nicely, so we wanted to share it now to get experience and feedback while it is still evolving.

New ECMA-419 BLE Client, secured

This release contains numerous improvements to our new BLE Client, most notably a first draft of support for security including pairing and bonding. The new health temperature example shows how easy it is to add security settings to your BLE client. Learn about our new BLE Client in July's release notes.

ESP-IDF v5.5.1

The Moddable SDK has migrated to ESP-IDF v5.5.1 for all ESP32 family builds. The release contains improvements from Espressif, particularly BLE. As usual, there should be no code changes required for the vast majority of projects using the Moddable SDK. Updating takes just a few minutes:

  • If you used xs-dev to install the Moddable SDK, execute xs-dev update --device esp32
  • Otherwise, follow the update instructions for macOS and Linux, or Windows.

Note: Updating to the latest ESP-IDF using xs-dev is now more reliable. xs-dev now automatically determines the ESP-IDF version required by the Moddable SDK, so there's no need to update xs-dev to have it use the recommended ESP-IDF version. Of course you will need to update xs-dev to get these improvements ;) Thank you to @stc1988 and @HipsterBrown for their contributions to this improvement.

Release Details

  • ECMA-419
    • BLE Client
      • 128-bit UUID strings correctly formatted
      • Improve error reporting and out-of-memory handling
      • enableNotifications divided into subscribe and unsubscribe
      • filters removed from the constructor options object and its services property is now at the root of the constructor options object
      • Added new example showing how to use ECMA-419 GAPClient for BLE discovery and then handoff to Web Bluetooth for GATT operations. This provides developers full flexibility on discovery, something that is expressly prohibited by Web Bluetooth.
      • Implemented experimental security support – pairing and bonding. See secure health temperature example.
    • HTTP Client
      • Eliminate cascade of unnecessary floating-point operations when no content-length given on unchunked response
  • Modules
    • Piu
      • Save 8 bytes of memory on each Piu Content instance by optimizing data structures
    • Bluetooth / BLE – more comprehensive workaround for ESP-IDF bug where notifications are not delivered to client unless ESP-IDF BLE server code included in build
    • Eliminate unnecessary floating-point operations in MP3 decoder
  • Devices
    • M5StackCoreS3 now uses ECMA-419 touch sensor driver (contributed by @stc1988)
    • Ethernet support on ESP32 devices enhanced to support WizNET W5500 and use code from ESP Component Registry. (contributed by @rmontrosecbw)
    • c_rand() on ESP32 and ESP8266 now returns non-negative signed values to match rand() (previously could generate negative values which broke some native code)
  • Examples
    • ethernet-monitor updated to use working time server (contributed by @rmontrosecbw)
  • Tools
    • More flexible ESP-IDF version check
    • Include expected ESP-IDF version in esp32/manifest.json; use that everywhere the ESP-IDF version needs to be checked
    • mcrun has new -noCheckModule option to explicitly suppress generation of the check module. Replaces overload of -f x.
  • XS
    • Optimize JavaScript stack use by Function.prototype.call, Function.prototype.apply, and Function.prototype.bind. Eliminates one stack frame, which benefits Piu initialization and ECMA-419 callbacks.
    • Merge better fix for undefined behaviors in fdlibm fmod
    • Fix native stack overflow on recursive Set (found by Fuzzilli)

Contact Us

If you have questions or suggestions about anything here, please reach out: