You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Can you run this on your Puck, with the PlayBulb's address? It could take a while to complete.

    var gatt;
    NRF.connect("c4:be:84:de:a9:ba").then(fu­nction(g) {
      gatt = g;
      console.log("Connected - finding services");
      return gatt.getPrimaryServices();
    }).then(function(services) {
      print(services);
      console.log("Finding characteristics");
        function sender(resolve, reject) {
          if (services.length) {
            var service = services.shift();
            service.getCharacteristics().then(functi­on(characteristics) {
              console.log("Service "+service.uuid+" => ", characteristics);
              sender(resolve, reject);
            }).catch(reject);
          } else  {
            resolve();
          }
        }
        return new Promise(sender);  
    }).then(function() {
      gatt.disconnect();
      console.log("Done! Disconnected.");
    });
    

    It should dump what I thinks all the characteristics are - I've just noticed having some trouble grabbing the UUID from one smart bulb (I get "0x0000[vendor]") and the problems could be related?

  • Here you go:

    Connected - finding services
    [
      BluetoothRemoteGATTService {
        "uuid": "0x1800",
        "isPrimary": true, "start_handle": 1, "end_handle": 7 },
      BluetoothRemoteGATTService {
        "uuid": "0x1801",
        "isPrimary": true, "start_handle": 8, "end_handle": 8 },
      BluetoothRemoteGATTService {
        "uuid": "0xff02",
        "isPrimary": true, "start_handle": 9, "end_handle": 28 },
      BluetoothRemoteGATTService {
        "uuid": "0x180f",
        "isPrimary": true, "start_handle": 29, "end_handle": 32 },
      BluetoothRemoteGATTService {
        "uuid": "0x180a",
        "isPrimary": true, "start_handle": 33, "end_handle": 65535 }
     ]
    Finding characteristics
    Service 0x1800 =>  [
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a00",
        "handle_value": 3, "handle_decl": 2 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a01",
        "handle_value": 5, "handle_decl": 4 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a04",
        "handle_value": 7, "handle_decl": 6 }
     ]
    Service 0x1801 =>  [  ]
    Service 0xff02 =>  [
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a37",
        "handle_value": 11, "handle_decl": 10 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfff8",
        "handle_value": 14, "handle_decl": 13 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfff9",
        "handle_value": 16, "handle_decl": 15 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfffa",
        "handle_value": 18, "handle_decl": 17 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfffb",
        "handle_value": 20, "handle_decl": 19 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfffc",
        "handle_value": 22, "handle_decl": 21 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfffd",
        "handle_value": 24, "handle_decl": 23 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xfffe",
        "handle_value": 26, "handle_decl": 25 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0xffff",
        "handle_value": 28, "handle_decl": 27 }
     ]
    Service 0x180f =>  [
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a19",
        "handle_value": 31, "handle_decl": 30 }
     ]
    Service 0x180a =>  [
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a25",
        "handle_value": 35, "handle_decl": 34 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a27",
        "handle_value": 37, "handle_decl": 36 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a26",
        "handle_value": 39, "handle_decl": 38 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a28",
        "handle_value": 41, "handle_decl": 40 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a29",
        "handle_value": 43, "handle_decl": 42 },
      BluetoothRemoteGATTCharacteristic {
        "uuid": "0x2a50",
        "handle_value": 45, "handle_decl": 44 }
     ]
    Done! Disconnected.
    
About

Avatar for Gordon @Gordon started