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

How to display Temperature values in a Beacon

Hi,

I am using nRF52832 development kit PCA10040 V1.2.1 2017:38. I am able to successfully run nRF_Examples\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_beacon example and able to see the beacons in my nRF Master Control Panel app.

But, I found this: http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52%2Fdita%2Fnrf52%2Fapp_example%2Fsolar_beacon%2Fread_sensor.html&cp=2_6_0_4 What modifications do I need to do in the ble_app_beacon code in the path mentioned above so that instead of Major, Minor and RSSI, Temperature and Pressure would be displayed in the Master Control Panel app?

I dont need the firmware to measure temperature and pressure. All I need is how to change the words "Major, Minor and RSSI" in the app to display "Temperature and Pressure" . Also, I would need the values to be displayed under temperature and pressure as decimal (float) values instead of hex values.

Thanks.

Parents
  • Hi,

    This is a very good question.

    If you're advertising as a beacon (Nordic Beacon, iBeacon, Eddystone or AltBeacon) nRF Connect (before known as nRF Master Control Panel) will parse the data and display accordingly.

    nRF Connect sorts also other formats:

    1. If your manufacturer data or service data contain 1, 2, or 4 bytes (except Company Id or Service uuid), till get an option to switch parser to Char, Hex, Uint, Sint, Float 8, 16 or 32 bit.
    2. You may switch those data to Utf-8 string, no matter the length
    3. Some Service uuids have custom parsers. For example, the Temperature char uuid, Hearth Temperature Service uuid, Pressure char uuid. This is the answer for your question.
    4. nRF Connect also parsers some custom known formats, like Anki Drive, Nordic Thingy, Microbit, etc.

    Additionally:

    1. If you set the parser to Uint, Sint or Float as in 1. above, or for services from 3., you'll see a graph of those values in adv details (MORE button).
    2. nRF Connect assigns an icon based on various criteria: name, services, company ID, beacon type, etc.

    If you, or somebody else, wants to add a different custom parser, or an icon, please contact me. I just need an icon 68x68 and a way to distinguish the device/devices family from others.

  • To display as Temperature the service uuid should be: 0x1809 or (afair) 0x2A6E. As pressure: 0x2A6D.

    1-byte or 2-byte values are supported, perhaps :) Little endian.

    For example, the adv data should contain 05-16-0918-64 to display temp as 100°C. 5 = length, 16 = service data 16-bit uuid, 0918 = 0x1809, 64 = 100 in hex.

Reply Children
Related