You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • but than i only get integer temperature values...

    Can you not decode those on your computer? When you use Strings it's very likely that the value itself will be very long (like 56.23435 or similar). When sending advertising data you're limited to around 20 bytes in total, so if you send two of those, there may be too much data and setAdvertising will fail - which might explain the problems you were having.

    For example if the battery is 56.5 in one instance then it might be fine, but if it's 56.23435 the next then it could fail.

    For instant i didn´t understand how to perform the multi beacon variant (ibacon and eddison)

    There are specific pages on iBeacon and Eddystone:

    http://www.espruino.com/Puck.js+Eddyston­e and http://www.espruino.com/Puck.js+iBeacon

    Did you see those? The configuration you should use it detailed there - the get function is used just the same as if you did the initial require("ble_ibeacon").advertise.

    It even has an example that does exactly what you're asking - I've just copy/pasted in the arguments from advertise for you:

    NRF.setAdvertising([
      require("ble_ibeacon").get({
        uuid : [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // ibeacon uuid
        major : 0x0001, // optional
        minor : 0x0001, // optional
        rssi : -59 // optional RSSI at 1 meter distance in dBm
      }),
      require("ble_eddystone").get("your_url")­
      ], {interval:100});
    
About

Avatar for Gordon @Gordon started