This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Best Practices for Advertising

1. I've noticed while using tools like NRFConnect that most BLE devices in my proximity do not include the device name in the advertising packet. My assumption is the developers of these products thought that wasteful in the limited space of the packet, but it made me wonder what are the typical ways manufacturers efficiently scan for their products? Are they using company_identifier in the manufacture's data primarily? Are they putting something proprietary in the manufacturer's data field?

2. Is it generally a best practice to put service UUIDs in the scan response packet? 

3. I've noticed many devices don't include any services in advertising but when you connect to them you discover they actually do have services. Apple products seem to be a good example of this. What's the thinking between advertising services and not - especially if it doesn't appear required to know the service is there?

  • 1. The most common way to identify BLE devices is through BLE_GAP_EVT_ADV_REPORT which occurs when you are scanning and get an advertising packet or a scan response packet. In this event you can read advertising data as well as the address of the advertising device, which is how you usually identify devices. Larger companies often use company identifiers to keep track of their products, yes.

    2. Using a UUID is entirely up to you. Although a very common practice, there is no requirement to have or not use UUIDs in either advertisement or scan response packets.

    3. This is up to the user to put in, for most finished products, they do have the Service UUID in the advertising packet, as this is required for some devices to be able to connect to it. However in the cases where the services aren't advertised, it is often because the user knows what services the device provides, and doesn't want to "waste" space in the advertising packet on a service he/she knows is there. The service UUID may also be added in the scan response packet, for active scanning, although this is seldom used.

    This blog post gives a nice insight in Bluetooth Advertising, and I suggest you have a gander if something is unclear.

    Best regards,

    Simon

Related