Most recent activity
-
- 6 comments
- 3,145 views
-
-
-
I've been doing some experiments with MQTT but I'm having an issue receiving messages with a longer payload, ideally 320bytes of binary or 468bytes base64 encoded.
I wrote a tests and it seems like the mqtt client does unpredictable things over ~100 chars in the payload.This is the test client on a pixl running 2v13, with an ESP8266 connected for WiFi
var server = "192.168.1.10"; var mqtt = require("tinyMQTT").create(server); mqtt.on('connected', function() { console.log("MQTT Connected\n"); mqtt.subscribe("/test"); }); mqtt.on('message', function (msg) { console.log(JSON.stringify(msg)); }); digitalWrite(D11,1); // enable ESP8266 Serial1.setup(115200, { rx: D12, tx : D10 }); var wifi = require("ESP8266WiFi_0v25").connect(Serial1, function(err) { if (err) throw err; console.log("Connecting to WiFi"); wifi.connect(SSID, PASSWORD, function(err) { if (err) throw err; console.log("WiFi Connected"); mqtt.connect(); }); });
My test source publishing a message once a second where the first characters are a number then its padded with that number of dots eg
5....
Result is in the attached file, as you can see it starts to loose parts of the payload around 100chars and at 120chars the topic becomes corrupted.
These points seemed to vary a little with different runs, and the length of the topic so I suspect its something in the overall size of the message thats the limiting factor.According to the MQTT spec it should support messages up to 256mb! while I realise thats totally crazy for Espruino it would be nice if it was able to handle a biut more. even 1kb would be enough for my needs
-
-
I've got some ESP-01's here that I'd like to put esprunio on they're a 1MB board according to esptool:
esptool.py v3.3-dev Serial port /dev/tty.usbserial-220 Connecting.... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting... Detecting chip type... ESP8266 Chip is ESP8266EX Features: WiFi Crystal is 26MHz MAC: a4:cf:12:c9:1f:ab Uploading stub... Running stub... Stub running... Manufacturer: 5e Device: 4014 Detected flash size: 1MB Hard resetting via RTS pin...
Can someone advise on the command I'd need to flash them with and if I can use files from the published builds, (I don't really want to get into setting up a build environment for these) Can I use (some of ) the files in https://www.espruino.com/binaries/espruino_2v11_esp8266_4mb/ with a different map?
@MaBe I've just tested with the sample output code on https://www.espruino.com/Waveform and that plays back fine on an ESP32 so looks like thats ok its just my encoding that I need to look at
@Gordon is there any more detail on the audio encoding for waveform, at the moment I have PCM frames with 16bit 8KHz samples, little endian
But trying to play these back with waveform produces noise