PSoc 4 + Observer - Cannot detect device already started

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Good day, 

   

I am currently working with the code from the Observer  in order to find devices which are in the vicinity of the the main board. My setup is the following: 

   

- A PSoc4 board (called main) with the Observer code running on it;

   

- 2 x PSoc4 boards with Peripheral and Broadcaster code running on them.

   

The Observer sees both devices without problem. However, I have to power them after the Observer runs. Is there a way for the Observer to notice them if they are already running?

   

I am trapping the event CYBLE_EVT_STACK_ON with the event handler and I start the scanning from there with the CYBLE_SCANNING_FAST parameter. The following is my Bluetooth module's configuration:

   
        
  • Discovery procedure: General
  •     
  • Scanning state: Active
  •     
  • Filter policy: All
  •     
  • Scan window: 50 ms
  •     
  • Scan interval: 100 ms
  •    
   

The profile is selected in the General Tab and the following is set:

   
        
  • Profile: Custom
  •     
  • Profile role: Client (GATT Client)
  •     
  • GAP role: Central
  •    
   

Besides that, nothing else has been modified from the original code. 

   

Thanks for your help. 

   

Regards,

   

MB

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

   

As soon as you start the scan in the observer, if you immediately get the scan progress results about those peripheral / broadcaster (i.e within a couple of advertising intervals of the periperhal / broadcaster boards) the there is a good chance that the boards are already running before the observer started. If they take some time, then you may assume that the broadcaster / peripheral  boards are started after the observer. You may use watchdog timers for the measurement.

   

Regards,

   

- Madhu Sudhan

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Hi,

   

As soon as you start the scan in the observer, if you immediately get the scan progress results about those peripheral / broadcaster (i.e within a couple of advertising intervals of the periperhal / broadcaster boards) the there is a good chance that the boards are already running before the observer started. If they take some time, then you may assume that the broadcaster / peripheral  boards are started after the observer. You may use watchdog timers for the measurement.

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

Good day, 

   

Thank you for the answer. Actually, my problem is not regarding the time it takes for the peripherals before they get detected, but the fact that they are not seen by the Observer at all. There is 2 scenarios here. 

   
        
  1. I power up the Observer and after I start the 2 peripherals. Everything works perfectly and the Observer detects both devices.
  2.     
  3. I power up the 2 peripherals and the Observer after. In that case, the Observer is unable to detect the 2 peripherals. 
  4.    
   

So, the problem is really scenario 2.

   

Regards,

0 Likes
Anonymous
Not applicable

Good day, 

   

Is there a specific configuration that should be modified from the original configuration provided by the Observer or should it be able to detect a device when it's booting up?

   

 

   

Regards,

0 Likes