BLE - UART Characteristics Stop Showing Up After A Long Local Name


I’ve been working on BLE and the guides and examples provided by particle. All is working well but I found a really weird characteristic. I am trying advertise as a UART capable peripheral and loading up the UART example works perfectly well (

However, this UART Capable “tag” seems to disappear after I append a local name which is >=9 characters long. Now I’ve read and it mentions:

" The name takes up the length of the name plus two bytes (type and length). The total advertising data is limited to 31 bytes ( BLE_MAX_ADV_DATA_LEN ), and if you include service identifiers there isn’t much left space for the name."

Is this maybe a limitation due to the advertising data limit?

This doesn’t seem to affect functionality but I would like the UART tag since I am trying to filter and only view surrounding devices with this tag.

This can be replicated by just adding a local name to the UART peripheral project. The device I am using is a Boron 3G device on OS 1.4.4. Example:

    BleAdvertisingData data;
    data.appendLocalName("Doug_Devi"); // This name stops the UART characteristics from showing up
    BleAdvertisingData data;
    data.appendLocalName("Doug_Dev"); // UART Characteristics still show up

See screen shots of the Bluefruit app I am using to check this:

Articles/Posts I’ve read:

I’m no expert on BLE - but my guess would be that all advertising packets count up to the 31 byte limit - so if one exceeds that limit, you kill the packet.
Oddly though, I can’t get my Xenon to display your localname - can you send the full code so I can replicate? I can test with my BLE scanner to get some more information - it’s funny that I have all these tools, but I claim to not be an expert :upside_down_face:
(I’ve played with it a ton, but it’s a really complex protocol)

Oddly though, the default LocalName is rather long, and UART does not show either.Screenshot 2020-03-20 at 14.04.19

@no1089 thanks for the reply and feedback. My guess was that as well but I am no expert either. I’ve worked around the issue by just not filtering and checking all scanned BLE devices so this is post is now just for curiousity and not to solve a problem I have anymore.

The full code I am running is acrtually just the UART peripheral tutorial from The only difference is I added the local name in the setup{} function as per the opening post. Can you try loading the tutorial as it as onto your Xenon just to double check everything? Once thats done try adding the 1 line (i.e. data.appendLocalName).

You did bring up a good point that the default name is long as well which is probably longer than the local name I tried so set. I am pretty sure the default name showed UART capabilities but let me double check to make sure. I am heading off for the night but will try this tomorrow or on the weekend.