Advertisement flag non-connectable for BLE

I am building a project that involves Bluetooth Low Energy (core BLE). I would like to make it so multiple devices can scan and advertise to each other. However, I do not want these devices to actually connect.

I know I have to change the advertisement flag to nonconncetable. I am confused on where I would implement this change and how I would go about making it nonconnectable.

Any help would be appreciated. Thank you!

Best Regards