This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ble



hi,

advertisement packets of ble device may contain data atributes like temp,....etc.?

  • No, advertising packets can't contain data attribute.

  • hi yikai,

    in non connectable advertising, the ble devices advertises to all devices. for examples thermometer advertises temp?

    here temp is not attribute?

    pls expalin

    non connectable advertising vs directed advertising.

  • Hi,

    If you want to update advertising data, you need to call GAP_updateAdvertisingData and you need to fill the correct Advertising Data and data Length. The master device should be programmed to understand this advertising data as normally only profile information is only passed in Advertising data.

    Regards,

    Arun

  • hi arun,

    thanks for you reply, in some books i read that advertising packets cannot contain data, the packet contains just device name and what type of service it is going to offer.

    so i am confused with this non connectable advertising in this type the device is sending values without connecting to master.

    so pls explain

  • Please note that, the above post suggests a hack and is not recommended. 

    Yes. Normally Advertising packets cannot contain data, but you could hack it as I had mentioned earlier by calling the GAP_updateAdvertisingData call anytime your data changes, and the master device code also needs to be changed to understand this.

    But then, these devices wont be inter operable with other devices, and hence better to not adopt this hack.

    Regards,

    Arun

  • The Bluetooth specification includes a method for sending 'manufacturer-specific' data in the advertising and/or scan response packet. See the 4.0 specification Vol. 3, Part C, sections 11 and section 18.11.

    Advertising data types are defined in https://www.bluetooth.org/en-us/specification/assigned-numbers/generic-access-profile

    Advertising data type 0xff indicates manufacturer-specific data. It is followed by the 2-byte company identifier. If you don't have a Bluetooth company identifier, you can get one here for free:
    https://www.bluetooth.org/en-us/specification/assigned-numbers/company-identifiers

    This method is not a hack and should be interoperable since it conforms to the BT specification.