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

stream live sensor data from ble_uart application

Hi, I want data read from my sensor (gives continuous data when button is being pressed). and then send it through Bluetooth equipment.(PC or iPhone and so on) But i don'k know how to send live sensor data until i keep pressed through Bluetooth.

I would like to transmit the my sensor data via the BLE continuously until keep pressed the button i am using ble_uart example.

My development environment is like below.

chip : nRf51822 example : ble_uart in nRF_Example 10.0.0 Please kindly comment guide or relevant Q&A issue. (I can't found relevant this issue in "Questions" tab, yet.)

Parents
  • Hi Deepak

    To receive BLE_ERROR_NO_TX_BUFFERS error is normal when the softdevice buffer is full. What you need to do is to not call APP_ERROR_CHECK when BLE_ERROR_NO_TX_BUFFER error is received but to call hvx again with the same data until you do not receive BLE_ERROR_NO_TX_BUFFERS. Another way is to store the data in a buffer, start a timer, go to sleep and then try again on timer interrupt.

    There is a throughput test code here where data is sent as fast as possible over the BLE link. The BLE_ERROR_NO_TX_ERROR error code is not handled in this example, but rather the loop sends data over the link as fast as it can. Try to ignore the same error codes as in this example in line 140.

    See also these threads (1) (2) (3) (4) (5)

Reply
  • Hi Deepak

    To receive BLE_ERROR_NO_TX_BUFFERS error is normal when the softdevice buffer is full. What you need to do is to not call APP_ERROR_CHECK when BLE_ERROR_NO_TX_BUFFER error is received but to call hvx again with the same data until you do not receive BLE_ERROR_NO_TX_BUFFERS. Another way is to store the data in a buffer, start a timer, go to sleep and then try again on timer interrupt.

    There is a throughput test code here where data is sent as fast as possible over the BLE link. The BLE_ERROR_NO_TX_ERROR error code is not handled in this example, but rather the loop sends data over the link as fast as it can. Try to ignore the same error codes as in this example in line 140.

    See also these threads (1) (2) (3) (4) (5)

Children
No Data
Related