2 Replies Latest reply on May 25, 2017 1:39 PM by DheerajDake

    How do put the CYBLE-012011 module in broadcaster and observer at the same time?

    DheerajDake

      Hello,
      I have CYBLE-012011 evaluation board and I want my BLE chip to perform the role of broadcaster and receiver at the same time. When the BLE starts, it will be in observer mode(continuously scanning). Now the BLE chip receive data over the UART and then upon receiving the data it should send the data as a beacon. 

      I was able to set my BLE chip in broadcaster or receiver mode. But I was unable to do both at the same time. I followed instructions from this previous forum comment, but it didn't work. I have attached my project in the attachments.

         

      Thanks
      Dheeraj

        • 1. Re: How do put the CYBLE-012011 module in broadcaster and observer at the same time?
          anpm

          Hi Dheeraj,

             

          Attached is an example project for acting as Broadcaster and Observer at the same time.

             

          Logic:

             

          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.

             

          cyBle_discoveryInfo.discProcedure=CYBLE_GAPC_OBSER_PROCEDURE;

             

          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,
          Anjana

          • 2. Re: How do put the CYBLE-012011 module in broadcaster and observer at the same time?
            DheerajDake

            Hello Anjana,
            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.

            Thank you
            Dheeraj