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

[SDK 10.0 Scanner Beacon] sd_ble_enable returns error 9

Using

  • IAR EWARM 7.20

  • PCA10001 V 2.0.0 (Changed the MCU to QFAAH00 Revision 3)

  • SDK 10.0

  • SoftDevice S110 8.0

  • J-Link Edu

  • Example: Scanner Beacon

(examples\ble_peripheral\experimental_ble_app_multiactivity_beacon\hrs_scanner)

/********************************************************************/

Hi, I'm using the PCA10001 board. This board had a revision 2 nRF51822 QFAA chip.

I replaced that chip to a QFAAH00 (0x0072) with a heat gun

to test SDK 10 and S110 8.0 codes.

I check with other examples, such as HRS and NUS, to check whether the board works

and it paired with my iPhone 6 plus's nRF Toolbox app with no problem.

After calling ble_stack_init,

the sd_ble_enable function returns error number 9, which means NRF_ERROR_INVALID_LENGTH.

NRF_ERROR_INVALID_LENGTH

Linker 1

Linker 2

Linker 3

I just migrated to SDK 10. I used SDK 7.2 in the past. So I hope I didn't make a mistake

about the Linker settings.

nRF Tool

Anyways, any ideas why sd_ble_enable returns error number 9?

-Best Regards, Mango922

Parents
  • Hi, RK. I said "I just migrated to SDK 10. I used SDK 7.2 in the past. So I hope I didn't make a mistake about the Linker settings.". I just wanted to ensure that I made a proper setting to cut down the problem.

    The point is that, at ble.h,

    /**@brief Enable the bluetooth stack
    @retval @ref NRF_ERROR_INVALID_STATE stack had already been initialized and cannot be reinitialized.
    @return @ref NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied.
    @retval @ref NRF_ERROR_INVALID_PARAM Invalid parameter supplied.
    

    the documentation does not describe why NRF_ERROR_INVALID_LENGTH is returned.

    I use S110 8.0. I didn't understand your instruction.

    Do you mean to add ble_enable_params.gatts_enable_params.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;?

    This shows compiler error since ble_gatts_enable_params_t doesn't have attr_tab_size.

Reply
  • Hi, RK. I said "I just migrated to SDK 10. I used SDK 7.2 in the past. So I hope I didn't make a mistake about the Linker settings.". I just wanted to ensure that I made a proper setting to cut down the problem.

    The point is that, at ble.h,

    /**@brief Enable the bluetooth stack
    @retval @ref NRF_ERROR_INVALID_STATE stack had already been initialized and cannot be reinitialized.
    @return @ref NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied.
    @retval @ref NRF_ERROR_INVALID_PARAM Invalid parameter supplied.
    

    the documentation does not describe why NRF_ERROR_INVALID_LENGTH is returned.

    I use S110 8.0. I didn't understand your instruction.

    Do you mean to add ble_enable_params.gatts_enable_params.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;?

    This shows compiler error since ble_gatts_enable_params_t doesn't have attr_tab_size.

Children
No Data
Related