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

nRF52 send sensor data BLE to another board

Hi, 

I am using nRF52832 and SDK 16.0.0 with SES.

My project consists in an application that read temperature from a sensor and send it via BLE to another board (no smartphone or laptop involved), the other board read-only these data without a response. My board (sender) is battery-powered so I need to reduce power consumption, while the other one (receiver) has no problem of power consumption.

It's my first BLE project so I'm asking you which is the best BLE protocol to implent this application, I was thinking about a BLE Beacon in which in major value i write the temperature, the other board when find my UUID read the major knowing that is the temperature. But it's like a workaround and maybe there's something better that I don't know. 

So, basically from which BLE/example you suggest me to start to develop my project?

Thank you very much,

Simone

Parents
  • Hello Simone,

    It's my first BLE project

    Welcome! Please do not hesitate to ask if you should encounter any questions or if things are unclear.

    I'm asking you which is the best BLE protocol to implent this application, I was thinking about a BLE Beacon in which in major value i write the temperature, the other board when find my UUID read the major knowing that is the temperature. But it's like a workaround and maybe there's something better that I don't know. 

    How often will the temperature be read and transferred?
    As you say, it might fit very well with a modification of the BLE Beacon example.
    In the example, the beacon is advertising with the "manufacturer specific data" data-field. This field can be filled with whatever data you would like as long as the total length of the advertising packet is less than 31 bytes.
    For example, you could change the contents of the m_beacon_info struct to contain your temperature measurement(and remove the contents that you do not care about).

    Since battery power is a concern, you could space out the advertisements by increasing the advertising interval - this will reduce the active radio time, and thus significantly reduce power consumption. Using advertisements to transfer measurement data requires a lot less power than maintaining a BLE connection.
    The biggest downside to using advertisements to transfer your data is that the sender never receives an acknowledgement that the data is received, but if this is not a concern in your application then using advertisements to transfer the measurement fits very well.

    Let me know if anything is still unclear, or that you have any more questions.

    Best regards,
    Karl

Reply
  • Hello Simone,

    It's my first BLE project

    Welcome! Please do not hesitate to ask if you should encounter any questions or if things are unclear.

    I'm asking you which is the best BLE protocol to implent this application, I was thinking about a BLE Beacon in which in major value i write the temperature, the other board when find my UUID read the major knowing that is the temperature. But it's like a workaround and maybe there's something better that I don't know. 

    How often will the temperature be read and transferred?
    As you say, it might fit very well with a modification of the BLE Beacon example.
    In the example, the beacon is advertising with the "manufacturer specific data" data-field. This field can be filled with whatever data you would like as long as the total length of the advertising packet is less than 31 bytes.
    For example, you could change the contents of the m_beacon_info struct to contain your temperature measurement(and remove the contents that you do not care about).

    Since battery power is a concern, you could space out the advertisements by increasing the advertising interval - this will reduce the active radio time, and thus significantly reduce power consumption. Using advertisements to transfer measurement data requires a lot less power than maintaining a BLE connection.
    The biggest downside to using advertisements to transfer your data is that the sender never receives an acknowledgement that the data is received, but if this is not a concern in your application then using advertisements to transfer the measurement fits very well.

    Let me know if anything is still unclear, or that you have any more questions.

    Best regards,
    Karl

Children
Related