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

Using the S130 alpha SD

I'm trying to test the throughput improvement of the S130 alpha softdevice vs S130 V1.

I notice a couple of changes in the API that I'm not sure how to handle:

First, ble_enable_params_t has changed and so has the number of arguments for sd_ble_enable. My old code looks like this:

ble_enable_params.gatts_enable_params.service_changed = false;
ble_enable_params.gap_enable_params.role              = BLE_GAP_ROLE_CENTRAL;
err_code = sd_ble_enable(&ble_enable_params);

There is no longer a "role" field and sd_ble_enable requires more arguments. Is there an example of how to call this?

Also, is there an existing define for the alpha release headers so I can protect the old code with an #ifndef S130_ALPHA or some such macro?

At this point I should also ask what other changes need to be made to the project in order to use the S130 alpha? All I've done so far is create a new folder for the new header files and changed the ble path in the project to point to that folder.

For example, is there anything I need to do to tell the SD to accept 3 packets per connection interval or is that automatic?

Parents
  • For an example of how to call sd_ble_enable, take a look at ble_stack_init() in the SDK examples. For your convenience, here it is:

    #if defined(S110) || defined(S130) || defined(S132)
        // Enable BLE stack.
        ble_enable_params_t ble_enable_params;
        memset(&ble_enable_params, 0, sizeof(ble_enable_params));
    #if (defined(S130) || defined(S132))
        ble_enable_params.gatts_enable_params.attr_tab_size   = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;
    #endif
        ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
        err_code = sd_ble_enable(&ble_enable_params);
        APP_ERROR_CHECK(err_code);
    #endif
    

    The macro S130 is defined in the preprocessor symbols, so you can add your old code inside an #ifdef S130_ALPHA and change the macro to S130_ALPHA to use old code.

    I don't have a complete overview of the changes, but they should be in the release notes located in the SoftDevice folder (zip file downloaded).

    As far as I know, you don't need to tell the SoftDevice to accept 3 packets per connection interval, this is automatic.

  • I'm using the s130 alpha which came with a new set of include files. Are those files backward compatible to s130 v1.0.0?

    As you say, the SDK 10 s130 examples work with s130 v1.0.0 out of the box, but they don't work with S130alpha and the S130alpha release notes don't give a clue about how to make them work.

Reply Children
No Data
Related