You are reading a single comment by @dave and its replies. Click here to read the full conversation.
  • Hi All,
    I'm amazed by the capability of this little device and suspect I'm trying to have my cake and eat it, but I'm looking for a way to advertise an iBeacon, services and services data all at the same time. I'm almost there, but at the moment I can only have services and service data advertised, or service data and iBeacon.

    My application has the puck providing a number of services and characteristics including battery, light and temperature and a button service. These are set up with a call to NRF.setServices that specifies the advertising in the options e.g.

    {
      advertise: ['180A','180F','181A','87100001-703F-4AE­E-A323-9AE013D98E93']
    }
    

    I'm then using a call to NRF.setAdvertising to create the service data advertisement e.g.

    NRF.setAdvertising({
        0x1815 : [button.single, button.long],
        0x180F : [metrics.battery],
        0x1809 : [metrics.temperature],
        0x181A : [metrics.light]
      },{ interval : 375 });
    

    These two work together fine. I start the iBeacon using NRF.setScanResponse, e.g.

    NRF.setScanResponse(require("ble_ibeacon­").get({
        uuid : beaconUUID,    // iBeacon uuid
        major : beaconMajor,  // optional
        minor : beaconMinor,  // optional
        rssi : -59            // optional RSSI at 1 meter distance in dBm
      }));
    

    The beacon works but it seems to stomp on the advertisement for services specified in the NRF.setServices() options, as these disappear. (the service data advertisements continue).

    Is there some way I can use arrays in NRF.setAdvertising to specify all three advertisements, services, service data & iBeacon?

    Cheers
    Dave

About

Avatar for dave @dave started