3 Replies Latest reply on Nov 2, 2017 7:57 AM by e.pratt_1639216

    BLE PROC Module Peripheral and Observer

    vojislav.mokric_1616151

      Hi,

       

      I have mobile App (Central GAP role, let's call it device_A) that should connect to another embedded device (let's call it device_B) with BLE PROC module (CYBLE-022001-00) in Peripheral GAP mode. However, there is another device (let's call it device_C), namely another CYBLE-022001-00 module that will act as a iBeacon (Broadcaster GAP role).

       

      My device_B should advertise so that device_A can initiate a connection with it. However, my device_B can function without ever being connected to the device_A (this is just to enhance user experience by having better user interface). Still, my device_B needs to know if it is near the device_C. If it is near it (if it sees its advertising packets) than additional features will be possible to use. As I understand, device_B (being in Peripheral mode) can't advertise and scan at the same time. So, is it possible for me to have some kind of round-robin mechanism that will switch device_B from Peripheral mode (advertising so that mobile App can connect with it) to Observer mode (I guess it should be Observer mode, or maybe Central mode, I'm not sure) so that it can listen to device_C? Is this good approach, or is there something better?

       

      Thanks,

      Vojislav

        • 1. Re: BLE PROC Module Peripheral and Observer
          e.pratt_1639216

          According to this thread: Simultaneously advertise and scan

          You can send and receive packets at the same time, just not advertising with connectivity.

          Otherwise, doing a time-multiplexed approach like you suggested is possible and feasible, but would have some lag-time for discovering the device based on the time it takes for switching between the two modes and how long it is scanning vs advertising.

          (duty cycle comes to mind).

          Depending on if your device B is moving, you could set it to only scan once every x seconds/minutes/hours for the ibeacon; This would limit downtime for advertising to device A.

          To implement both scanning and advertising you would need to set your device to the central and peripheral mode to be able to round-robin/switch between the two.

          • 2. Re: BLE PROC Module Peripheral and Observer
            vojislav.mokric_1616151

            Hello Pratt,

            Many thanks for the prompt reply.

             

            I understand the the round robin mechanism needed to switch from Central to Peripheral, although I haven't tried it yet. This could be one approach to solve my case.

             

            Still, to simplify my question maximally: If BLE device is connected - is it possible for that device to still perform scanning (passive or active) in order to receive info from surrounding beacons?

             

            P.S. I'm not sure someone else should mark answer as a correct one, although I agree that it is a correct and helpful one, but still...

            • 3. Re: BLE PROC Module Peripheral and Observer
              e.pratt_1639216

              Hello Vojislav,

              You're welcome.

              No. Since you have to stop scanning in order to initiate a connection with a device, I would say that once a device has an active connection working, it can no longer do any scanning. You would not be able to perform scanning while connected to another device in a connection. You can however, transmit broadcast messages while connected; according to this thread: http://origin-www.cypress.com/forum/psoc-4-ble/gap-profiles-broadcast-observer

               

              P.S. The only ones who can mark other's answers as correct are cypress employees. It is possible to mark multiple answers correct if I am not mistaken.

               

              Epratt

              1 of 1 people found this helpful