HI,
I am developing a device that acts as both a peripheral and central device. This is working ok together, but I have one thing I cannot figure out. I separated central and peripheral parts into separate files. Both have their own callbacks (for connecting and disconnecting). My problem is when a connection occurs where my device is central, the peripheral connection callback is called as well, and bt_conn is then associated with the wrong connection, central instead of peripheral.
The other way is not that problem since the central has an additional callback that occurs when scan connection occurs...
What is the best way to distinguish central and peripheral connections? so that each gets its own correct `bt_conn`
Best regards,
Vojislav