Thank you for you response, but I think I did not convey my question clearly. What I am trying to do is, advertise and scan for other advertising devices at the same time. In other words, I want my device to be in observer and broadcaster GAP roles at the same time.
Following is the flow of my function calls:
1. App_StartAdvertising(BleApp_AdvertisingCallback, NULL); This works and advertising starts. I can see non connectable adverts on the other device.
2. App_StartScanning(scanningParameters, scanningCallback, enableFilterDuplicates, duration, period); this one returns gBleSuccess_c, but immediagtly afterwards I get gHciCommandDisallowed_c event in scanningCallback function.