• Hi,
    I'm trying to put together a system that has its own 128-bit UUID as well as battery service. I'd like to keep the UART for now (probably removing once everything is good). I'd also like to add the Device Information service, but first things first.

    I can't seem to get both the 128-bit UUID and the battery service working at the same time.

    Thoughts?

    Here's my code:

    NRF.setAdvertising({}, {name: "XXX"});
    
    
    pinMode(D28, "output");
    pinMode(D29, "analog");
    pinMode(D30, "output");
    
    NRF.setServices({
      0x180F : {
        0x2A19 : {
          value : Puck.getBatteryPercentage(),  readable : true
        }
      }
    });
    setInterval(function() {
      NRF.updateServices({
        0x180F : {
          0x2A19 : {
           value : Puck.getBatteryPercentage()
          }
        }
      });
    }, 60000);
    
    
    NRF.setServices({
      "8093A600-DC1B-4C75-A61C-37BB61E00F1B" : {
        "8093A601-DC1B-4C75-A61C-37BB61E00F1B" : { // **
          value : 0x00, // optional
          broadcast : false, // optional, default is false
          readable : true,   // optional, default is false
          writable : false,   // optional, default is false
          notify : true,   // optional, default is false
        },
    
        "8093A602-DC1B-4C75-A61C-37BB61E00F1B" : { // **
          value : 0x0, // optional
          broadcast : false, // optional, default is false
          readable : true,   // optional, default is false
          writable : false,   // optional, default is false
          notify : true,   // optional, default is false
         },
        
        "8093A603-DC1B-4C75-A61C-37BB61E00F1B" : { // **
          value : 0x0, // optional
          broadcast : false, // optional, default is false
          readable : true,   // optional, default is false
          writable : true,   // optional, default is false
          notify : false,   // optional, default is false
        },
    
      }
    }, { advertise: ['180F', '8093A600-DC1B-4C75-A61C-37BB61E00F1B'],­ uart: true } );
    
About

Avatar for billsalt @billsalt started