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

Transferring data received over ble to sd card

Hi All,

I am working on pca10040, nrf52832 and s132. I am using ble_app_uart and sd card, where i want to transmit data received over ble to the sd card.

Can you help me with how can i do so?

I have the project ready where both sd card and ble functionalities are there. I am able to advertise and recieve data over ble as well as execute sample .txt data transmission over to sd card as demonstrated in fatfs example.

I want to know on how i can transmit the text received over ble to the sd card in a .txt file.

Thanks in advance, Regards

Parents
  • Hi,

    When using the ble_app_uart example, the data received over BLE can be handled in nus_data_handler. Here you should be able to write to the sd card in the same way done in the fatfs example, by replacing the parameter TEST_STRING and sizeof(TEST_STRING) in call to f_write with the received data from p_evt->params.rx_data.p_data and length from p_evt->params.rx_data.length.

    [EDIT]: Attached an example that combines ble_app_uart and the fatfs example, to write all strings received over NUS/BLE to SD Card. The example is written for SDK 14.0.0. Extract the zip in \examples\ble_peripheral\ directory.

    ble_app_uart_fatfs.zip

    ble_app_uart_fatfs_sdk141_keil_gcc_ses.zip

    Best regards,

    Jørgen

  • Hello Jorgen,

    I am very much happy with your help. Although i am using a free version of Keil5 due to which the code limit is 32k and the one you sent to me is exceeding it.

    I probably cannot fund to get a licensed version. Can u help me with the same problem in sdk14.1.0? with me using Segger Embedded Studio?

    Or maybe if it can be done on sdk 12.2.0 where code size remains lesser than 32k? I have been doing it on sdk12.2.0. I am attaching my zip file.

    ble_app_uart

    I appreciate your help.

    Thank You.

Reply
  • Hello Jorgen,

    I am very much happy with your help. Although i am using a free version of Keil5 due to which the code limit is 32k and the one you sent to me is exceeding it.

    I probably cannot fund to get a licensed version. Can u help me with the same problem in sdk14.1.0? with me using Segger Embedded Studio?

    Or maybe if it can be done on sdk 12.2.0 where code size remains lesser than 32k? I have been doing it on sdk12.2.0. I am attaching my zip file.

    ble_app_uart

    I appreciate your help.

    Thank You.

Children
No Data
Related