-
use
curl -O https://www.espruino.com/modules/MQTT.min.js
to download that module and use this code to upload to storage.s = require("Storage"); module=` <content of file MQTT.min.js> `; s.write("MQTT-S",module.replace(/[\n\r]/g, ''));
Now you can use it like this:
s = require("Storage"); mqtt = require("MQTT-S");
As this does not happen to often, I am fine with those manual steps ;-)
-
Many thanks for your quick response. Yes the WebIDE will always reload the module. Small modules I manually store and add
S
to the stored name like in this case it will beMQTT-S
. Missed that feature of the WebIDE to upload modules to strorage, will definitl give it a try.Copy paste from browser to the WebIDE does not look nice.
-
Sometimes uploading is taking too long because you use larges modules like MQTT. Is there an easy way to save the loaded module to storage. So next time you uses
mqtt = require("MQTTS")
.s = require('Storage'); mqtt = require("MQTT"); print(Modules.getCached()) /* output [ "MQTT", "Storage" ] */ // save cached module s.write("MQTTS", /* howto ?*/);
-
-
Thanks, so will dig here Non-Volatile Storage for a solution.
// esp32/build/app/partitions_espruino.csv .... nvs,data,nvs,0x9000,12K ....
Found this tool named Espressif-NVS-Analyzer to decode the nvs data.
-
Hi, there is that espouse.py on GitHub that can read the efuse data.
// disable BT ESP32.enableBLE(false); //this can onyl be reverted by another call with true as argument
now reading the efuse section
espefuse.py summary --format json --port $COMPORT | grep _BT -A6 "DISABLE_BT": { "bit_len": 1, "block": 0, "category": "config", "description": "Disables Bluetooth", "efuse_type": "bool", "name": "DISABLE_BT", "pos": 1, "readable": true, "value": false, "word": 3, "writeable": true },
"value" : false
does not match the expected result ....Any hints?
-
check this page for idf-release-and-soc-compatibility and this one for -C3 details
-
-
-
-
https://github.com/rgomezwap/EspruinoS3
I guess this could be used as a starting point for a build environment for the ESP32-Cx.
-
-
-
-
-
Would it be possible to extend the storage module to
use
require("storage", options)
to use storage for external flash storage or specific flash area?prep storage content offline like possible for spiff?
upload offline content to a specific flash are?
Any further ideas how storage could be extended?
-
Hi, nice tiny ESP32 board. There is no build for board other than the
ESP32 Series
. There is only very little support by the community. You are wellcome to support. Check to open issues for ESP32 on github and let us know if and how you like to support. -
Using module hmac256 to create JSON Web Token. A PR is wating for verification and comments.
const HMAC = require('hmac2256'); HmacSHA256 = function(token, secret) { var hmac = HMAC.SHA256(E.toArrayBuffer(secret)); return btoa(String.fromCharCode.apply(null, hmac.digest(E.toArrayBuffer(token)))).replace(/=+$/, ''); }; var header = { "alg": "HS256", "typ": "JWT"}; var data = { "id": 1337,"username": "john.doe"}; var secret = "My very confidential secret!"; var encodedHeader = btoa(JSON.stringify(header)); var encodedData = btoa(JSON.stringify(data)); var token = encodedHeader + "." + encodedData; var signature = HmacSHA256(token, secret); var jwt = (token+'.'+signature);
-
-
-
-
Yes, definitely - on my way but struggling a fresh LINUX build and a working connecting via tcp.
-
-
Hmm, ist does not work with MQTT.min.js