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

Customized Advertising Packet: Information in response not in adv

Hi, I have a TinyShield Nordic module and I am having some troubles trying to customize the advertising packet. I have downloaded NRFGO Studio and I have enabled service data (I want to make the advertising dynamic). Now when I call open the advertising pipe (lib_aci_open_adv_pipe()) and set the data for the pipe (lib_aci_set_local_data()) but the advertising packet still doesn't have the information that I put into it. When I call lib_aci_connect() I just get the basic packet with nothing in the service data. BUT I do get the information in the service data in the response packet if I do allow data to be within the response or to have a response packet (set in NRFGO Studio). This really doesn't work for what I'm trying to do so is there a way to customize the advertising packet to send data or does it have to be in the response? I have been trying for a couple of days with no success.

EDIT: The Tinyshield Nordic module uses the NRF8001

Parents Reply Children
  • I was just trying to advertise dynamic data. For example I have an accelerometer hooked up to it and I wanted it to broadcast data from the accelerometer as advertising packets. Is there no way to do this?

  • It seems I may have solved the problem. I was not able to utilize the service data using my broadcast characteristic because I had it at 20 bytes but the service data had only 18 usable bytes. So once I reduced the broadcast characteristic down to 18 bytes I was able to customize my advertising packets with the data I set it using the library functions.

  • ah, yes. I see now that you had a broadcast "service" using 16bit UUIDs (I thought you used the UART service). Yes, you have a limit of 31 bytes in the advertisement packet. Since you have added service data to both the advertisement packet and scan response packet, the service data will be moved to the scan response packet in case the advertisement packet overflows. This is probably why it helps to reduce the broadcast characteristic. Note that the 16 bit UUID you are using is reserved by the bluetooth sig.

Related