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
  • Hi

    You need to change the advertising params to make the device connectable and (usually) scannable by changing the m_adv_params.properties.type to something like BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED.

    You can check out the ble_advertising_init function in ble_advertising.c to see the default advertising parameters used in most of the connectable examples in the SDK. Note that the gatts example uses the app_adv.c file to set up the advertising (where it again calls ble_advertising_init).

    Best regards,

    Simon

Reply
  • Hi

    You need to change the advertising params to make the device connectable and (usually) scannable by changing the m_adv_params.properties.type to something like BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED.

    You can check out the ble_advertising_init function in ble_advertising.c to see the default advertising parameters used in most of the connectable examples in the SDK. Note that the gatts example uses the app_adv.c file to set up the advertising (where it again calls ble_advertising_init).

    Best regards,

    Simon

Children
  • Oddly changing BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED to BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED

    Causes:

    err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);
    APP_ERROR_CHECK(err_code);

    To pass an error code 12.

    Also where is a look up table for error codes?

    Also is it possible to have a ble advert e.g. something that changes every second with data in it, whilst being connectable for other features?

Related