• Hi all,
    since i got my 2 Pucks, i am doing some experiment with BLE devices.
    I was tempted and i've bought an Awox BLE Color Bulb, but i'm having problem getting Primary Services.
    I am only able to use the first Primary Service "33160fb9-5b27-4e70-b0f8-ff411e3ae078" and its characteristic "217887f8-0af2-4002-9c05-24c9ecf71600", where sending 0 or 1 will turn the bulb off/on.
    There are at least 2 other Primary Service (discovered with nRF Connect), 1 for warm light brightness and 1 for RGB lights.
    Trying to use one of these, i receive the error on command gatt.PrimaryService("fff6fe25-469d-42bc-­9179-b3a093f19032")

    Uncaught Error: Unhandled promise rejection: Error: Too many custom UUIDs already
    

    If i try gatt.PrimaryServices(), i get this

    [
      BluetoothRemoteGATTService {
        "uuid": "0x1800",
        "isPrimary": true, "start_handle": 1, "end_handle": 11 },
      BluetoothRemoteGATTService {
        "uuid": "0x1801",
        "isPrimary": true, "start_handle": 12, "end_handle": 15 },
      BluetoothRemoteGATTService {
        "uuid": "0x180a",
        "isPrimary": true, "start_handle": 16, "end_handle": 30 },
      BluetoothRemoteGATTService {
        "uuid": "0x0000[vendor]",
        "isPrimary": true, "start_handle": 31, "end_handle": 49 },
      BluetoothRemoteGATTService {
        "uuid": "0x0000[vendor]",
        "isPrimary": true, "start_handle": 50, "end_handle": 64 },
      BluetoothRemoteGATTService {
        "uuid": "0x0000[vendor]",
        "isPrimary": true, "start_handle": 65, "end_handle": 85 },
      BluetoothRemoteGATTService {
        "uuid": "0x0000[vendor]",
        "isPrimary": true, "start_handle": 86, "end_handle": 65535 }
     ]
    

    Actually, yesterday i could correctly see at least the first PrimaryService UUID ("33160fb9-5b27-4e70-b0f8-ff411e3ae078")­, so the only way i found to access other services is using gatt.PrimaryServices() and then use the array index of the service i need instead of using for example gatt.PrimaryService("fff6fe25-469d-42bc-­9179-b3a093f19032")

    This is the portion of the (dirty) code i am using, just for testing purpose

    function connectToBulb(){
      console.log("Connecting to bulb...");
      
      NRF.connect("98:7b:f3:77:a4:23").then(fu­nction(g){
        connected = true;
        digitalPulse(LED3, 1, 500);
        gatt = g;
        return gatt.getPrimaryServices();
      }).then(function(service){
        return service[4].getCharacteristics(); // Equals to "fff6fe25-469d-42bc-9179-b3a093f19032"
      }).then(function(c){
        c[1].writeValue(0x7F); // Equals to "d8da934c-3d8f-4bdf-9230-f61295b69570"
      });
    }
    

    while using gatt.PrimaryService("fff6fe25-469d-42bc-­9179-b3a093f19032") or gatt.getCharacteristic("d8da934c-3d8f-4b­df-9230-f61295b69570") are returning me the mentioned error.

    Am i doing something wrong?

About

Avatar for Fabio978 @Fabio978 started