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

Fail to include more than one service data in advertising

It seems to be a straightforward BLE app but I cannot make it work.

I start fresh from the “ble_app_template” in nRF51 SDK 8.0.0, and try to add two service data (battery level and temperature) in advertising packet. I make those following changes

  1. Change the clock source to the internal RC oscillator
  2. Add two custom functions “battery_level_get()” and “temperature_data_get()”. I can confirm those two functions work in my other BLE beacon app.
  3. Modify the advertising packet in “advertising_init()” to include battery level and temperature information.

However, it is not quite working. If I just add one service data (battery level), things are fine. If I add two service data (battery level and temperature), the code can compile but I cannot see the BLE device advertising from my BLE client (Nordic Master Control Panel).

The main.c is attached here main.c. What do I miss?

Related