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

how to send and receive integers and individual characters over BLE

Hi, I'm using nrf51822 Ek kit and running ble_app_uart example,when i want to send any character or integer it Received like a string only,but i want to send only single character and integer values as it is how can i achieve that functionality, what changes do i make to get that can anyone suggest
me.please help me.. Thanks in advance.

Parents
  • FormerMember
    0 FormerMember

    ble_app_uart sends a notification when data_array is filled up or upon a new line character (uart_event_handle(..)). Instead of waiting for data_array to be filled up, you can remove the line checking if data_array is full or not. Since the maximum amount of data in a notification is 20 bytes, only sending 1 byte will decrease the maximum throughput to 1/20.

Reply
  • FormerMember
    0 FormerMember

    ble_app_uart sends a notification when data_array is filled up or upon a new line character (uart_event_handle(..)). Instead of waiting for data_array to be filled up, you can remove the line checking if data_array is full or not. Since the maximum amount of data in a notification is 20 bytes, only sending 1 byte will decrease the maximum throughput to 1/20.

Children
Related