Avatar for sammachin

sammachin

Member since Nov 2016 • Last active Oct 2023
  • 15 conversations
  • 42 comments

Most recent activity

    • 6 comments
    • 2,964 views
    • 5 comments
    • 1,848 views
  • in General
    Avatar for sammachin

    @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

  • in General
    Avatar for sammachin

    kind of!
    I'm now getting FIFO full errors which I think is down to the interface between the nrf52 and the ESP8266,

    Trying with espruinio on an ESP32 seems to work much better although I'm now into issues with the waveform class and that.

  • in General
    Avatar for sammachin

    Doh! just noticed I'm using tinyMQTT rather than the regular client that I was looking at the docs for, that will teach me to copy code from another project

  • in General
    Avatar for sammachin

    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(Seri­al1, 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

  • in ESP8266
    Avatar for sammachin

    Thanks that worked, I had to set —flash_size 8m as well but that makes sense.

    And the mode to dout for these boards.

  • in ESP8266
    Avatar for sammachin

    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/esprui­no_2v11_esp8266_4mb/ with a different map?

    • 4 comments
    • 937 views
Actions