Adapters

SimpleBLE.set_callback_on_power_onFunction
set_callback_on_power_on(callback, adapter)
set_callback_on_power_on(adapter) do
	# Stuff
end

Set a callback that is called when an adapter is powered on.

source
SimpleBLE.set_callback_on_power_offFunction
set_callback_on_power_off(callback, adapter)
set_callback_on_power_off(adapter) do
	# Stuff
end

Set a callback that is called when an adapter is powered off.

source
SimpleBLE.scan_startFunction
scan_start(adapter)

Start scanning for peripherals. Results can be acquired with scan_get_results. Or check each peripheral found or updated inside a callback set by set_callback_on_scan_found

See also scan_stop, scan_for

source
SimpleBLE.scan_forFunction
scan_for(adapter, timeout_ms)

Scan for a specified number of ms. Results can be acquired with scan_get_results. Or check each peripheral found or updated inside a callback set by set_callback_on_scan_found

See also scan_start, scan_stop

source