mergBLE usage

Brian Milby brian at
Sun Apr 22 14:07:39 EDT 2018

I’m guessing you have a card that when you open it will initiate a look for
available connections. You have the appropriate handlers in place that work
if one is found. Now you want the card to not wait forever though?

If that is the case, there are a couple threads on the forum that may help:

When you initialize the card, you need to start a process that checks for
an active connection. If time runs out before a connection is made then
call the exception routine. If a connection is made, cancel the check
process. Here is an example from the other threads:

(Not exact since in that case a device had already been discovered and it
was waiting on a reply message.)
On Sun, Apr 22, 2018 at 10:16 AM Douglas Ruisaard via use-livecode <
use-livecode at> wrote:

> Monte... or anyone else brave enough to contribute :-) (no colored emoji,
> sorry) ...
> Is there a way to time out the attempted connection to a BLE device using
> the mergBLE functions.  I can't seem to find a command which doesn't need a
> peripheral UUID  ... like "mergBLEConnectPeripheral pPeripheral" ...  which
> has a corresponding "fail" message: "mergBLEDidFailToConnectPeripheral
> pPeripheral, pError " ... or can I use this command/message combo in some
> way to look for a BLE device and if not present (or if NO BLE device is
> present / active), timeout and fail?  I need my LC code to be able to
> detect whether a BLE device is present and if not "move on" ... right now,
> my modified code, taken from the example mergBLE script, just waits forever
> for a peripheral which may never appear.
> Thanks in advance
> Doug
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list