org.bluez.mesh.Provisioner1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluez-dbus Show documentation
Show all versions of bluez-dbus Show documentation
Java native bluetooth library which uses bluez via dbus (linux only)
package org.bluez.mesh;
import java.util.Map;
import org.bluez.datatypes.TwoTuple;
import org.bluez.exceptions.mesh.BluezMeshAbortException;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.types.UInt16;
import org.freedesktop.dbus.types.Variant;
/**
* File generated - 2020-12-28.
* Based on bluez Documentation: mesh-api.txt.
*
* Service: unique name
* Interface: org.bluez.mesh.Provisioner1
*
* Object path:
* freely definable
*
* Supported properties:
*
* An array of strings with the following allowed values:
* "blink"
* "beep"
* "vibrate"
* "out-numeric"
* "out-alpha"
* "push"
* "twist"
* "in-numeric"
* "in-alpha"
* "static-oob"
* "public-oob"
*
*
* Indicates availability of OOB data. An array of strings with the
* following allowed values:
* "other"
* "uri"
* "machine-code-2d"
* "bar-code"
* "nfc"
* "number"
* "string"
* "on-box"
* "in-box"
* "on-paper",
* "in-manual"
* "on-device"
*
*
* Uniform Resource Identifier points to out-of-band (OOB)
* information (e.g., a public key)
*
*
*/
public interface Provisioner1 extends DBusInterface {
/**
* From bluez documentation:
*
* The method is called from the bluetooth-meshd daemon when a
* unique UUID has been seen during UnprovisionedScan() for
* unprovsioned devices.
*
* The rssi parameter is a signed, normalized measurement of the
* signal strength of the recieved unprovisioned beacon.
*
* The data parameter is a variable length byte array, that may
* have 1, 2 or 3 distinct fields contained in it including the 16
* byte remote device UUID (always), a 16 bit mask of OOB
* authentication flags (optional), and a 32 bit URI hash (if URI
* bit set in OOB mask). Whether these fields exist or not is a
* decision of the remote device.
*
* The options parameter is a dictionary that may contain
* additional scan result info (currently an empty placeholder for
* forward compatibility).
*
* If a beacon with a UUID that has already been reported is
* recieved by the daemon, it will be silently discarded unless it
* was recieved at a higher rssi power level.
*
* @param _rssi rssi
* @param _data data
* @param _options options
*/
void ScanResult(int _rssi, byte[] _data, Map> _options);
/**
* From bluez documentation:
*
* This method is implemented by a Provisioner capable application
* and is called when the remote device has been fully
* authenticated and confirmed.
*
* The count parameter is the number of consecutive unicast
* addresses the remote device is requesting.
*
* Return Parameters are from the Mesh Profile Spec:
* net_index - Subnet index of the net_key
* unicast - Primary Unicast address of the new node
*
* @param _count count
*
* @return Tuple of net_index and unicast, maybe null
*
* @throws BluezMeshAbortException when operation is aborted
*/
TwoTuple RequestProvData(byte _count) throws BluezMeshAbortException;
/**
* From bluez documentation:
*
* This method is called when the node provisioning initiated
* by an AddNode() method call successfully completed.
*
* The unicast parameter is the primary address that has been
* assigned to the new node, and the address of it's config server.
*
* The count parameter is the number of unicast addresses assigned
* to the new node.
*
* The new node may now be sent messages using the credentials
* supplied by the RequestProvData method.
*
* @param _uuid uuid
* @param _unicast unicast
* @param _count count
*/
void AddNodeComplete(byte[] _uuid, UInt16 _unicast, byte _count);
/**
* From bluez documentation:
*
* This method is called when the node provisioning initiated by
* AddNode() has failed. Depending on how far Provisioning
* proceeded before failing, some cleanup of cached data may be
* required.
*
* The reason parameter identifies the reason for provisioning
* failure. The defined values are: "aborted", "timeout",
* "bad-pdu", "confirmation-failed", "out-of-resources",
* "decryption-error", "unexpected-error",
* "cannot-assign-addresses".
*
* @param _uuid uuid
* @param _reason reason
*/
void AddNodeFailed(byte[] _uuid, String _reason);
}