This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

porting code for S110 to work with S310

Hi,

When porting code for S110 to work with S310, what modifications are required?

Thanks.

Parents
  • Here is what I did. The board I worked with was N5 Start Kit from Dynastream which had a nRF51422 inside. At first, I took the example code "ble_app_hrs" from nrf51_sdk_v6_0_0_43681\nrf51822\Board\pca10001\s110\ble_app_hrs. I also installed N5StarterKitSDK_1.00 which provided board abstraction codes for N5 Start Kit. I modified the project and code so that it worked well with IAR Embedded Workbench, N5 Start Kit and S110 v7.0.0 - I could see the Heart Rate Measurement value in Master Control Panel and change its value by buttons. Then, I supposed the code should worked well with S310 v1.0.0, I did the same modifications you showed above but in IAR EW. At first I got building error. image description

    The cause was these codes: // Enable BLE stack ble_enable_params_t ble_enable_params; memset(&ble_enable_params, 0, sizeof(ble_enable_params)); 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);

    Then I simply removed all these codes and built the code again. It worked.

    From this experience, it looks to me that porting code for S110 to work with S310 probably needs some code modification. I wonder if there is any other difference between S110 and S310 in the sense of application source code, maybe some differences which are not as explicit as this one.

  • I mean the S310 v1.0.0 is based on S210 v3.0.0 and S110 v6.0.0

Reply Children
No Data
Related