mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.

OTHER License

Stars
2.5K
Committers
44
mongoose-os - Mongoose OS 2.3

Published by rojer over 6 years ago

  • A lot of work on STM32 (but not ready yet)
  • mos: Reduce default ESP flashing baud rate. This will make flashing slower by default but hopefully more reliable. use --esp-baud-rate to set higher.
  • mos: Fix path mapping in debug-core-dump
  • Add a knob for enabling autocommit on ota-update (shadow.autocommit)
  • Update the C UART example to show how to process input line by line.
  • Introduce "params" as alias for "args" in RPC to make our RPC
  • Move docs to cesanta/mongoose-os-docs
  • WiFi: Reduce rate of reconnects when not connected
  • vfs-dev-spi-flash: SFDP 1.6 and DPD support
  • Add Bearer auth for WS RPC channel
  • Move Docker images to docker.io/mgos
  • wifi: Fix crash in ent auth when user is not set
  • Add MGOS_TIMER_RUN_NOW flag
  • Add FS.Rename
  • mos: Support globs in init_deps entries
  • rpc: Fix memory leak in RPC auth over HTTP
  • RPC UART: One frame per line
  • rpc-uart: Add a simple tool to make RPC requests
  • Add OTA.{Begin,Write,End}
mongoose-os - Mongoose OS 2.2

Published by rojer over 6 years ago

New features

Fixes and minor changes

  • Fix timezone support on ESP8266
  • CC3220: Speed up first boot after flashing
  • CC3220: Fix wifi scan
  • CC32xx: Support WiFi channels 12-14
  • mos: Increase default RPC timeout to 20s
  • mos: Don't fail GCP setup if rpc-mqtt is not there
  • Fix a bug in mgos_uart_config_set_tx_params
  • ESP32 IDF update to https://github.com/espressif/esp-idf/commit/22fbcd276c90049b906702fde1744fd24d438be3
  • Fix a leak in mgos_azure_send_d2c_msgf
  • WiFi: Fixed WiFi reconnect timeout handling
  • rpc-service-wifi: Add BSSID to Wifi.Scan results, change result to array
  • dns-sd: Fix name comparison
  • mjs: Allow null as char and void pointers in FFI
  • Fix issues with JS SPI bindings
  • Add shadow.ota_enable knob, per AWS request
  • Improve OTA progress reporting
  • ESP32: Disable WiFi power saving for now
  • Add timeout field to OTA.Update
  • Update ESP8266 SDK to fix WiFi regression
mongoose-os - Mongoose OS 2.1

Published by rojer over 6 years ago

New features

  • Azure IoT Hub support: easy onboarding (mos azure-iot-setup) and a library Cloud-to-Device and Device-to-Cloud messaging, Device Twin shadow support, Direct Method invocation and RPC over Direct Method (including mos call support).
  • Multiple WiFi STA config support (currently 3). mOS will cycle through the list until successful connection. Last successful config index will be saved to make connection faster after reboot.

Important API changes

  • BREAKING: Change shadow API to return state object. See here for details.

Fixes and minor changes

  • mjs: Add String.indexOf
  • mjs: Add s2o(), a way to convert structs to objs (see here)
  • Add mg_url_encode_opt() - a parametrized version of mg_url_encode()
  • Add json_{sprintf,vsprintf}()
  • Add mgos_mqtt_pubf() - a helper to pub JSON messages
  • CC32XX SSL/TLS refactoring. Make CC3220 use mbedTLS for TLS.
  • CC3220 SDK update (to 2.10.00.04)
  • DNS-SD: Add an option to hide info from adv, add mgos_dns_sd_advertise(), mgos_dns_sd_goodbye()
  • Fix mg_http_parse_header(): treat ";" as a delimiter.
  • Add shadow.enable knob to control the shadow lib
  • MQTT: Only PUBACK if the message's QoS is > 0
  • mos: Use --timeout for config and file ops
  • Add ability to remove event handlers
  • Add M5stack demo app.
mongoose-os - v2.0

Published by rojer over 6 years ago

License change

Mongoose OS 2.0 introduces license change:

  • Mongoose OS Community Edition - Apache License Version 2.0
  • Mongoose OS Enterprise Edition - Commercial License

See Licensing section for details.

Technical changes

  • ESP32: Add ability to reference partitions in fw manifest
  • Fix buffer size passed to inet_ntop()
  • vfs-dev-spi-flash: Fix handling of SFDP PT0 versions > 1.0
  • Fix mg_socketpair for lwip + UDP
  • Fix button debouncing logic
  • Add clock mode selection knob for ESP32
  • ESP32: Add half-duplex UART mode
  • Resurrect MGOS_UPD_EV_BEGIN, add MGOS_OTA_STATE_BEGIN, allow rejecting updates
  • Fix invoking mgos_clear_timer() with an invalid ID.
  • Add mgos_config_get("key") / _set("key", "value"): An easy way to get stringified config value and set value of a config key from string.
  • Fix mongoose_schedule_poll on CC32xx
  • Move MDNS to DNS-SD lib, fix init, add example app
  • Only send config diff during mos config-set
  • ESP32 SDK update, to https://github.com/espressif/esp-idf/commit/84788230392d0918d3add78d9ccf8c2bb7de3152. Also includes fix for heap free space fragmentation.
  • Optimize UART TX path on ESP
  • Update ESP build images - updated ourTLS (rebased to mbedtls-2.8.0).
  • Add SNTP as a dependency for GCP
  • mos: Do not generate init code for libs with no sources
  • Remove mongoose.{c,h} from the mongoose-os repo; mongoose library should be used instead.
  • ESP8266 SDK update (2.2.1, upstream commit 6f57c05)
  • Fix an edge case in multipart HTTP upload parsing
  • Mongoose net_if and ssl_if refactoring
mongoose-os - v1.26

Published by dimonomid over 6 years ago

Firmware

  • Allow use of GPIO9 and 10 on ESP8285
  • Allow up to 10Mbit UART speeds on ESP32
  • Fix OOB access in mg_match_prefix_n().
  • Show stringified event number in debug
  • Make AWS init less noisy
  • Implement the Bluetooth current time service (https://github.com/mongoose-os-libs/bt-service-time)
  • Add mgos_dash_callf_noreply() API to dash library
  • Make mgos_rlock_* functions public
  • Fix make debug_coredump for esp32 and esp8266

mJS:

  • Fix stack underflow on an empty block
  • fix a bug which could cause string data corruption in certain circumstances
  • Fix a few modulo-related issues
  • Handle the wrong return expression properly
  • Fix handling of invalid JSON strings
  • Fix JSON parsing which leads to string buffer reallocaction

Mongoose Web Server:

  • Fix socket leak when there are too many open file descriptors
  • Fix publish-subscribe example
  • Fix mg_parse_multipart in case of malformed request
  • Websocket: Respond to Ping with Pong
  • Websocket: Properly close a connection with Close frame (in response to a client's close and when protocol failure is detected)
  • Websocket: Fix support of fragmented messages
  • Websocket: Add support for control frames interjected in the middle of a fragmented message
  • Digest authentication: Fix nonce validity check (expired nonce or nonce from the future did not cause the the check to fail)
  • Digest authentication: Fix nonce request value; it worked before because nonce validity check was broken as well
  • Digest authentication: Add nonce argument to mg_http_create_digest_auth_header(): clients should use the value received from the server's authentication request.
  • Fail if passed a NULL handler to mg_bind or mg_bind_opt.
  • Publish sources and tests
  • Remove tunneling functionality which was used by nobody
  • Add UDP client example
  • Don't use user_data in mqtt server
  • Deprecate mg_http_parse_header() and implement mg_http_parse_header2() instead, which allocates a new buffer if the client-provided one is not large enough (similarly to asprintf).
  • Fix limitations of header value lengths, e.g. when parsing authentication headers such as nonce, etc.

mos tool:

mongoose-os - v1.25

Published by dimonomid almost 7 years ago

Mongoose OS:

  • Add GPIO open-drain output mode
  • Rewrite bitbang I2C to use open-drain output, make frequency adjustable
  • CC3200: Fix OTA regression, which caused OTA to fail
  • CC3220: Update SDK to 1.60.00.04
  • Fix bluetooth support: subscribing to notifications resulted in a
    crash
  • Fix emitting device config; the bug doesn't cause problems as
    long as config structure doesn't contain empty objects.
  • Fix TCP RX path regression in SSL mode
  • Close undrained and stuck http connections
  • Replace esp_bd_addr_t with generic mgos_bt_addr
  • Make BT UUID utility functions platform-independent
  • Refactor neopixel to a separate lib and add C API, add a C example app (example-neopixel-c)
  • Do not put sys config schema defs on the device FS by default
  • Add a simple heap-backed VFS device, mostly for testing

Mos tool:

  • Default location for all modules, including mongoose-os, is now "deps", so one could place under deps all libs, mongoose-os (and maybe mjs_module), and have a hermetic reproducible build.
  • Do shallow clone for the mongoose-os repo
mongoose-os - v1.23

Published by dimonomid almost 7 years ago

Mos tool:

  • Fix brew build: mos shouldn't check for updates because when installed via
    brew it should be updated also via brew

Firmware:

  • BREAKING: SNTP is now factored out to a separate library, so apps should include it explicitly if that functionality is needed.
  • Implemented mgos_event_add_group_handler() in C and
    Event.addGroupHandler() in mJS
  • BREAKING: mgos_net_add_event_handler() is deprecated in favor of mgos_event-based
    API. See comment for MGOS_EVENT_GRP_NET for the example.
  • Increased CC32xx UART buffer size
  • Many improvements in dashboard support (and in the dashboard itself)
  • Added DigiCert root
mongoose-os - v1.22.1

Published by dimonomid almost 7 years ago

Fix brew build: mos shouldn't check for updates because when installed via brew it should be updated also via brew

mongoose-os - v1.22

Published by dimonomid almost 7 years ago

Mos tool:

  • Fix aws thing name for the cases when it's not the default <arch>_<mac>

Firmware:

  • BT: Add API for managing pairing; improve security
  • ESP32: update ESP-IDF
  • ota-aws-shadow library improved and renamed to ota-shadow
  • Add events API, see mgos_event.h
  • Add wifi.ap.hostname: e.g. if it's set to foo.com, then all clients connected to the device's wifi AP
    would be able to use the hostname foo.com instead of the device's IP 192.168.4.1.
mongoose-os - v1.20.1

Published by dimonomid almost 7 years ago

This is a bugfix release.

  • Fetching prebuilt apps during initial setup was failing;
  • For local builds, --libs-dir didn't work correctly for libs which aren't git repositories.
mongoose-os - v1.20

Published by dimonomid almost 7 years ago

  • The workflow is changed: instead of selecting a prebuilt firmware and hacking right on device's files, initial setup window now allows to select apps which have prebuilt binaries, and when the setup is done, the app's page is opened, where users can edit it, rebuild, and flash.
  • External git binary is not required anymore for the mos tool to work.
  • Packages available for Ubuntu 17.10 as well
mongoose-os - 1.6

Published by dimonomid about 7 years ago

mongoose-os - 1.5

Published by dimonomid over 7 years ago

  • More functionality is factored out into separate libs
  • Performance and stability fixes
mongoose-os - 1.4 "Potato", 2017-06-19

Published by cpq over 7 years ago

  • Factored out Mongoose OS functionality to libraries. See https://mongoose-os.com/docs/core_components/apps.html
  • Greatly improved documentation
  • Added support to config_schema to mos.yml
  • Added Arduino example apps
  • Added ESP8285 flashing support
  • Added project IDE to the Web UI
  • Added MQTT and UDP remote log
  • Split cert & key in the JS SSL API
  • MQTT publishing on QOS 2 fixes
  • Added VFS support, external SPI flash mount, RPC service for mounting FS
  • Amazon Greengrass integration
  • Many performance and stability fixes
mongoose-os - 1.3 "Traditional cookadoodadoo", 2017-05-19

Published by cpq over 7 years ago

  • mos tool improvements - build system, UI, better mqtt support
  • Google IoT support on the device side
  • Plenty of bugfixes around stability
  • I2C and SPI API. On ESP32, HW is used - it's fast!
  • Arduino support - OneWire, Wire, BME280, DHT, SSD1306, Dallas Temp, GFX drivers
  • mJS engine improvements. Compilation into byte code and mmap-ing to to save RAM
  • Remote logging via UDP and MQTT
  • AWS shadow support
  • MQTT client improvements, better QOS handling
  • Blynk compat & example
  • Plenty of improvements in JS API, including RPC outbound API
  • MDNS fixes
  • Refactored UART API, both C and JS
  • Published reference AWS IoT projects
mongoose-os - 1.2 "Standard size rabbit", 2017-03-08

Published by cpq over 7 years ago

Overview

mongoose-os - 1.1 "Smooth Sailing", 2016-07-27

Published by rojer over 8 years ago

  • Big improvements in CC3200 support:
    • Cloud console logging
    • NWP service pack is now included in FW bundle and flashed together
    • Better stability
  • Faster updates from cloud IDE
  • Improved C API
  • JS proxy object API support, allowing implementing JS objects backed by C code
mongoose-os - 1.0-rc1 "Rushing Mink", 2016-06-28

Published by dimonomid over 8 years ago

  • OTA update is significantly improved
  • Added firmware update support for CC3200
  • Improved cloud integration
  • Improved JavaScript API
  • Bug fixes
  • Improved documentation
  • Added examples
mongoose-os - Beta4 "Junkie Bear", 2016-04-26

Published by rojer over 8 years ago

Main reason for this release is the Mongoose IoT rebranding. What you are looking at now and what used to be called Smart.js is now Mongoose IoT Firmware.

Changes that happened since Beta3:

  • Quite a bit if work on TI CC3200
  • JS APIs for TCP and UDP
  • File API changes (readAll removed)
  • GPIO API changes (notably setmode -> setMode)
  • Improved TLS support - a CA bundle (ca.pem) with 10 of most popular roots is now included by default.
mongoose-os - Beta3 "Fat Rabbit", 2016-03-24

Published by mkmik over 8 years ago

What's new

Beta3 "Fat Rabbit" is mainly a bug-fix and continuous improvement release. We've been very busy, there are tons of improvements; existing users are encouraged to upgrade. Please also consider upgrading to the most recent FnC flasher tool (https://github.com/cesanta/fnc/releases/latest).

A few highlights:

New features, improvements

  • MQTT support
  • TLS works on ESP Smart.js
  • CC3200 support has been resumed
  • ESP8266: Switch to OSS SDK 1.5.2
  • ESP8266, LWIP: Adaptive TCP retransmit; faster networking in the face of packet loss
  • Most Smart.js library code is now "frozen", i.e. it lives on flash memory. This is a huge saving for some archs such as esp8266.
  • Implemented setInterval, clearInterval, clearTimeout
  • Symbolic names: Debug.OFF, Debug.OUT, Debug.ERR, ...
  • Sys.reboot takes an optional exit code. Useful on "posix" platforms.
  • More helpers to check for heap corruptions
  • ESP8266: Coredump gdb server support Espressif V2 image format (used in OTA builds)
  • Improvements to crash reporting when emulating instructions in memory mapping soft handler
  • Add Sys.time function
  • ESP8266: Handle 32-bit timer overflow
  • ESP8266: Support 8Mbit flash
  • CC3200: GPIO support, interrupts.

Backward incompatible changes

  • rename http.port to http.listen_addr config var
  • rename v7_mk_opt to v7_create_opt due to a bad rename in Beta2

Bug fixes

Smart.js

  • ESP8266: Watchdog timer fix: timeout duration is not reset after each feed.
  • Fixed hang caused by a GPIO interrupt happening while the device is writing to flash (e.g. OTA update)
  • Fix memory leaks in setTimeout

V7 JavaScript VM

  • Fixed JS closures leak
  • Smaller function call frame
  • Added bcode memory footprint metrics
  • Many memory corruption fixes caused by missed GC roots in C code.

Using Cesanta Cloud

Cesanta runs a public cloud service at https://cloud.cesanta.com. To login, all you need is a github or G+ account.
Any other cloud service can be used to store data - please take a look at the Http or WebSocket API.

The Smart.js firmware comes with an implementation of our websocket based protocol that is designed to make your device easily accessible behind NATs and to support disconnected operation by managing the queuing of messages for you:

https://www.cesanta.com/developer/cloud

Write your own handlers on your device and make it respond to commands send by other devices or by software running on your servers and call other device or store data such as metrics on our cloud services:

clubby.oncmd('/v1/MyThing.PokeMySensor', function(cmd, done) {
  print('got command:', cmd.args.blah);

  GPIO.write(yourLEDPin, true);

  clubby.call('//api.cesanta.com', {
    cmd: '/v1/Metrics.Publish',
    args: {vars: [[{__name__: 'frobulator'}, readFrobulatorValue()]]}
   }, function(res) {
    GPIO.write(yourLEDPin, false);
    done('your response');
  });
});

Documentation, examples, tools and firmware

Smart.js reference and examples can be found at https://www.cesanta.com/developer/smartjs

Flashing utility (Flash-n-Chips) can be downloaded from https://github.com/cesanta/fnc/releases

Download the firmware from the release attachments below:

Package Rankings
Top 8.17% on Proxy.golang.org
Badges
Extracted from project README
License Gitter
Related Projects