You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Actually that error you pointed to is for ESP32 - I don't believe it was ever an issue on official boards.

    Thanks @Robin - there's a good example of using UUIDs at the link you posted on http://forum.espruino.com/conversations/­323285/

    And actually looking again at your code it's obvious - sorry I didn't spot it before! You're actually trying to use the text 'serviceUUID' itself as the UUID, not '6e400001b5a3f393e0a9e50e24dcca9e' :)

    // for instance these two are identical:
    print({
        serviceUUID : {
          characteristicUUID : {
         }
      }
    });
    print({
        "serviceUUID" : {
          "characteristicUUID" : {
         }
      }
    });
    // what you want is
    print({
        '6e400001b5a3f393e0a9e50e24dcca9e' : {
          '6e400003b5a3f393e0a9e50e24dcca9e' : {
         }
      }
    });
    

    If you want to use the UUIDs as constants at the start of the code you'd have to manually set it in code:

    var services = {};
    services[serviceUUID] = {};
    services[serviceUUID][characteristicUUID­] = { ... };
    NRF.setServices(services);
    
About

Avatar for Gordon @Gordon started