BLE: Can you have manufacturer name and device name in the bt_le_adv_start

I'm using a nRF5340 DK with nRF Connect for VSC addin. I wanted to advertise a manufacturer name and a dynamic device name in the bt_le_adv_start. I'm not sure if that is commonly done and if it is through the ad (Data to be used in advertisement packets.) or the sd (Data to be used in scan response packets) or some combination therein. I wanted to see how it appears in the scanner.

Because Apple does not show the mac address, I really need something to identify the specific device. I thought it might be best if the user names them to make it simple and perhaps I could give it some default generated code from the phone when on the first connection to ensure there is something. That way it only has the default name the first time it appears.

Parents
  • Hi,

    The advertising data can be put in the advertising packet or the scan response packet, depending on the size of the data and the requirements of the application. Each packet can contain only 31 bytes with legacy advertising (not extended advertising), so if the data size exceeds this, the data needs to be split in the two package. Note that only active scanners will received the scan response packet as a response to the scan request package being sent from the scanner to the advertiser when advertising packet is received.

    Advertising data types can be seen here. As you can see, there is no special data type for manufacturer name, but you can put the name in manufacturer specific data type

    You can find an example of updating the advertising data in this sample.

    Best regards,
    Jørgen

Reply
  • Hi,

    The advertising data can be put in the advertising packet or the scan response packet, depending on the size of the data and the requirements of the application. Each packet can contain only 31 bytes with legacy advertising (not extended advertising), so if the data size exceeds this, the data needs to be split in the two package. Note that only active scanners will received the scan response packet as a response to the scan request package being sent from the scanner to the advertiser when advertising packet is received.

    Advertising data types can be seen here. As you can see, there is no special data type for manufacturer name, but you can put the name in manufacturer specific data type

    You can find an example of updating the advertising data in this sample.

    Best regards,
    Jørgen

Children
No Data
Related