Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

chromex.app.bluetooth-low-energy

clj

The chrome.bluetoothLowEnergy API is used to communicate with Bluetooth Smart (Low Energy) devices using the

Generic Attribute Profile (GATT).

The chrome.bluetoothLowEnergy API is used to communicate with
Bluetooth Smart (Low Energy) devices using the

Generic Attribute Profile (GATT).

  * available since Chrome 37
  * https://developer.chrome.com/apps/bluetoothLowEnergy
raw docstring

api-tableclj

source

connectclj/smacro

(connect device-address)
(connect device-address properties)

Establishes a connection between the application and the device with the given address. A device may be already connected and its GATT services available without calling connect, however, an app that wants to access GATT services of a device should call this function to make sure that a connection to the device is maintained. If the device is not connected, all GATT services of the device will be discovered after a successful call to connect.

|device-address| - The Bluetooth address of the remote device to which a GATT connection should be opened. |properties| - Connection properties (optional).

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect.

Establishes a connection between the application and the device with the given address. A device may be already connected
and its GATT services available without calling connect, however, an app that wants to access GATT services of a device
should call this function to make sure that a connection to the device is maintained. If the device is not connected, all
GATT services of the device will be discovered after a successful call to connect.

  |device-address| - The Bluetooth address of the remote device to which a GATT connection should be opened.
  |properties| - Connection properties (optional).

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect.
sourceraw docstring

connect*cljs

(connect* config device-address properties)
source

create-characteristicclj/smacro

(create-characteristic characteristic service-id)

Create a locally hosted GATT characteristic. This characteristic must be hosted under a valid service. If the service ID is not valid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|characteristic| - The characteristic to create. |service-id| - ID of the service to create this characteristic for.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [characteristic-id] where:

|characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-characteristicId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createCharacteristic.

Create a locally hosted GATT characteristic. This characteristic must be hosted under a valid service. If the service ID is
not valid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the
bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

  |characteristic| - The characteristic to create.
  |service-id| - ID of the service to create this characteristic for.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [characteristic-id] where:

  |characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-characteristicId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createCharacteristic.
sourceraw docstring

create-characteristic*cljs

(create-characteristic* config characteristic service-id)
source

create-descriptorclj/smacro

(create-descriptor descriptor characteristic-id)

Create a locally hosted GATT descriptor. This descriptor must be hosted under a valid characteristic. If the characteristic ID is not valid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|descriptor| - The descriptor to create. |characteristic-id| - ID of the characteristic to create this descriptor for.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [descriptor-id] where:

|descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-descriptorId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createDescriptor.

Create a locally hosted GATT descriptor. This descriptor must be hosted under a valid characteristic. If the characteristic
ID is not valid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy
and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

  |descriptor| - The descriptor to create.
  |characteristic-id| - ID of the characteristic to create this descriptor for.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [descriptor-id] where:

  |descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-descriptorId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createDescriptor.
sourceraw docstring

create-descriptor*cljs

(create-descriptor* config descriptor characteristic-id)
source

create-serviceclj/smacro

(create-service service)

Create a locally hosted GATT service. This service can be registered to be available on a local GATT server. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|service| - The service to create.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [service-id] where:

|service-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-serviceId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createService.

Create a locally hosted GATT service. This service can be registered to be available on a local GATT server. This function
is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The
peripheral permission may not be available to all apps.

  |service| - The service to create.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [service-id] where:

  |service-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-serviceId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-createService.
sourceraw docstring

create-service*cljs

(create-service* config service)
source

disconnectclj/smacro

(disconnect device-address)

Closes the app's connection to the device with the given address. Note that this will not always destroy the physical link itself, since there may be other apps with open connections.

|device-address| - The Bluetooth address of the remote device.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect.

Closes the app's connection to the device with the given address. Note that this will not always destroy the physical link
itself, since there may be other apps with open connections.

  |device-address| - The Bluetooth address of the remote device.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect.
sourceraw docstring

disconnect*cljs

(disconnect* config device-address)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-characteristicclj/smacro

(get-characteristic characteristic-id)

Get the GATT characteristic with the given instance ID that belongs to the given GATT service, if the characteristic exists.

|characteristic-id| - The instance ID of the requested GATT characteristic.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic.

Get the GATT characteristic with the given instance ID that belongs to the given GATT service, if the characteristic
exists.

  |characteristic-id| - The instance ID of the requested GATT characteristic.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic.
sourceraw docstring

get-characteristic*cljs

(get-characteristic* config characteristic-id)
source

get-characteristicsclj/smacro

(get-characteristics service-id)

Get a list of all discovered GATT characteristics that belong to the given service.

|service-id| - The instance ID of the GATT service whose characteristics should be returned.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics.

Get a list of all discovered GATT characteristics that belong to the given service.

  |service-id| - The instance ID of the GATT service whose characteristics should be returned.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics.
sourceraw docstring

get-characteristics*cljs

(get-characteristics* config service-id)
source

get-descriptorclj/smacro

(get-descriptor descriptor-id)

Get the GATT characteristic descriptor with the given instance ID.

|descriptor-id| - The instance ID of the requested GATT characteristic descriptor.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor.

Get the GATT characteristic descriptor with the given instance ID.

  |descriptor-id| - The instance ID of the requested GATT characteristic descriptor.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor.
sourceraw docstring

get-descriptor*cljs

(get-descriptor* config descriptor-id)
source

get-descriptorsclj/smacro

(get-descriptors characteristic-id)

Get a list of GATT characteristic descriptors that belong to the given characteristic.

|characteristic-id| - The instance ID of the GATT characteristic whose descriptors should be returned.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors.

Get a list of GATT characteristic descriptors that belong to the given characteristic.

  |characteristic-id| - The instance ID of the GATT characteristic whose descriptors should be returned.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors.
sourceraw docstring

get-descriptors*cljs

(get-descriptors* config characteristic-id)
source

get-included-servicesclj/smacro

(get-included-services service-id)

Get a list of GATT services that are included by the given service.

|service-id| - The instance ID of the GATT service whose included services should be returned.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices.

Get a list of GATT services that are included by the given service.

  |service-id| - The instance ID of the GATT service whose included services should be returned.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices.
sourceraw docstring

get-included-services*cljs

(get-included-services* config service-id)
source

get-serviceclj/smacro

(get-service service-id)

Get the GATT service with the given instance ID.

|service-id| - The instance ID of the requested GATT service.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService.

Get the GATT service with the given instance ID.

  |service-id| - The instance ID of the requested GATT service.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService.
sourceraw docstring

get-service*cljs

(get-service* config service-id)
source

get-servicesclj/smacro

(get-services device-address)

Get all the GATT services that were discovered on the remote device with the given device address.Note: If service discovery is not yet complete on the device, this API will return a subset (possibly empty) of services. A work around is to add a time based delay and/or call repeatedly until the expected number of services is returned.

|device-address| - The Bluetooth address of the remote device whose GATT services should be returned.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices.

Get all the GATT services that were discovered on the remote device with the given device address.Note: If service
discovery is not yet complete on the device, this API will return a subset (possibly empty) of services. A work around is
to add a time based delay and/or call repeatedly until the expected number of services is returned.

  |device-address| - The Bluetooth address of the remote device whose GATT services should be returned.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices.
sourceraw docstring

get-services*cljs

(get-services* config device-address)
source

notify-characteristic-value-changedclj/smacro

(notify-characteristic-value-changed characteristic-id notification)

Notify a remote device of a new value for a characteristic. If the shouldIndicate flag in the notification object is true, an indication will be sent instead of a notification. Note, the characteristic needs to correctly set the 'notify' or 'indicate' property during creation for this call to succeed. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|characteristic-id| - The characteristic to send the notication for. |notification| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-notifyCharacteristicValueChanged-notification.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-notifyCharacteristicValueChanged.

Notify a remote device of a new value for a characteristic. If the shouldIndicate flag in the notification object is true,
an indication will be sent instead of a notification. Note, the characteristic needs to correctly set the 'notify' or
'indicate' property during creation for this call to succeed. This function is only available if the app has both the
bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available
to all apps.

  |characteristic-id| - The characteristic to send the notication for.
  |notification| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-notifyCharacteristicValueChanged-notification.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-notifyCharacteristicValueChanged.
sourceraw docstring

notify-characteristic-value-changed*cljs

(notify-characteristic-value-changed* config characteristic-id notification)
source

on-characteristic-read-request*cljs

(on-characteristic-read-request* config channel & args)
source

on-characteristic-value-changed*cljs

(on-characteristic-value-changed* config channel & args)
source

on-characteristic-write-request*cljs

(on-characteristic-write-request* config channel & args)
source

on-descriptor-read-request*cljs

(on-descriptor-read-request* config channel & args)
source

on-descriptor-value-changed*cljs

(on-descriptor-value-changed* config channel & args)
source

on-descriptor-write-request*cljs

(on-descriptor-write-request* config channel & args)
source

on-service-added*cljs

(on-service-added* config channel & args)
source

on-service-changed*cljs

(on-service-changed* config channel & args)
source

on-service-removed*cljs

(on-service-removed* config channel & args)
source

read-characteristic-valueclj/smacro

(read-characteristic-value characteristic-id)

Retrieve the value of a specified characteristic from a remote peripheral.

|characteristic-id| - The instance ID of the GATT characteristic whose value should be read from the remote device.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue.

Retrieve the value of a specified characteristic from a remote peripheral.

  |characteristic-id| - The instance ID of the GATT characteristic whose value should be read from the remote device.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue.
sourceraw docstring

read-characteristic-value*cljs

(read-characteristic-value* config characteristic-id)
source

read-descriptor-valueclj/smacro

(read-descriptor-value descriptor-id)

Retrieve the value of a specified characteristic descriptor from a remote peripheral.

|descriptor-id| - The instance ID of the GATT characteristic descriptor whose value should be read from the remote device.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue.

Retrieve the value of a specified characteristic descriptor from a remote peripheral.

  |descriptor-id| - The instance ID of the GATT characteristic descriptor whose value should be read from the remote
                    device.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue.
sourceraw docstring

read-descriptor-value*cljs

(read-descriptor-value* config descriptor-id)
source

register-advertisementclj/smacro

(register-advertisement advertisement)

Create an advertisement and register it for advertising. To call this function, the app must have the bluetooth:low_energy and bluetooth:peripheral permissions set to true. Additionally this API is only available to auto launched apps in Kiosk Mode or by setting the '--enable-ble-advertising-in-apps' command-line switch. See https://developer.chrome.com/apps/manifest/bluetooth Note: On some hardware, central and peripheral modes at the same time is supported but on hardware that doesn't support this, making this call will switch the device to peripheral mode. In the case of hardware which does not support both central and peripheral mode, attempting to use the device in both modes will lead to undefined behavior or prevent other central-role applications from behaving correctly (including the discovery of Bluetooth Low Energy devices).

|advertisement| - The advertisement to advertise.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [advertisement-id] where:

|advertisement-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-advertisementId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-registerAdvertisement.

Create an advertisement and register it for advertising. To call this function, the app must have the bluetooth:low_energy
and bluetooth:peripheral permissions set to true. Additionally this API is only available to auto launched apps in Kiosk
Mode or by setting the '--enable-ble-advertising-in-apps' command-line switch. See
https://developer.chrome.com/apps/manifest/bluetooth Note: On some hardware, central and peripheral modes at the same time
is supported but on hardware that doesn't support this, making this call will switch the device to peripheral mode. In the
case of hardware which does not support both central and peripheral mode, attempting to use the device in both modes will
lead to undefined behavior or prevent other central-role applications from behaving correctly (including the discovery of
Bluetooth Low Energy devices).

  |advertisement| - The advertisement to advertise.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [advertisement-id] where:

  |advertisement-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-callback-advertisementId.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-registerAdvertisement.
sourceraw docstring

register-advertisement*cljs

(register-advertisement* config advertisement)
source

register-serviceclj/smacro

(register-service service-id)

Register the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|service-id| - Unique ID of a created service.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-registerService.

Register the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This
function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to
true. The peripheral permission may not be available to all apps.

  |service-id| - Unique ID of a created service.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-registerService.
sourceraw docstring

register-service*cljs

(register-service* config service-id)
source

remove-serviceclj/smacro

(remove-service service-id)

Remove the specified service, unregistering it if it was registered. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|service-id| - Unique ID of a current registered service.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-removeService.

Remove the specified service, unregistering it if it was registered. If the service ID is invalid, the lastError will be
set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions
set to true. The peripheral permission may not be available to all apps.

  |service-id| - Unique ID of a current registered service.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-removeService.
sourceraw docstring

remove-service*cljs

(remove-service* config service-id)
source

reset-advertisingclj/smacro

(reset-advertising)

Resets advertising on the current device. It will unregister and stop all existing advertisements.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-resetAdvertising.

Resets advertising on the current device. It will unregister and stop all existing advertisements.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-resetAdvertising.
sourceraw docstring

reset-advertising*cljs

(reset-advertising* config)
source

send-request-responseclj/smacro

(send-request-response response)

Sends a response for a characteristic or descriptor read/write request. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|response| - The response to the request.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-sendRequestResponse.

Sends a response for a characteristic or descriptor read/write request. This function is only available if the app has both
the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be
available to all apps.

  |response| - The response to the request.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-sendRequestResponse.
sourceraw docstring

send-request-response*cljs

(send-request-response* config response)
source

set-advertising-intervalclj/smacro

(set-advertising-interval min-interval max-interval)

Set's the interval betweeen two consecutive advertisements. Note: This is a best effort. The actual interval may vary non-trivially from the requested intervals. On some hardware, there is a minimum interval of 100ms. The minimum and maximum values cannot exceed the the range allowed by the Bluetooth 4.2 specification.

|min-interval| - Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the spec). |max-interval| - Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the spec).

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-setAdvertisingInterval.

Set's the interval betweeen two consecutive advertisements. Note: This is a best effort. The actual interval may vary
non-trivially from the requested intervals. On some hardware, there is a minimum interval of 100ms. The minimum and maximum
values cannot exceed the the range allowed by the Bluetooth 4.2 specification.

  |min-interval| - Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the
                   spec).
  |max-interval| - Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the
                   spec).

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-setAdvertisingInterval.
sourceraw docstring

set-advertising-interval*cljs

(set-advertising-interval* config min-interval max-interval)
source

start-characteristic-notificationsclj/smacro

(start-characteristic-notifications characteristic-id)
(start-characteristic-notifications characteristic-id properties)

Enable value notifications/indications from the specified characteristic. Once enabled, an application can listen to notifications using the 'onCharacteristicValueChanged' event.

|characteristic-id| - The instance ID of the GATT characteristic that notifications should be enabled on. |properties| - Notification session properties (optional).

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications.

Enable value notifications/indications from the specified characteristic. Once enabled, an application can listen to
notifications using the 'onCharacteristicValueChanged' event.

  |characteristic-id| - The instance ID of the GATT characteristic that notifications should be enabled on.
  |properties| - Notification session properties (optional).

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications.
sourceraw docstring

start-characteristic-notifications*cljs

(start-characteristic-notifications* config characteristic-id properties)
source

stop-characteristic-notificationsclj/smacro

(stop-characteristic-notifications characteristic-id)

Disable value notifications/indications from the specified characteristic. After a successful call, the application will stop receiving notifications/indications from this characteristic.

|characteristic-id| - The instance ID of the GATT characteristic on which this app's notification session should be stopped.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications.

Disable value notifications/indications from the specified characteristic. After a successful call, the application will
stop receiving notifications/indications from this characteristic.

  |characteristic-id| - The instance ID of the GATT characteristic on which this app's notification session should be
                        stopped.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications.
sourceraw docstring

stop-characteristic-notifications*cljs

(stop-characteristic-notifications* config characteristic-id)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.app.bluetooth-low-energy namespace.

Taps all valid non-deprecated events in chromex.app.bluetooth-low-energy namespace.
sourceraw docstring

tap-on-characteristic-read-request-eventsclj/smacro

(tap-on-characteristic-read-request-events channel & args)

Fired when a connected central device requests to read the value of a characteristic registered on the local GATT server. Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

Events will be put on the |channel| with signature [::on-characteristic-read-request [request characteristic-id]] where:

|request| - Request data for this request. |characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onCharacteristicReadRequest-characteristicId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicReadRequest.

Fired when a connected central device requests to read the value of a characteristic registered on the local GATT server.
Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has
both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be
available to all apps.

Events will be put on the |channel| with signature [::on-characteristic-read-request [request characteristic-id]] where:

  |request| - Request data for this request.
  |characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onCharacteristicReadRequest-characteristicId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicReadRequest.
sourceraw docstring

tap-on-characteristic-value-changed-eventsclj/smacro

(tap-on-characteristic-value-changed-events channel & args)

Fired when the value of a remote GATT characteristic changes, either as a result of a read request, or a value change notification/indication This event will only be sent if the app has enabled notifications by calling 'startCharacteristicNotifications'.

Events will be put on the |channel| with signature [::on-characteristic-value-changed [characteristic]] where:

|characteristic| - The GATT characteristic whose value has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged.

Fired when the value of a remote GATT characteristic changes, either as a result of a read request, or a value change
notification/indication This event will only be sent if the app has enabled notifications by calling
'startCharacteristicNotifications'.

Events will be put on the |channel| with signature [::on-characteristic-value-changed [characteristic]] where:

  |characteristic| - The GATT characteristic whose value has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged.
sourceraw docstring

tap-on-characteristic-write-request-eventsclj/smacro

(tap-on-characteristic-write-request-events channel & args)

Fired when a connected central device requests to write the value of a characteristic registered on the local GATT server. Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

Events will be put on the |channel| with signature [::on-characteristic-write-request [request characteristic-id]] where:

|request| - Request data for this request. |characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onCharacteristicWriteRequest-characteristicId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicWriteRequest.

Fired when a connected central device requests to write the value of a characteristic registered on the local GATT server.
Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has
both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be
available to all apps.

Events will be put on the |channel| with signature [::on-characteristic-write-request [request characteristic-id]] where:

  |request| - Request data for this request.
  |characteristic-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onCharacteristicWriteRequest-characteristicId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicWriteRequest.
sourceraw docstring

tap-on-descriptor-read-request-eventsclj/smacro

(tap-on-descriptor-read-request-events channel & args)

Fired when a connected central device requests to read the value of a descriptor registered on the local GATT server. Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

Events will be put on the |channel| with signature [::on-descriptor-read-request [request descriptor-id]] where:

|request| - Request data for this request. |descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onDescriptorReadRequest-descriptorId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorReadRequest.

Fired when a connected central device requests to read the value of a descriptor registered on the local GATT server. Not
responding to this request for a long time may lead to a disconnection. This event is only available if the app has both
the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be
available to all apps.

Events will be put on the |channel| with signature [::on-descriptor-read-request [request descriptor-id]] where:

  |request| - Request data for this request.
  |descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onDescriptorReadRequest-descriptorId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorReadRequest.
sourceraw docstring

tap-on-descriptor-value-changed-eventsclj/smacro

(tap-on-descriptor-value-changed-events channel & args)

Fired when the value of a remote GATT characteristic descriptor changes, usually as a result of a read request. This event exists mostly for convenience and will always be sent after a successful call to 'readDescriptorValue'.

Events will be put on the |channel| with signature [::on-descriptor-value-changed [descriptor]] where:

|descriptor| - The GATT characteristic descriptor whose value has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged.

Fired when the value of a remote GATT characteristic descriptor changes, usually as a result of a read request. This event
exists mostly for convenience and will always be sent after a successful call to 'readDescriptorValue'.

Events will be put on the |channel| with signature [::on-descriptor-value-changed [descriptor]] where:

  |descriptor| - The GATT characteristic descriptor whose value has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged.
sourceraw docstring

tap-on-descriptor-write-request-eventsclj/smacro

(tap-on-descriptor-write-request-events channel & args)

Fired when a connected central device requests to write the value of a descriptor registered on the local GATT server. Not responding to this request for a long time may lead to a disconnection. This event is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

Events will be put on the |channel| with signature [::on-descriptor-write-request [request descriptor-id]] where:

|request| - Request data for this request. |descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onDescriptorWriteRequest-descriptorId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorWriteRequest.

Fired when a connected central device requests to write the value of a descriptor registered on the local GATT server. Not
responding to this request for a long time may lead to a disconnection. This event is only available if the app has both
the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be
available to all apps.

Events will be put on the |channel| with signature [::on-descriptor-write-request [request descriptor-id]] where:

  |request| - Request data for this request.
  |descriptor-id| - https://developer.chrome.com/apps/bluetoothLowEnergy#property-onDescriptorWriteRequest-descriptorId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorWriteRequest.
sourceraw docstring

tap-on-service-added-eventsclj/smacro

(tap-on-service-added-events channel & args)

Fired whan a new GATT service has been discovered on a remote device.

Events will be put on the |channel| with signature [::on-service-added [service]] where:

|service| - The GATT service that was added.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded.

Fired whan a new GATT service has been discovered on a remote device.

Events will be put on the |channel| with signature [::on-service-added [service]] where:

  |service| - The GATT service that was added.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded.
sourceraw docstring

tap-on-service-changed-eventsclj/smacro

(tap-on-service-changed-events channel & args)

Fired when the state of a remote GATT service changes. This involves any characteristics and/or descriptors that get added or removed from the service, as well as 'ServiceChanged' notifications from the remote device.

Events will be put on the |channel| with signature [::on-service-changed [service]] where:

|service| - The GATT service whose state has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged.

Fired when the state of a remote GATT service changes. This involves any characteristics and/or descriptors that get added
or removed from the service, as well as 'ServiceChanged' notifications from the remote device.

Events will be put on the |channel| with signature [::on-service-changed [service]] where:

  |service| - The GATT service whose state has changed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged.
sourceraw docstring

tap-on-service-removed-eventsclj/smacro

(tap-on-service-removed-events channel & args)

Fired when a GATT service that was previously discovered on a remote device has been removed.

Events will be put on the |channel| with signature [::on-service-removed [service]] where:

|service| - The GATT service that was removed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved.

Fired when a GATT service that was previously discovered on a remote device has been removed.

Events will be put on the |channel| with signature [::on-service-removed [service]] where:

  |service| - The GATT service that was removed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved.
sourceraw docstring

unregister-advertisementclj/smacro

(unregister-advertisement advertisement-id)

Unregisters an advertisement and stops its advertising. If the advertisement fails to unregister the only way to stop advertising might be to restart the device.

|advertisement-id| - Id of the advertisement to unregister.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-unregisterAdvertisement.

Unregisters an advertisement and stops its advertising. If the advertisement fails to unregister the only way to stop
advertising might be to restart the device.

  |advertisement-id| - Id of the advertisement to unregister.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-unregisterAdvertisement.
sourceraw docstring

unregister-advertisement*cljs

(unregister-advertisement* config advertisement-id)
source

unregister-serviceclj/smacro

(unregister-service service-id)

Unregister the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.

|service-id| - Unique ID of a current registered service.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-unregisterService.

Unregister the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This
function is only available if the app has both the bluetooth:low_energy and the bluetooth:peripheral permissions set to
true. The peripheral permission may not be available to all apps.

  |service-id| - Unique ID of a current registered service.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-unregisterService.
sourceraw docstring

unregister-service*cljs

(unregister-service* config service-id)
source

write-characteristic-valueclj/smacro

(write-characteristic-value characteristic-id value)

Write the value of a specified characteristic from a remote peripheral.

|characteristic-id| - The instance ID of the GATT characteristic whose value should be written to. |value| - The value that should be sent to the remote characteristic as part of the write request.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue.

Write the value of a specified characteristic from a remote peripheral.

  |characteristic-id| - The instance ID of the GATT characteristic whose value should be written to.
  |value| - The value that should be sent to the remote characteristic as part of the write request.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue.
sourceraw docstring

write-characteristic-value*cljs

(write-characteristic-value* config characteristic-id value)
source

write-descriptor-valueclj/smacro

(write-descriptor-value descriptor-id value)

Write the value of a specified characteristic descriptor from a remote peripheral.

|descriptor-id| - The instance ID of the GATT characteristic descriptor whose value should be written to. |value| - The value that should be sent to the remote descriptor as part of the write request.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue.

Write the value of a specified characteristic descriptor from a remote peripheral.

  |descriptor-id| - The instance ID of the GATT characteristic descriptor whose value should be written to.
  |value| - The value that should be sent to the remote descriptor as part of the write request.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue.
sourceraw docstring

write-descriptor-value*cljs

(write-descriptor-value* config descriptor-id value)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close