I am developing GATT Server Reader Firmware usng nRF SDK COnnect using NRF52840
I have implemented two services in reader FW in two files say: service_a.c and service_b.c
Both files have their respective GATT attribute table.
Both have their advertisement packet defined but only one is advertised based on user input.
Example scenario : Reader is advertising service a, when user inputs 1 to reader.
Reader changes its advertisement to service b, when user inputs 2 to reader.
Now, when user enters 1, mobile sees service a advertisement and it connects with reader.
Problem is .. when Mobile connects with Reader .. it sees service a as well as service b both !!
How do i only expose service a when connected via service a advertisement and not the other ?
Example declaration of my both services in seperate files