• Thanks! So I've been trying to track this down, and as far as I can see, the issue is that the Bluefruit isn't putting the CCCD handle right after the characteristic, which is what Espruino is expecting (and which seems to work on most other devices).

    Please can you try changing the code as follows:

        }).then(function(characteristic) {
          console.log("Setting up listener for incoming data");
          characteristic.on('characteristicvaluechanged', function(event) {
            console.log("RX: "+JSON.stringify(event.target.value.buffer));
          });
          characteristic.handle_cccd = 35; // <--------- this line is new
          return characteristic.startNotifications();
        })
    

    Unfortunately NRF connect doesn't show what the 'handle values' are for the characteristics, and I don't think Adafruit publish the source code for their Bluefruits so I can't actually see what's going on.

    If 35 doesn't work, maybe try 34? failing that, 38 or 39.

    Sorry it's such a mess - but this is the first time in 5+ years it's come up and it feels like the Bluefruits are doing something a bit different to the way other devices do.

About

Avatar for Gordon @Gordon started