Bluetooth Mesh sensor data

Hello,

I am currently working on a mesh sensor system. I have got one sensor board and one board for connecting in the mesh system.
Now I want to be able to send the sensor data from the board where it is connected to, to the other and than print it in the debugger or console or how you want to call it.

Does anyone have an idea how I can send the data that I get every second and place it in bluetooth mesh packets so it will be sent to the other board. And also how to print it when the other board received it.

Thanks :)

Parents Reply Children
  • Hi,

    Since you state you're using Segger Embeded Studio (SES), I assume you're using nRF 5 SDK for Mesh. What I wanted to know is which version of nRF5 SDK for Mesh you're using. Could you state which version that is? Here's a link to the various nRF5 SDKs we have infocenter.nordicsemi.com/.../sdk.html

    Chriis said:
    The PCA10400 SDK, developing for nrf52832 chipsets.

    Just to clarify, there is a disctinction between nRFs such as "PCA10400/nRF52832" which is a DK (or a Development Kit), which is not the same as an SDK, or "Software Development Kit", which is the code base used to develop.

    Kind regards,
    Andreas

  • Have you seen the sensor sample for Mesh? This should illustrate how to do what you're describing in your description.

    Kind regards,
    Andreas

  • I have seen that. Overall that page is just reference to reference so that is extremely hard to normally read and hard to understand if you are just beginning with mesh.

    So it is not really of use to me. I do have that example with a server sensor and a client sensor on my boards. But I am trying to figure out what part of the code includes the mocked sensor data and sends that data over bluetooth.

    Also I got a weird problem. When I provision both boards with one on sensor server and the other on sensor client. And after that I try to click the onboard buttons to send data, it works normally I think. When I click a button on the server board, the client recieves a bunch of data (No idea where that data comes from because I think the server just sends a variable and not a bunch of text aswell). But when I turn off the client for a few seconds and turn it back on, only the data from the server board gets read on the client, but when I click a button on the client, then it said transmission false. Like the board can't recieve data back for some reason.

  • Chriis said:
    Overall that page is just reference to reference so that is extremely hard to normally read and hard to understand if you are just beginning with mesh.

    Yes, overall it is a reference to everything you need to know to understand the server sample located in <nRF5 SDK for Mesh InstallFolder>/examples/sensor, and I do agree that it is hard to follow if you're relatively new to Mesh so I understand the frustration which it might induce, but unfortunately this is where the entry level for applications such as these lies.

    Chriis said:
    But I am trying to figure out what part of the code includes the mocked sensor data and sends that data over bluetooth.

    Have a look at static void app_sensor_get_cb and static void button_event_handler(uint32_t button_number) in server/src/main.c and follow the code with some breakpoints 

    Chriis said:
    (No idea where that data comes from because I think the server just sends a variable and not a bunch of text aswell).

    Are you able to locate where in the code you find the same strings of text as is printed?

    Chriis said:
    But when I turn off the client for a few seconds and turn it back on, only the data from the server board gets read on the client, but when I click a button on the client, then it said transmission false. Like the board can't recieve data back for some reason.

    I will have to look into this behavior to see if it is as expected or not. 

    ---

    Since you mention that you're a beginner with Mesh: if your project allows you to use nRF Connect SDK instead of nRF5 SDK for Mesh, I can recommend you the following resources to get you started and to expand your knowledge with both the new SDK and Mesh:

    I addition to the documentation you linked, I would like to recommend you to have a look at these two webinars regarding Bluetooth Mesh:

    1. https://webinars.nordicsemi.com/introduction-to-bluetooth-mesh-4
    2. https://webinars.nordicsemi.com/developing-bluetooth-mesh-products-4

    The first webinar is only a concept introduction, while the second webinar shows you how to modify the Light and switch samples and should explain how to add a vendor model to the samples.

    In addition, if you're new or intermediate with nRF Connect SDK and Bluetooth Low Energy, I do also recommend you have a look at 

    1. https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/i Introductory course to nRF Connect SDK. I recommend you start here if you ever switch over to NCS from nRF5 SDK.
    2. https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/ will be a good supplement to familiarize yourself with Bluetooth Low Energy, which Bluetooth Mesh is based on. It is not quite the same, but it will break down the abstraction somewhat more. 

    Kind regards,
    Andreas

Related