nRF5340 errors in multi-NUS central

Hello,

I am developing a gateway to manage 10 peripherals which are vibration sensors. The exchange protocol is a NUS service.

In fact I adapted the multi-NUS example for the nRF Connect SDK v2.4.0 based on the central_uart sample : everything works fine with the nRF52840-DK and nRF21540-DK boards.

By loading the application on an nRF5240-DK board I get an error message as soon as a 2nd device tries to connect :

[00:00:00.282,836] <inf> central_uart: main: Scanning successfully started <CR><LF>
[00:00:01.925,354] <inf> central_uart: scan_filter_match: Filters matched. Address: E4:84:7F:14:89:26 (random) connectable: 0. RSSI -43 <CR><LF>
[00:00:02.929,779] <inf> central_uart: connected: Connected: E4:84:7F:14:89:26 (random)<ESC> <CR><LF>
[00:00:02.929,870] <inf> central_uart: connected: NUS Client module initialized <CR><LF>
[00:00:03.081,115] <inf> central_uart: exchange_func: MTU exchange done <CR><LF>
[00:00:03.781,097] <inf> central_uart: discovery_complete: Service discovery completed <CR><LF>
[00:00:03.785,736] <inf> central_uart: discovery_complete: Scanning started <CR><LF>
[00:00:03.785,980] <inf> central_uart: discovery_complete: Sent to server 0: [0] <CR><LF>
<CR><LF>
[00:00:15.579,956] <inf> central_uart: scan_filter_match: Filters matched. Address: EC:DB:C1:5E:6E:2E (random) connectable: 0. RSSI -50 <CR><LF>
[00:00:15.581,909] <wrn> bt_hci_core: bt_hci_cmd_send_sync: opcode 0x200d status 0x09 <CR><LF>
[00:00:15.582,000] <wrn> central_uart: scan_connecting_error: Connecting failed <CR><LF>

Can anyone help me, thanks a lot in advance.

Parents
  • Hello again,

    I found a solution that works!

    taking Laird CP's BLE_gateway_Firmware application as an example, I modified the child_image/hci_rpmsg.conf file like this:

    #
    # Copyright (c) 2021 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #

    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
    CONFIG_BT_BUF_ACL_RX_SIZE=502
    CONFIG_BT_BUF_ACL_TX_SIZE=502

    CONFIG_BT_MAX_CONN=10

    #-------------------------------------

    CONFIG_RPMSG_SERVICE=y
    CONFIG_RPMSG_SERVICE_MODE_REMOTE=y

    CONFIG_HEAP_MEM_POOL_SIZE=8192

    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_MAX_CONN=4
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    CONFIG_BT_HCI_RAW_RESERVE=1

    CONFIG_ASSERT=y
    CONFIG_DEBUG_INFO=y
    CONFIG_EXCEPTION_STACK_TRACE=y

    I don't know which CONF_... are really essential but it works.

    Good luck from France to all developers ...

  • Hi, 
    I think most likely it's CONFIG_BT_MAX_CONN=4 needed. 
    It's because you need to configure the hci_rpmsg child image so that it will be flashed on the netcore of the NRF53 (the BLE controller). 
    On the nRF52 there is no netcore and the configuration is automatically added to the BLE controller when you configure the application. 
    opcode 0x200d = LE Create Connection

Reply
  • Hi, 
    I think most likely it's CONFIG_BT_MAX_CONN=4 needed. 
    It's because you need to configure the hci_rpmsg child image so that it will be flashed on the netcore of the NRF53 (the BLE controller). 
    On the nRF52 there is no netcore and the configuration is automatically added to the BLE controller when you configure the application. 
    opcode 0x200d = LE Create Connection

Children
Related