NRF advertising problem for 3 characteristics

Hi all, I am new ruvvitag.

I found that I got following error in web ide if NRF is adveristing 3 characteristics. It seem that the data size is over expected. Do anyone know the criteria or I got something wrong?

Uncaught Error: Got BLE error 0xc (DATA_SIZE)

var Ruuvitag = require("Ruuvitag");

setInterval(function (fn) {
    var temperature = [Ruuvitag.getEnvData().temp.toFixed(2)];
    var pressure = [Ruuvitag.getEnvData().pressure.toFixed(2)];
    var humid = [Ruuvitag.getEnvData().humidity.toFixed(2)];
    var battery = [NRF.getBattery().toFixed(2)];

    console.log("Temperature: " + temperature);
    console.log("Pressure: " + pressure);
    console.log("Humidity: " + humid);

        0x1809: temperature,
        0x2A6F: pressure,
        0x2A6D: humid
}, 3000);

Maybe the advertised data ends up being larger than what can be fit into advertisement package. Maybe try using signed integer instead?

thank a lot. I use two advertising call to solve the problem

1 Like