Library description for the NUS? (ble_nus.h)

Hello guys,

I am using the nRF52 DK.

I have to connect a spi sensor which is already made.

This part works. ("nrf_drv_spi.h" fyi)

I also have to store the info in the soc flash.

This part works also. ("nrf_fstorage_sd.h" fyi)

I am now trying to enable BLE with a communication with a central.

I have to transmit some buffer recorded in the soc flash. They can be quite big (512kB).

I think that I will use the NUS library to do this job. ("ble_nus.h" fyi)

Now I am wondering how I can send simple ble commands to the nRF52832 with some few parameters?

And how can the chip answer a full buffer stored in its flash over ble to the central?

Thanks for your help!

Parents
  • Hello,

    The ble_nus.h library can send messages from the peripheral to the central using ble_nus_data_send(). It takes a few parameters, such as a connection handle to the device you are connected to, a buffer pointer (this buffer needs to be in RAM), and a length (The length can not be 512kB). So what you need to do is to read out the flash, split it into smaller packets, and then transmit it over bluetooth. 

    Your question is either very vague, or very big. Have you experimented with bluetoothe low energy at all yet? Are you able to use the ble_nus.c/h?

    Best regards,

    Edvin

Reply
  • Hello,

    The ble_nus.h library can send messages from the peripheral to the central using ble_nus_data_send(). It takes a few parameters, such as a connection handle to the device you are connected to, a buffer pointer (this buffer needs to be in RAM), and a length (The length can not be 512kB). So what you need to do is to read out the flash, split it into smaller packets, and then transmit it over bluetooth. 

    Your question is either very vague, or very big. Have you experimented with bluetoothe low energy at all yet? Are you able to use the ble_nus.c/h?

    Best regards,

    Edvin

Children
Related