btleOpen()

Opens access to the given device (by its address) and returns the list of services offered by the remote device.

Synopsis

int btleOpen(string address, dyn_mapping &services [, string adapter]);

Parameters

Parameter Meaning
address The address of the device
services The mapping has the keys
"uuid" (string) service uuid in the format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
"name" (string) the name of the service
adapter

The optional adapter address.

By default or when the string is empty, the default adapter is used.

Return Value

On success it returns 0, on illegal arguments -1, on error one of the following:

  • 1 ... UnknownError
  • 2 ... UnknownRemoteDeviceError
  • 3 ... NetworkError
  • 4 ... InvalidBluetoothAdapterError
  • 5 ... ConnectionError

Description

Opens access to the given device (by its address) and returns the list of services offered by the remote device.

Assignment

Mobile UI control functions

Availability

UI