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
Published by cpq over 8 years ago
This functionality allows for remote updating of the firmware on the device. The added functionality in Smart.js is that should there have been an issue during the update for whatever reason (e.g. faulty firmware, firmware data broken during the network transfer or the device ‘hanging’ with the new firmware), a rollback to the old firmware is automatically done. That ensures that OTA will never freeze / hang the device.
See https://www.cesanta.com/developer/smartjs#_ota_over_the_air_programming for more info.
A newly flashed device starts a Web UI in Access Point Mode.
Join to the AP advertised by your device, connect to http://192.168.4.1 with your browser and configure your WiFi parameters and many other settings.
You can find the configuration infrastructure documentation at [here]https://www.cesanta.com/developer/smartjs#_configuration_infrastructure
We have substantially improved memory management. To find out how this was done, check out this blog post on https://blog.cesanta.com/embedded-heap-behaviour-analysis-and-improvement
Our JS standard library is now resident on flash. SJS runtime consumes about 10K of heap for SJS runtime. 30K left for the user on the ESP8266.
We also implemented memory mapped files for spiffs file system that allow us to run precompiled JS files straight off flash memory.
Two new features to check out:
Edit the files on your device with WebDAV. Read more about it at:
https://www.cesanta.com/developer/smartjs#_using_webdav
You can run some JS code whenever your WiFi is ready:
Wifi.ready(function() {
print(“Hey, my ip is:”, Wifi.ip());
});
This release comes with many changes, just a few highlights:
Http.request
accepts also the output of URL.parse
: Http.request($.extend(URL.parse(“http://www.example.com”), {"method": "posts"}, ...);
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 use 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');
});
});
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
Published by cpq almost 9 years ago
Smart.js HTTP API is now compatible with node.js: a subset of node.js's API is implemented. A snippet below demonstrates supported features:
var server = Http.createServer(function(req, res) {
if (req.uri == '/hello') {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write(req);
res.end('\n');
} else {
res.serve({ document_root: '/tmp' });
}
}).listen('127.0.0.1:8000');
var client = Http.request({
hostname: '127.0.0.1',
port: 8000,
path: '/hello',
method: 'POST',
}, function(res) {
print('in reply handler', res);
}).end('this is POST data');
To demonstrate the abilities of the Smart.js platform, we’ve put together a demo website. It shows a predefined interactive dashboard that allows you to control an IoT device. Demo website link.
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 use Http API.
Published by imax9000 about 9 years ago
Published by cpq about 9 years ago
Alpha2 release of the Smart.js IoT platform.
We have ported Smart.js to the POSIX environment, meaning that you can start and try out the platform without the embedded hardware. Simply download the package, unpack it and run on your workstation.
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 use Http API.
Published by imax9000 about 9 years ago
A few bugfixes after ALPHA1.
Published by cpq over 9 years ago
Alpha release of the Smart.js IoT platform.
Note: code for the cloud part is not released yet, but you can use the public cloud service at cloud.cesanta.com. All you need is a github or G+ account.