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

Problem with nrf51-ble-app-temp

Goodmorning

I have few problem with this project. I took the source file from github.com/.../nrf51-ble-app-temp and I modified the main.c to use with S110 6.0.0, nRF51 SDK version 6.0.0 and nRF51822 Evaluation Kit (PCA10001) version 2.2.0. For temperature with the function sd_temp_get(&temp), I have an error code = 15 (forbidden operation-> Tried to write to or read from protected location). Furthermore, after I have put errorcode = 0, in the place of sd_temp_get(&temp) function and temp = 0, the PCA10001 seems to work, but I can not connect the EK to nRF Temp 2.0 app on my smart phone. So, there is something that I don't understand. Can you help me, please?

I remember you that I use Keil uVision 5.0 for compiling the project. Is there any setup to do in this development tool?

Thanks

P.A.

Parents
  • Hi John your suggestion was very helpful. With SDK 7.0.0 is necessary enable BLE with sd_ble_enable in ble_stack_init() function. I put below the code snippet:

    // 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);
    

    where IS_SRVC_CHANGED_CHARACT_PRESENT is defined in main.c like:

    #define IS_SRVC_CHANGED_CHARACT_PRESENT 0

    Now the EK device works fine with app nRF temp 2.0. on my smart phone

    Thank you very much

Reply
  • Hi John your suggestion was very helpful. With SDK 7.0.0 is necessary enable BLE with sd_ble_enable in ble_stack_init() function. I put below the code snippet:

    // 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);
    

    where IS_SRVC_CHANGED_CHARACT_PRESENT is defined in main.c like:

    #define IS_SRVC_CHANGED_CHARACT_PRESENT 0

    Now the EK device works fine with app nRF temp 2.0. on my smart phone

    Thank you very much

Children
Related