Beta3 "Fat Rabbit", 2016-03-24
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
tohttp.listen_addr
config var - rename
v7_mk_opt
tov7_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: