Espruino has a 16 bit BLE UUID!

Posted on
  • We've just been granted a BLE Manufacturer ID of 0x0590 by the Bluetooth SIG!

    1v94 of Espruino doesn't support encoding/decoding of manufacturer data, but I have added it to the latest builds.

    You can do:

      manufacturer: 0x0590,
      manufacturerData: [ array of your data ]

    and if you do NRF.findDevices(print) you'll get something like this for any Puck.js devices advertising manufacturer data:

    BluetoothDevice {
      "id": "aa:bb:cc:dd:ee:ff", // address
      "rssi": -89,               // signal strength
      "data": new Uint8Array([ ... ]).buffer, // ArrayBuffer of returned data
      "manufacturer" : 0x0590,
      "manufacturerData" : [ array of your data ],
      "name": "DeviceName"       // the advertised device name

    While this isn't too different to services, it is a totally legitimate way of advertising custom data - since for 16 bit services you're supposed to only use the ones that are approved by the Bluetooth SIG. As long as you use 0590 for the Manufacturer ID you can now broadcast whatever you want :)

  • congrats @Gordon. another example that Espruino/PuckJS is a great product !

    ps a thumbs up feature would be nice to have in the forum ;)

  • :) yes - there was actually a StackOverflow style Q&A thing in the works too, but sadly I'm not sure when that's going to go live - work on the forums has slowed a bit since microcosm (the people running it) ran out of funding :(

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Espruino has a 16 bit BLE UUID!

Posted by Avatar for Gordon @Gordon