• The BluetoothRemoteGATTCharacteristic.startN­otifications() works fine when in Android program I configure characteristic to send notifications (PROPERTY_NOTIFY).
    Bangle does not receive anything when I set to send indications (PROPERTY_INDICATE)
    Android code:

    // Current Time characteristic
            BluetoothGattCharacteristic currentTime = new BluetoothGattCharacteristic(CURRENT_TIME­,
                    //Read-only characteristic, supports notifications
                    BluetoothGattCharacteristic.PROPERTY_REA­D
                      // | BluetoothGattCharacteristic.PROPERTY_NOT­IFY,
                        | BluetoothGattCharacteristic.PROPERTY_IND­ICATE,
                    BluetoothGattCharacteristic.PERMISSION_R­EAD);
            
    

    Bangle code:

    var in_connection_setup = false;
    function connection_setup() {
      if(in_connection_setup) return;
      in_connection_setup = true;
      E.showMessage("Scanning for CSC sensor...");
      NRF.requestDevice({filters:[{services:["­1805"]}]}).then(function(d) {
        device = d;
        console.log("Found device: "+d.name);
        E.showMessage("Found device"+d.name);
        return device.gatt.connect();
      }).then(function(ga) {
        gatt = ga;
        E.showMessage("Connected");
        console.log("Connected");
        return gatt.getPrimaryService("1805");
      }).then(function(s) {
        service = s;
        return service.getCharacteristic("2a2b");
      }).then(function(c) {
        characteristic = c;
        characteristic.on('characteristicvaluech­anged', (event)=>updateTime(event));
        return characteristic.startNotifications();
      }).then(function() {
        console.log("Notifications subsribed");
        E.showMessage("Notifications subsribed");
        //g.reset().clearRect(Bangle.appRect).fl­ip();
      }).catch(function(e) {
        E.showMessage(e.toString(), "ERROR");
        console.log(e);
      });
      in_connection_setup = false;
    }
    

    Am I doing something wrong?
    Is there a way to receive indications?

About

Avatar for Mark_M @Mark_M started