StopScanning On BLE

I am able to scan and stop scanning when I wait for a couple of seconds to reconnect with the bluetoothLE extension. When I deconnect and fast reconnect the stop scanning doesn't stop. It is like it has too run for a certain time. Is that true?

scanning

This is how I am testing it.

scanning 2

Hello Dave

What do you mean by "fast reconnect"? Do you mean AutoReconnect? Or just nifty button tapping?

If your Clock Timer does not switch itself off, you should be able to measure the time required for scanning to stop. I must admit I have always assumed it would be nearly instant, but it does need some time to collate the Device List.

Tapping a button. The program doesn't stop soo that is an advantage. Making a list on the otherhand of all found devices is not that fast. But that's normal, if you need to find a devices that is advertising. Maybe I can make it faster by setting it to true on the other side. This could be the reason that he is waiting for a response and can not be stopped. Thanks for putting the light on. I will try it.

MyAdvertising->setScanResponse(false);

Problem solved! It was what we found out. Now it's working properly.

For the ini screen I had to do like you sad, I had too check it in the timer if it was connected and and try to set it off. Now it works for both cases.

1

2

If I set timer.enabled=false will it stop call the timer evry timer interval? And if I call.clock1.now still give me the current millies?

Yes.

Yes, if you pass it through the block that converts Instants to milliseconds.
Alternatively, use Clock1.SystemTime to get milliseconds (FROM 1970) directly.

The MyAdvertising->setScanResponse(true); was not soo good ide for the ini screen event. it doesn't connect at boot up. So I leave it turned off. The timed turn off on your advise is doing good.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.