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

Large data transfer over ble.

Hi,

I would like to have a system such as follows:

  • Taking sensor data storing it locally till around 100 samples (Once per second)
  • Log this data to the SD with a time stamp
  • Then storing this data to an external SD card. (Utilising the fatfs example code in the SDK) Around  2 Mbytes
  • I then want a mobile device to request this data.

What therefore, is the best way of transferring the data from the SD card to BLE to be picked up by the mobile application.

Do I need to set up a GATT connection and wait on a notification change that I set in the Nordic board?

If so is there an example of this or a good starting point.

Would this post be a good starting point? : https://devzone.nordicsemi.com/f/nordic-q-a/553/dealing-large-data-packet-s-through-ble

If so what example is good to work from. Thanks

Parents Reply Children
  • I get an error code on sd_ble_gap_disconnect

    err_code 3002. Is there somewhere I can look up these error codes?

  • I also sometimes get an error from m_event_handler(&app_uart_event); within a uart event handler in app_uart_fifo.c. In the case of NRF_DRV_UART_EVT_TX_DONE.  This error code is 1.

    I am thinking this is due to data being sent to the uart and it not being processed until the main loop is restarted.

    This error run from the:

    • main: advertising_mod: err_code = sd_ble_gap_adv_stop(m_adv_handle);
    • ble_gap.h: SVCALL(SD_BLE_GAP_ADV_STOP, uint32_t, sd_ble_gap_adv_stop(uint8_t adv_handle));
    • nrfx_uarte.c: uarte_irq_handler : p_cb->handler(&event, p_cb->p_context); //This is aborting the transfer
    • nrfx_uarte.c: uarte_evt_handler : m_handlers[inst_idx](&event, m_contexts[inst_idx]);
    • app_uart_fifo.c : uart_event_handler: m_event_handler(&app_uart_event)
    • Then app error handler_bare

    I do however get some data out before this error runs:

Related