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

Making Thingy91 a peripheral bluetooth device

I want to make The Thingy91 a bluetooth peripheral device . I want it to send the generated temperature data to cloud or another device. How do I do this? I had problems with the Bluetooth LTE Sensor Gateway example. I couldn't see the usb ports after programming hci_uart on nRF52840:pca20035 and lte_ble_gateway on nRF9160_pca20035. I couldn't read the logs. 

https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thingy-91-faq says that this kind of demo is coming. Do you know when?

Parents Reply
  • You can achieve that by using the examples in ncs\zephyr\samples\bluetooth as a reference. E.g. the example ncs\zephyr\samples\bluetooth\peripheral_hr show how to implement an advertising peripheral that can get connected to and send heart-rate values.

    Be aware that the Zephyr examples are not tested by us and we don't officially give support for this at the moment. 

    To use Zephyr samples on the nRF52 series, please follow this guide. More information can be found this tutorial, and as stated in the bottom of the page: "Also if you want to get involved with Zephyr, or simply need help as a user, you can join the Zephyr mailing list or join the #zephyrproject IRC channel."

    Nordic Semiconductor is part of the Zephyr Project and contributes with misc. components/software, but we do not give support for Zephyr running on nRF52.  

    Thanks for your understanding.

    Best regards,

    Simon

Children
  • I managed to make my Thingy91 a discoverable and connectable peripheral device but I have a new problem.

    How can I add the needed bas.c and hrs.c to the project? The c-files for zephyr/subsys/bluetooth/common and zephyr/subsys/bluetooth/host are compiled with the project but I don't know how to add the needed c-files from zephyr/subsys/bluetooth/services to the project. I'm building on the LTE BLE Gateway example.

  • 1234qwerty said:
    How can I add the needed bas.c and hrs.c to the project? The c-files for zephyr/subsys/bluetooth/common and zephyr/subsys/bluetooth/host are compiled with the project but I don't know how to add the needed c-files from zephyr/subsys/bluetooth/services to the project

    In NCS and Zephyr, this is usually done by enabling specific configuration, and CMake will add the files. In order to add bas.c and hrs.c to your project, you have to set CONFIG_BT_GATT_BAS and CONFIG_BT_GATT_HRS to y. Check out the file subsys/bluetooth/services/CMakeLists.txt.

    If you look at the prj.conf file of the peripheral_hr sample, you can see the configurations needed to make this example work.

    Best regards,

    Simon

Related