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

multilink [ble_app_uart] - [ble_app_multilink_central](3)

OS :Windows7
HARD :(Taiyo Yuden)EBSHSN Series Evaluation Board
CPU :(Nordic) nRF52832 / ARMRegistered CortexTm-M4F 32 bit processor 28-pin Land Grid Array / 15GPIOs / SWD
Soft Ver:nRF5_SDK_15.0.0_a53641a

Using [ble_app_multilink_central] and [ble_app_uart_c], I created a program that performs multi-link UART communication, but immediately after the first peripheral was linked
Error 0x011 will be issued.
Please tell me the possible causes.
Thanking you in advance.


Parents
  • Hi.

    This error happend because you use the two API's app_button_enable() and app_button_disable() without initializing the app_button API.

    When you find the device Nordic_UART your code goes to the BLE_NUS_C_EVT_DISCOVERY_COMPLETE case in line 243 and calls app_button_enable(), which is not initialized and the error occurs.

    If you want to use this API call you should call the app_button_init(), maybe like this:

    If not, remove this on line 245 and 246:

                err_code = app_button_enable();
                APP_ERROR_CHECK(err_code);

    And remove this on line 353 and 354:

                    err_code = app_button_disable();
                    APP_ERROR_CHECK(err_code);

    Best regards.

    Andreas

  • 1) Button detection is unnecessary, so I deleted "app_button_enable ()" "app_button_disable ()", but it did not improve.
    2) I created the one with the button detection enabled and checked the operation, but I did not improve it.
    3) Since the timing at which an error occurs is after detecting a peripheral, I think that it is related to communication operation or communication setting, is there any problem?
    4) In the current situation, debugging was performed with a program with button detection, but since 0x08 error occurred in "error_error_handler_bare-> error_info-> err_cord" in error setting,
    We are restricting the function and debugging is done only with necessary multi-connection UART communication.
    Attach register information at error occurrence.
    Thank you.
  • Hi.

    I'm not able to recreate this error, my project, both with and without buttons run fine, as you can see below:

    Without buttons in the code:

    With buttons in the code:

    Can you try to run my project when I have buttons included and when I dont have buttons included?

    Download here: my two projects.zip

    Both project must be placed in the ble_central folder, with the following path:

    nRF5_SDK_15.0.0_a53641a\examples\ble_central

    Best regards.

    Andreas

  • With a program confirmed by Andreas, only one peripheral can be connected.
    When setting to connect two peripherals, error 0x011 will be generated.
    Change point of "sdk_config.h"
    1)#define BLE_ADVERTISING_ENABLED 1
    2)#define APP_USBD_CONFIG_EVENT_QUEUE_SIZE 64
    3)#define NRF_FSTORAGE_ENABLED 1
    4)#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 2
    5)#define NRF_SDH_BLE_TOTAL_LINK_COUNT 2
    Attach "sdk_config.h" file.
    0576.sdk_config.h
    Thanking you in advance.
    [Additional notes]
    • An error occurs when waiting for the second peripheral to be detected.
    · If two peripherals are connected, an error will not occur.
     
  • Hi again.

    yokokawa said:
    When setting to connect two peripherals, error 0x011 will be generated.

     Where did you get this error? Can you debug and see where this error occurs?

     

    yokokawa said:
    When setting to connect two peripherals, error 0x011 will be generated.
    yokokawa said:
    · If two peripherals are connected, an error will not occur. 

     I'm a bit confused by this, "When setting to connect peripherals, error 0x011 will be generated", but "if two peripherals are connected, an error will not occur."

    Can you please explain more?

    Best regards.

    Andreas

  • 【Reply】
    1. After connecting one peripheral to the central, an error has occurred after executing "scan_start ()" with "BLE_GAP_EVT_CONNECTED:" in "ble_evt_handler ()" for the next peripheral detection.
    Note: Because we are using "EBSHSN Series Evaluation Board (Taiyo Yuden)", we can not confirm LOG because SWO is not connected to J-Link.

    2. Describe the operation when using the attached "sdk_config.h".
     1) ERROR will not occur if only Central is started.
     2) If one peripheral is started after starting central, an error will occur.
     3) Starting Central after starting one peripheral will result in an error.
     4) After starting two peripherals, if you start Central, it will operate normally.

      * It seems that an error occurs during detection of the second peripheral after Central has recognized one peripheral.

    Thanking you in advance.sdk_config.zip
Reply
  • 【Reply】
    1. After connecting one peripheral to the central, an error has occurred after executing "scan_start ()" with "BLE_GAP_EVT_CONNECTED:" in "ble_evt_handler ()" for the next peripheral detection.
    Note: Because we are using "EBSHSN Series Evaluation Board (Taiyo Yuden)", we can not confirm LOG because SWO is not connected to J-Link.

    2. Describe the operation when using the attached "sdk_config.h".
     1) ERROR will not occur if only Central is started.
     2) If one peripheral is started after starting central, an error will occur.
     3) Starting Central after starting one peripheral will result in an error.
     4) After starting two peripherals, if you start Central, it will operate normally.

      * It seems that an error occurs during detection of the second peripheral after Central has recognized one peripheral.

    Thanking you in advance.sdk_config.zip
Children
  • Hi.

    I am not able to recreate your error.

    Can you please provide me with your whole project so I can try?

    If you wish, I can make this ticket private so that you can share your project.

    Best regards,

    Andreas

  • 【Reply】
    1) I was developing in the environment under the keil environment, but I decided that Mr. Andreas' development environment is Segger and confirmed it in the Segger environment.
    "RAM start" and "Maximum RAM" appear to be incorrect, but please do not know how to set it.
    Attachment: Debug Terminal_01.png
    2) I will attach my current development environment.
    Attachment: Yokokawa_project_181210.zip
    Thanking you in advance.

    Yokokawa_project_181210.zip

  • Hi again.

    Segger Embedded Studio uses Section Placement Macros for defining the RAM and FLASH memory. RAM_START is the macro used for the RAM start address and FLASH_START is the macro used for the FLASH start address. You can easily configure the values in Segger Embedded Studio doing the following steps:

    1. Open your project in Segger Embedded Studio
    2. Right click on the Project folder
    3. Select Edit Options...
    4. Select the Common configuration
    5. Click on Linker
    6. Double click on Section Placement Macros
    7. Edit the value RAM_START to 0x20003730, and click OK, and Click OK on the Options window

    Best regards,

    Andreas

  • 【Reply】
    1) The occurrence of error 0x011 (17) in program execution could not be improved.
    2) When one peripheral is used, an error has occurred in [err_code = ble_nus_c_tx_notif_enable (p_ble_nus_c)] (3) of [ble_nus_c_evt_handler ()].
    3) I think that it is caused by executing [err_code = ble_nus_c_tx_notif_enable (p_ble_nus_c)] (3) twice when one peripheral is connected, but since we do not know how to improve it, do it for each peripheral connection Please tell me how to do it or how it will not result in an error.
    4) Attach log (1) of one peripheral connection and log (2) of connection of two peripherals.

    (1)Debug Terminal_02.png
    (2)Debug Terminal_03.png
    (3)Error occurrence line.txt

    Thanking you in advance.

  • Hi.

    This is because of the API sd_ble_gattc_write():

    Try to modify your ble_nus_c_evt_handler() like this:

    This should work.

    Best regards,

    Andreas