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

**URL:** <https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186>\
**Category:** Firmware\
**Tags:** boron, argon, xenon\
**Created:** [March 15, 2020, 6:28am UTC](https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186 "2020-03-15T06:28:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![slacker89](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@slacker89](https://community.particle.io/u/slacker89)\
**Post date:** [March 15, 2020, 6:28am UTC](https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186/1 "2020-03-15T06:28:34Z")

</div>

Hello,

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 ([https://docs.particle.io/tutorials/device-os/bluetooth-le/#uart-peripheral](https://docs.particle.io/tutorials/device-os/bluetooth-le/#uart-peripheral)).

However, this UART Capable “tag” seems to disappear after I append a local name which is \>=9 characters long. Now I’ve read [https://docs.particle.io/reference/device-os/firmware/argon/#appendlocalname-](https://docs.particle.io/reference/device-os/firmware/argon/#appendlocalname-) 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:

```auto
    BleAdvertisingData data;
    data.appendLocalName("Doug_Devi"); // This name stops the UART characteristics from showing up
    data.appendServiceUUID(serviceUuid);
    BLE.advertise(&data);

```

```auto
    BleAdvertisingData data;
    data.appendLocalName("Doug_Dev"); // UART Characteristics still show up
    data.appendServiceUUID(serviceUuid);
    BLE.advertise(&data);

```

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

 ![Screenshot_20200314-231030](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/7/c/7c98e7c659f27271fbab93367bcdf50dad0b6c4d.png) ![Screenshot_20200314-231131](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/b/2/b2d2c2f95978494bf9033821142fb6361d871c5a.png)

Articles/Posts I’ve read:

- [BLE UART tutorial help](https://community.particle.io/t/ble-uart-tutorial-help/50780/20)
- [Need Help Sending BLE UART Broadcast](https://community.particle.io/t/need-help-sending-ble-uart-broadcast/50806/5)
- [Using BLE with 1.3. How to set the local name of the device to show in the advertising packet](https://community.particle.io/t/using-ble-with-1-3-how-to-set-the-local-name-of-the-device-to-show-in-the-advertising-packet/50907/30)
- [BLE Generic Access Service characteristics not showing up](https://community.particle.io/t/ble-generic-access-service-characteristics-not-showing-up/51416/4)
- [BLE - Getting started help](https://community.particle.io/t/ble-getting-started-help/53901/13)

---

<div class="post-metadata">

**Author:** ![no1089](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/no1089/32/24051_2.png) [@no1089](https://community.particle.io/u/no1089)\
**Post date:** [March 20, 2020, 11:51am UTC](https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186/2 "2020-03-20T11:51:21Z")

</div>

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 🙃  
(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](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/f/6/f6526ab4426f927771880164146f0f3968cc34c2.png)

---

<div class="post-metadata">

**Author:** ![slacker89](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@slacker89](https://community.particle.io/u/slacker89)\
**Post date:** [March 20, 2020, 12:50pm UTC](https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186/3 "2020-03-20T12:50:36Z")

</div>

@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 [https://docs.particle.io/tutorials/device-os/bluetooth-le/#uart-peripheral](https://docs.particle.io/tutorials/device-os/bluetooth-le/#uart-peripheral). 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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [September 19, 2020, 12:56am UTC](https://community.particle.io/t/ble-uart-characteristics-stop-showing-up-after-a-long-local-name/55186/4 "2020-09-19T00:56:53Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
