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.

  • Ok, I misunderstood your first question and thought you were going from alpha release to v1.0.0. I realize now that you are going from the v1.0.0 release to v2.0.0 alpha. I have made a quick walkthrough for the s132 v2.0.0 alphas here (it will be updated with a more in depth document). The procedure is the same for s130 v2.0.0 alphas, only the ROM and RAM size is different.

Reply Children
No Data
Related