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

Sending data (BLE) to another board

I want to send data of different sizes from one board to another, using nRF52840. I have tried following the UART example, by using one board as Central and another Peripheral, but only the default example works, which is whatever I type shows up on the other board's terminal. But now I want to send actual data of different sizes. I have tried making an array with different values that are to be sent, but no output. I tried manually fillind data_array using for loop within the uart event handler, but nothing again. I'm not sure what I'm doing wrong. Any suggestions would be appreciated!

Parents
  • Hello,

    I tried manually fillind data_array using for loop within the uart event handler, but nothing again. I'm not sure what I'm doing wrong.

    The UART event handler will only be called when an UART event is generated.
    Instead, you could try to use the ble_nus_data_send function from somewhere else in the code, to see if you are not able to send the data this way.
    If you do not intend to use the UART in your application, you may remove it entirely from the application, and instead get the data you wish to transmit elsewhere.

    But now I want to send actual data of different sizes. I have tried making an array with different values that are to be sent, but no output.

    Do you know the format of this data? If you could be specific about what data you are looking to transfer then I might be able to help you more.

    Looking forward to hearing if you are able to get it to work as intended by calling the ble_nus_data_send function from somewhere else than the UART event handler! :) 

    Best regards,
    Karl

     

Reply
  • Hello,

    I tried manually fillind data_array using for loop within the uart event handler, but nothing again. I'm not sure what I'm doing wrong.

    The UART event handler will only be called when an UART event is generated.
    Instead, you could try to use the ble_nus_data_send function from somewhere else in the code, to see if you are not able to send the data this way.
    If you do not intend to use the UART in your application, you may remove it entirely from the application, and instead get the data you wish to transmit elsewhere.

    But now I want to send actual data of different sizes. I have tried making an array with different values that are to be sent, but no output.

    Do you know the format of this data? If you could be specific about what data you are looking to transfer then I might be able to help you more.

    Looking forward to hearing if you are able to get it to work as intended by calling the ble_nus_data_send function from somewhere else than the UART event handler! :) 

    Best regards,
    Karl

     

Children
No Data
Related