BLE GATT Sensor data (IMU) float values over BLE to mobile application

Hello Nordic, 

I am currently attempting to use existing samples for BLE GATT to send/notify sensor data from an IMU over to nRF Connect for Mobile. The data(datatype-float) is sent using a characteristic UUID subscribed to the same. I have followed the following sample code from nordic academy to send data over BLE. Instead of the simulated function, i am trying to send actual data from my sensor through the subscribed UUID on the app.

- BLE fundamentals - https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-4-bluetooth-le-data-exchange/topic/blefund-lesson-4-exercise-2/

Although, when i attempt to send my data from sensor continuously in loop over the send_data thread, the value on the app reads N/A. Sending float values, gives a hex value. But I am unable to read values when i add function to read data from sensor(whose working is verified, device connected) to my send_data function loop. 

Kindly help provide some guidance in using BLE GATT with a custom app for publishing and subscribing data from sensors/peripherals. I am a noob and would benefit from some support, since i find most resources online are limited. 

Thanks much!

  • Hi

    It's a bit hard to pinpoint the problem without having a look at your code. Would you be able to share your code in the case, showing how you are sampling the sensor and attempting to send it over the Bluetooth connection? 

    For sharing code please just attach the source file to the case as an attachment (you can drag drop files into your reply to do this). If you want to share multiple files please zip them first. 

    Best regards
    Torbjørn

Related