Hello, I have a two pronged question here:
1)
We are having some difficulty understanding how to control the scanning time on an observer (starting from Simple_Observer example).
We set interval and window to be the same so that we are always scanning, and that seems to work, but only with very specific scan duration values. If we set scan duration to 0, then it fails to continuously read (only reads a few packets then stops). Also if we set the value greater than 400ms, it also fails to update. This is counter intuitive as we thought scan duration is how long the device stays in scanning state.
Can someone advise on how scan duration works, and suggest a value (since 0 doesn’t work)? We want to scan forever, as fast as possible, as we have unlimited power for the observer, but not for the broadcaster, which needs to quickly push data and sleep at a fixed interval.
2)
We are also having trouble with the broadcaster. We set advertising interval too 500ms, and we generally see updates every 500ms on our observer, but sometimes it increases to 1s or more which seems like dropped packet(s). Having said that, we tried dropping broadcaster power by 11dBm and don’t see any increase in number of packets received, so we don’t think it’s RF related, but more likely the broadcaster is simply not transmitting sometimes.
The way we configured the broadcaster is using the Simple_Broadcaster example, and then we added a periodic event triggered by a clock. Within the main loop of SimpleBLEBroadcaster_taskFxn we watch for the periodic event and update the payload.
What we want to do is perform several ADC reads and serial communications to gather data and update the advertdata payload array once every five minutes. Then we want to push 5 identical packets containing the previously captured data every 200ms for 1 minute and then sleep until the next ADC read cycle (i.e. 4 mins – processing time). What is the best way to accomplish this? I.e. what GAP parameters should we be setting, and is a periodic task the recommended way to trigger our ADC and serial comms?