This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What does the data stream for a response packet look like if I want to use all the bytes possible for data?

For example, ble_advdata_set() wants to insert company identifier and a "00" in the last byte of the response packet. Are these required, and if not, how to use the ble_advdata_set() to utilize these bytes.

Parents
  • I don't know where you're getting that from. ble_advdata_set() only encodes what you ask it to encode, which is what you put in the ble_advdata_t structure. Only if you set manufacturer specific data into the advertising packet will it add it at all. The company identifier (which is part of the manufacturer specific data structure in the advertising data structure) is required by the BTLE spec to be the first 2 bytes of the manufacturer specific data and after that it adds only the data you asked it to add, so if you are getting a '00' byte at the end, it's because the data you are sending to the routine has a '00' byte at the end, or you're giving it a too long length by 1 byte.

Reply
  • I don't know where you're getting that from. ble_advdata_set() only encodes what you ask it to encode, which is what you put in the ble_advdata_t structure. Only if you set manufacturer specific data into the advertising packet will it add it at all. The company identifier (which is part of the manufacturer specific data structure in the advertising data structure) is required by the BTLE spec to be the first 2 bytes of the manufacturer specific data and after that it adds only the data you asked it to add, so if you are getting a '00' byte at the end, it's because the data you are sending to the routine has a '00' byte at the end, or you're giving it a too long length by 1 byte.

Children
No Data
Related