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

How to trasnfer a text file over BLE from nrf52840 to smartphone?

Hi Everyone

Here is what i am trying to achieve with nrf52840 PDK , SDK15.0 And Segger Embedded Stuido

1. I want to create a text file with "HELLO WORLD!" in it.

2. I want to send this file over BLE using NUS to Smartphone and view the file on my smartphone.

How can this be done?

Thanks 

Rajat!

  • This is far too general a question for a complete answer, but here's the gist of it.

    You will need to receive this data on your smartphone, converting it to the format that you require for your file and write the file.

    I would suggest that you treat all data for the file as binary for the transfer process and then handle it accordingly. Text can be encoded in many ways e.g. UTF-8, UTF-16, UNICODE. You will need to implement your own "protocol" to handle files of different types, unless they are all the same.

    If you're adapting the NUS example then you will need to take the data received, in binary form, and write it to a file. 

    The simplest test is to send a file through the PC link to the DK board in a form that will be recognised by your smartphone, you will need to implement a process of naming the file to be stored, you can do this by asking the user to enter a name and location for the file before transfer starts.

  • HI 

    Thanks for the answer.

    Can i use the FATFS library for writing text file to the external QSPI memory on board nrf52840 PDK?

    If yes , how can i do that?

    Thanks!

  • You might be able to, although if it does work it will only be with a singular SPI and not QSPI.

    I would think that someone has tried this before, so best to search for QSPI on here.

Related