• I can't get Thingy to provide a GATT service. After reading everything I could find online, I still have no idea what I could be doing wrong.

    Advertising work fine, I can see the 0x180D service in the advertisement (I'm using NRFconnect on iOS to check, but have the same effect with other tools as well).

    But when I connect only the standard UART RX and TX services are visible. Nothing else.

    The code below is taken from another stream and appeared to work on a Ruuvitag. (I've tried various versions, but without any change in effect).


    NRF.setServices({
      0x180D: { // heart_rate
        0x2A6E: { // heart_rate_measurement
          notify: true,
          readable: true,
          value : [0]
        }
      }
    }, { advertise: [0x180D], uart: false });
    
    
    var cnt = 0;
    
    setWatch(function() {
      if(cnt++ % 2 === 0)
        LED1.set();
      else
        LED1.reset();
      NRF.updateServices({
        0x180D : {
          0x2A6E : {
            value : [cnt],
            notify: true
          }
        }
      });
    }, BTN, { repeat:true, edge:"rising", debounce: 50 });
    

    The LED toggles just fine, so obviously the function gets called.

    And, yes, I do disconnect the Web Bluetooth IDE from Thingy before I check the services.

    Any help would be much appreciated!
    Thanks,

    Bernd

About

Avatar for Bernd @Bernd started