# SD based custom firmware on Ruuvi tag (no services)

**URL:** <https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590>\
**Category:** 🇬🇧 RuuviTag & RuuviTag Pro sensors\
**Created:** [3 July 2019 10:24 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590 "2019-07-03T10:24:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexCo](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexco/32/1757_2.png) [@alexCo](https://f.ruuvi.com/u/alexCo)\
**Post date:** [3 July 2019 10:24 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/1 "2019-07-03T10:24:46Z")

</div>

(SDK15 + s132 + SES + Ruuvi devkit)  
Hello  
My first attempt to burn custom firmware on ruuvi tab using ruuvi dev kit. I have tried blinky (no soft device) and it works on ruuvi tag. If I try hrs or other example that needs SD and is connectable an odd situation appears.  
For instance, using SES I erase all ruuvi tag and then I burn ble\_app\_hrs and everything seems ok. I can see red LED blinking.

When I use nRF connect and connect to the ruuvi tag the connection succeed but I can just see these services:

Nordic UART Service  
Experimental Buttonless DFU Service  
Device Information

But the hrs service is not shown!

If I burn my custom BLE firmware (connectable) the same happens.

If I burn the same samples on nRF52 DK everything works fine.

What happens with Ruuvi tag? Am I missing something? Do I need to change something in samples in order to run them on ruuvi tag?

Thanks a lot

Alex

---

<div class="post-metadata">

**Author:** ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)\
**Post date:** [3 July 2019 10:45 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/2 "2019-07-03T10:45:26Z")

</div>

Hello,

Have you tried refreshing the services on nRF Connect side? Sometimes the services are cached on the phone.

Samples generally work as-is on RuuviTag, but you’re going to have high power consumption unless you pull CS lines of BME280 and LIS2DH12 up

---

<div class="post-metadata">

**Author:** ![alexCo](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexco/32/1757_2.png) [@alexCo](https://f.ruuvi.com/u/alexCo)\
**Post date:** [3 July 2019 11:10 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/3 "2019-07-03T11:10:18Z")

</div>

Sensors will be handled later… Thanks for the info.  
For now, I just want to test a **connectable** firmware on ruuvi tag. As I could not find any (complete) connectable sample from ruuvi I decided to use nordic SDK in order to reach it.

using nRF connect I just can see thse 3 services. I can not see my custom service. However, I can see advertisement data changing because my sample modifies adv frame on the fly. I can see it changing in nRF connect but can not see the service.

By the way do you now about any ruuvi connectable sample?

Thanks

---

<div class="post-metadata">

**Author:** ![alexCo](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexco/32/1757_2.png) [@alexCo](https://f.ruuvi.com/u/alexCo)\
**Post date:** [3 July 2019 20:30 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/4 "2019-07-03T20:30:25Z")

</div>

If am erasing chip, how can these kind of services be available after burning SD and HRS sample?

Nordic UART Service ?  
Experimental Buttonless DFU Service ?

I am erasing in command line:  
nrfjprog --family nRF52 --eraseall

and using SES…

I also tried with this:

nrfjprog --family NRF52 --program ~/nRF5\_SDK\_15.3.0\_59ac345/s132nrf52611/s132\_nrf52\_6.1.1\_softdevice.hex --chiperase --verify

nrfjprog --family NRF52 --program ~/nRF5\_SDK\_15.3.0\_59ac345/examples/ble\_peripheral/my/pca10040/s132/ses/Output/Debug/Exe/ble\_app\_template\_pca10040\_s132.hex --verify

nrfjprog --family NRF52 --reset

When I connect using smartphone I just can see the following 3 services:

Nordic UART Service  
Experimental Buttonless DFU Service  
Device Information

Why?  
Why does eraseall can not remove these ruuvi bond services? Hrs or my firmware has nothing to do with ruuvi code…

---

<div class="post-metadata">

**Author:** ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)\
**Post date:** [4 July 2019 12:49 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/5 "2019-07-04T12:49:36Z")

</div>

It sounds like you’re having some sort of issue with service caching.  
One thing that comes to my mind is that you could try calling [sd\_ble\_gatts\_service\_changed](https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group ___b_l_e___ g_a_t_t_s___f_u_n_c_t_i_o_n_s.html#ga2c8c90d73fa27ba6691ad82b4a960adc).  
In SDK12 firmware we had to add `#define IS_SRVC_CHANGED_CHARACT_PRESENT 1 /**< Include the service changed characteristic. If not enabled, the server's database cannot be changed for the lifetime of the device. */`which set a flag to soft device enable parameters to include the service changed parameter.

If you haven’t done so already, click the refresh services on nRF Connect.

 ![image](https://f.ruuvi.com/uploads/default/original/2X/e/e100493b65b0e019e02345246476b530fd43d68c.jpeg)

We do have some connectable firmwares, mainly for vibration monitoring applications. What are your expectations on those firmwares, i.e. what they should do?

---

<div class="post-metadata">

**Author:** ![alexCo](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexco/32/1757_2.png) [@alexCo](https://f.ruuvi.com/u/alexCo)\
**Post date:** [4 July 2019 20:11 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/6 "2019-07-04T20:11:49Z")

</div>

Hi!  
I tried with an Android smartphone and t worked!  
Then I cleanned the Apple phone Bluetooth cache and it worked too! 🙂

(It would be great if those connectable firmware source code be open for everybody)

I need to transfer measurements in a very secure way. Hence the connection need.

Thank you  
Alex

---

<div class="post-metadata">

**Author:** ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)\
**Post date:** [5 July 2019 10:11 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/7 "2019-07-05T10:11:41Z")

</div>

We’re not hiding the sources 🙂

> **[ojousima/ojousima.logger.c](https://github.com/ojousima/ojousima.logger.c/tree/acceleration_streamer)**
>
> Contribute to ojousima/ojousima.logger.c development by creating an account on GitHub.

However the connectable firmwares are generally proof-of-concepts for a special purpose, they might be buggy or power hungry etc. There’s also not proper support for them in Ruuvi Station, community libraries and Ruuvi is not committed on maintaining or updating the firmware, this is why we don’t have made them available under Ruuvi brand.

---

<div class="post-metadata">

**Author:** ![alexCo](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexco/32/1757_2.png) [@alexCo](https://f.ruuvi.com/u/alexCo)\
**Post date:** [5 July 2019 10:47 UTC](https://f.ruuvi.com/t/sd-based-custom-firmware-on-ruuvi-tag-no-services/3590/8 "2019-07-05T10:47:16Z")

</div>

Ok, understood. But for those (like me) that are developing from the ground up using nordic sdk15 and them we must join the sensors code, I think it will a good help (those no-warranty ruuvi connectable firmwares) at least for a “connectable template” project.  
Thanks for the link
