Attached is an example project for acting as Broadcaster and Observer at the same time.
It is possible to do both broadcaster and observer at the same time.
In the BLE component, put the device in to Central and Peripheral GAP role.
Broadcaster settings to be noted:
Make the advertisement settings as:
Discovery mode: Non discoverable
Advertising: Non connectable undirected advertising
Observer settings to be noted:
To make the central in observer mode, add the below code in the CYBLE_EVT_STACK_ON event.
After this, call start scan API.
Call start advertising API also in stack on. Now the device will act both as broadcaster and observer.
Please go though it. You can adapt the logic for your application.
Thanks & Regards,
5255222_1892048.zip 4.0 MB
This is perfect. I was using CyBle_GapcStartScan(CYBLE_SCANNING_SLOW) instead of CyBle_GapcStartDiscovery(&cyBle_discoveryInfo). Now I was able to send a beacon as well as scan other devices.