Advertising custom UUID

Posted on
  • I see in the docs it mentions there is currently no support for custom UUIDs in setAdvertising, any idea if or when you see this coming?

    Bit of a limitation for me at the moment as I would like to advertising some custom data without having to connect.

  • Ahh - that was actually a mistake in the documentation that has already been fixed (the new docs will update when 1v93 is released). If you specify a 128 bit UUID as a string then it should work fine - the only gotcha is the lack of space in the advertising packet... with a 128 bit UUID there's not much space for data!

  • Perfect :) and yeah that is a challenge too. My plan for that was to return the custom UUID data in the SCAN_RESPONSE packet - I found this article, the array format for setScanResponse is pretty horrible, I noticed you mentioned you'd log an issue for adding a nicer API, any updates on this?

    In the meantime, any tools or references I can look at to help me build a scan response payload? e.g. if I wanted to advertise a custom service UUID with some data

  • You could check out this function:­b/master/libs/bluetooth/jswrap_bluetooth­.c#L708

    I'll try and release 1v93 soon, which should have it in (or you can use the travis builds at­master).

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

Advertising custom UUID

Posted by Avatar for jamesh @jamesh