• Hi all,

    This simple code [1] works on one Puck.js(8a78) but doesn't on another one (5f09).
    Both firm versions are 1v91. Other functions like ble_eddystone or ble_ibeacon works well on 5f09.
    So I wonder why only NRF.setServices does not work on it.
    Followed by Troubleshooting guide, I've tried to reset 5f09, but the issue is not gone.
    How to test this device?

    Thanks,
    Takayuki

    [1]

    NRF.setServices({
      0x1809 : { // Health Thermometer
        0x2A6E: {  // Temperature
          readable: true,
          value : [E.getTemperature().toFixed(2)]
      }},
      0x180F : { // Battery Service
        0x2A19: {  // Battery Level
          readable: true,
          value : [Puck.getBatteryPercentage().toFixed(0)]­
    }}});
    
    
  • disable & enable bluetooth on the device (eg cellphone) used to read and try again

  • There are 2 potential issues...

    • As @MaBe says some devices (especially Apple iOS) don't update the advertised services of devices, so even when told to refresh might show you the wrong list
    • If you're connected to a device and then you call setServices it's unlikely it'll be able to work straight away - you'll need to disconnect and reconnect to see the services
  • Hi Mabe, Gordon,
    @Mabe is correct. After disabled and enabled bluetooth of my iPhone, I could see the services!
    Thanks a lot.
    Takayuki

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

NRF.setServices does not work on one Puck.js, but works on another one.

Posted by Avatar for tkonishi @tkonishi

Actions