How can I include my own data in a BLE advert?

Answer

BLE adverts are made up of a number of datatypes up to the maximum pdu size. The Bluetooth SIG provides many different data types for things such as local name, service UUID and appearance amongst others. Should yo wish to include proprietary data in an advert not covered by any of the existing datatypes then you can use the manufacturer specific data type(0xFF) where the first two octets contain your company identifier with the remaining octets free for your data. However you may wish to allocate one or more of the following octets as a message identifier so that you can easily identify different types of data easily.