Is it possible to have two connections between two devices? One in each "direction"

Hi

We have a product that uses a nRF5x Soc. Is acts as both a central and peripheral. The central part connects to a pulseoxymeter, and the peripheral part allows an app to connect. Works fine.

But now we are creating some new test equipment, that was supposed to test both connections. On one hand, it should simulate an pulseoxymeter and on the other hand also connect as an app.

But the SDK (Version 2.9.0) is not happy about it. The bt_conn_le_create() returns with an -EINVAL/-22. and the debug trace says:

"W: Found valid connection (0x200026e0) with address E0:C6:2C:xx:xx:xx(random) in connected state"

Is there a way to over come this? Or is it fundamental that two devices cannot have two concurrent connections?

BR

Kasper

  • Hi Kasper,

    Great to hear that your product is working fine acting as a Central and a Peripheral at the same time! Bluetooth is indeed powerful and flexible.

    For two nodes to have two connections with eachother, is a very strange use case. Therefore, as it looks like when I look at the source code, Zephyr does not allow you to do that.

    You could perhaps spend time commenting out the relevant check in `conn_le_create_common_checks` in conn.c and see how far it gets you. But I think that is waste of time. 

    I think it is a much better idea to just use two development kits, one acting as a pulseoxymeter and another acting as an app. Connect these two to the same computer and write some application in Python or whatever so that you can coordinate the testing.

    Good luck!

Related