NRF advertising problem for 3 characteristics


#1

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?
Thanks.

Uncaught Error: Got BLE error 0xc (DATA_SIZE)


var Ruuvitag = require("Ruuvitag");
Ruuvitag.setEnvOn(true);

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);

    NRF.setAdvertising([{
        0x1809: temperature,
        0x2A6F: pressure,
        0x2A6D: humid
    }]);
}, 3000);


#2

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


#3

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