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.

  • hi Kristin thanks for your response & sorry for the delay, Your answer is acceptable but i need to send a character or number for selecting a particular function in the switch case ,suppose if i send a character 's' it is received as a string "s" so it is not possible to use a string in the switch case that's what the actual problem..

    thanks in advance...

Reply Children
No Data
Related