MergEXT -How to stop scanning using MergBLE

This is the place to get technical support and discuss all things to do with MergEXT

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, monte

Post Reply
michaeldaleyjl
Posts: 4
Joined: Thu Feb 11, 2016 2:49 am

MergEXT -How to stop scanning using MergBLE

Post by michaeldaleyjl » Thu Feb 11, 2016 3:41 am

Started scanning with mergBLEScanForPeripheralsWithServices.
Tried stopping the scan with mergBLEStopScanningForPeripherals, but the scanning continues.

What am I doing wrong?

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: MergEXT -How to stop scanning using MergBLE

Post by monte » Fri Feb 12, 2016 5:04 am

That's a good question...

One thing to consider is there are various asynchronous things going on here so the call to stop the scan may happen while there are some mergBLEDidDiscoverPeripheral messages in the pipeline so they may come in after. So one thing to test is if it stops eventually rather than immediately.

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

michaeldaleyjl
Posts: 4
Joined: Thu Feb 11, 2016 2:49 am

Re: MergEXT -How to stop scanning using MergBLE

Post by michaeldaleyjl » Fri Feb 12, 2016 2:57 pm

Monte....after 30 minutes, the scanning continues and my observation is it does not stop. I need a way to stop it, to start a new scan with different UUIDs, so i was relying on it stopping. It appears that the stop scanning is not working.

Do you have an function that is opposite of the Initialize function that could be used to stop all activities immediately?

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: MergEXT -How to stop scanning using MergBLE

Post by monte » Mon Feb 15, 2016 2:57 am

Hmm... OK... have you checked if it is throwing an error?

Code: Select all

try
  mergBLEStopScanningForPeripherals
catch e
  answer e
end try
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

michaeldaleyjl
Posts: 4
Joined: Thu Feb 11, 2016 2:49 am

Re: MergEXT -How to stop scanning using MergBLE

Post by michaeldaleyjl » Tue Feb 16, 2016 2:41 pm

Monte,
No error thrown in the call.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: MergEXT -How to stop scanning using MergBLE

Post by monte » Wed Feb 17, 2016 2:19 am

OK, this is intriguing... I'll look into it
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

michaeldaleyjl
Posts: 4
Joined: Thu Feb 11, 2016 2:49 am

Re: MergEXT -How to stop scanning using MergBLE

Post by michaeldaleyjl » Tue Mar 01, 2016 4:07 pm

Any news on this one?

Post Reply

Return to “MergEXT”