• It's really simple... If you're feeling lucky, simply copy & paste the emoji and upload from the right-hand side of the IDE:

      NRF.setAdvertising({},{ name: "⚡" });

    And this should work as long as your IDE is up to date.

    If you're feeling more restrained, you just need the UTF-8 bytes for the emoji you're using - which you can get easily from:


    For instance the high voltage sign is U+26A1, but the UTF-8 encoding as bytes is \xE2\x9A\xA1

    So then just do:

      NRF.setAdvertising({},{ name: "\xE2\x9A\xA1" });

    Note: While it looks like you're only using 1 character, you are actually sending 3 or 4 bytes - you'll only be able to send a few unicode characters in the relatively small amount of space there is for an advertising name.

    1 Attachment

    • Screenshot_20190408-163723.png
  • ... a quick note on this: The Web IDE and the puck.js library use the device name or the 128 bit Nordic UART UUID (in the scan response packet) to identify devices.

    By changing the start of the name away from Puck.js/etc you're relying purely on the Nordic UART UUID to identify the device - which is less reliable especially in areas with loads of Bluetooth devices.

    Another way around this is to just set your device's name to Puck.js ⚡

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

Quick hack: ⚡ Emoji as your Bluetooth device name ⚡

Posted by Avatar for Gordon @Gordon