Avatar for Midnight4577

Midnight4577

Member since Apr 2022 • Last active Apr 2022
  • 1 conversations
  • 2 comments

Most recent activity

  • in Bangle.js
    Avatar for Midnight4577

    I am on a iOS phone. I turned the Bluetooth off and back on as you suggested and everything works perfectly.

    Thanks

  • in Bangle.js
    Avatar for Midnight4577

    I've been trying to create a custom BLE peripheral service with one characteristic which is writable through the NRF Connect app. Even though I have advertised it I can't seem to find the characteristic. Currently my code should create a service with the UUID of f46b0001-b5bd-11ec-b909-0242ac120002 which has a characteristic with the UUID of f46b0002-b5bd-11ec-b909-0242ac120002 and that holds the writable value 42.

    My code is as follows::

    Bangle.loadWidgets();
    Bangle.drawWidgets();
    
    //f46b0001-b5bd-11ec-b909-0242ac120002
    
    NRF.setServices({
      'f46b0001-b5bd-11ec-b909-0242ac120002': {
        'f46b0002-b5bd-11ec-b909-0242ac120002' : {
          value : [42],
          description : "The Answer",
          readable: true,
          writable: true,
          onWrite : function() {
            Bangle.buzz(0.5, 1);
          }
        }
      }
    },
    {
      uart : false, // optional, default is true. Enable BLE UART support
      advertise: [ 'f46b0001-b5bd-11ec-b909-0242ac120002'],­ // optional, list of service UUIDs to advertise
      ancs : false, // optional, Bangle.js-only, enable Apple ANCS support for notifications
      ams : false // optional, Bangle.js-only, enable Apple AMS support for media control
    });
    
    
    
Actions