Hello everyone! I am having some trouble in connecting two peripherals to a single central station.
As peripherals I'm using 2 nRF5340DK flashed with the UART-Peripheral Sample. I just have changed the Device Name for each of them.
As central, I'm using a nRF7002DK. I started from the ble_coex WiFi sample and I am actually able to pair without any problem my central to one of the peripheral. I changed the scan filter type from UUID to Device Name so even at the moment I can forget about the Service layer(I'll need to implement my own later).
My goal is to also have connected the second peripheral, and I was looking at the multi-NUS sample that I found online. I tried to adapt the code to my scenario in which I still don't want to deal with the right service.
The first peripheral connects fine, but as soon as I turn on the second one, It fails to connect to it, with the log giving to me the following error:
<wrn> bt_hci_core: opcode 0x200d status 0x0d
I have in my conf files the following settings regarding the available connections
CONFIG_BT_MAX_CONN=2 CONFIG_BT_MAX_PAIRED=2
And the curious thing is that if I use
struct bt_throughput *throughput = bt_conn_ctx_alloc(&conns_ctx_lib, conn); memset(throughput, 0, bt_conn_ctx_block_size_get(&conns_ctx_lib)); err = bt_throughput_init(throughput, &throughput_cb); err = bt_gatt_dm_start(default_conn, BT_UUID_THROUGHPUT, &discovery_cb, &throughput); if (err) { LOG_INF("Discover failed (err %d)", err); } size_t num_conns = bt_conn_ctx_count(&conns_ctx_lib); bt_conn_ctx_release(&conns_ctx_lib, (void *)throughput); LOG_INF("Number of connections: %d", num_conns);
in my connection callback, I read that when I turn on the first peripheral, the Number of connection is already 2. I'm wondering if that is related