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

Need help to understand how to use FATFS with BLE

Hello,

I have a problem statement in which I have to generate a file for data that is received from UART communication and want to send it to the mobile application whenever the application connects to the device through BLE. 

So can anybody tell me which BLE service should I use? What are the file formats are there that are supported? How to use encryption similar to DFU OTA example code uses? 

  • Hi,

    I have a problem statement in which I have to generate a file for data that is received from UART communication and want to send it to the mobile application whenever the application connects to the device through BLE. 

    There is a FATFS example in the SDK (if you need it), but this is not related to BLE. There is no file transfer profile for BLE, so you will have to make your own implementation for that. But perhaps the focus on FATFS and "file" is necessary? Is it just that you want to transfer some data (which happens to be a file in a file system on the PC side)?

    So can anybody tell me which BLE service should I use?

    If we can ignore the file concept, perhaps you can use the nordic UART service? It is a simple service that can easily be used to transfer any data. Note that you will have to make an implementation for this service on the PC side, but that is the case no matter which service you go for. Alternatively, make your own custom service.

    What are the file formats are there that are supported?

    None our of the box. This is something you have to implement yourself.

    How to use encryption similar to DFU OTA example code uses? 

    The Nordic DFU bootloader does not use encryption, but it uses signed update images (where the bootloader does signature verification). If you just want encrypted communication, then you can just use pairing/bonding. If you want encryption of the data on the application layer then you have to implement that yourself, but you can use the functionality provided by nrf_crypto.

Related