From: Lukasz Bardeli Date: Wed, 24 Aug 2016 10:23:58 +0000 (+0200) Subject: [BluetoothLE] add rssi attribute X-Git-Tag: tizen_3.0/TD_SYNC/20161201~45^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6333c0460073c79ec6c478340de6525734a95311;p=sdk%2Fonline-doc.git [BluetoothLE] add rssi attribute Change-Id: I9655c347d4a507dee0091a368670a2fbcd6498b4 Signed-off-by: Lukasz Bardeli --- diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html index 8b8adc7..4e928fb 100644 --- a/org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html +++ b/org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html @@ -3791,6 +3791,7 @@ Instead, use http://tizen.org/privilege/bluetooth. readonly attribute BluetoothLESolicitationUUID[]? solicitationuuids; readonly attribute BluetoothLEServiceData[]? serviceData; readonly attribute BluetoothLEManufacturerData? manufacturerData; + readonly attribute long rssi; void connect(optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); @@ -3799,6 +3800,8 @@ Instead, use http://tizen.org/privilege/bluetooth. BluetoothGATTService getService(BluetoothUUID uuid) raises(WebAPIException); + BluetoothUUID[] getServiceAllUuids() raises(WebAPIException); + long addConnectStateChangeListener(BluetoothLEConnectChangeCallback listener) raises(WebAPIException); void removeConnectStateChangeListener(long watchID); @@ -3991,6 +3994,36 @@ A BluetoothLEDevice object can be retrieved by using one of the followi +
  • + readonly +long rssi
    + The received signal strength indicator in dBm (decibel-milliwatts) units. +
    +
    +

    +The signal strength depends on distance (between the device and the beacon) and broadcasting power value. +

    +
    +

    + Since: + 3.0 +

    +
    +

    Code example:

     var adapter = tizen.bluetooth.getLEAdapter();
    + adapter.startScan(
    +     function onsuccess(device) {
    +         console.log("Found device: " + device.name);
    +         console.log("RSSI: " + device.rssi);
    +     }
    + );
    + 
    +
    +
    +

    Output example:

     Found device: beacon
    + RSSI: -25
    + 
    +
    +
  • diff --git a/org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html b/org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html index 5c51fe1..89072bb 100644 --- a/org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html +++ b/org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html @@ -3837,6 +3837,7 @@ Instead, use http://tizen.org/privilege/bluetooth. readonly attribute BluetoothLESolicitationUUID[]? solicitationuuids; readonly attribute BluetoothLEServiceData[]? serviceData; readonly attribute BluetoothLEManufacturerData? manufacturerData; + readonly attribute long rssi; void connect(optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); @@ -4039,6 +4040,36 @@ A BluetoothLEDevice object can be retrieved by using one of the followi
    +
  • + readonly +long rssi
    + The received signal strength indicator in dBm (decibel-milliwatts) units. +
    +
    +

    +The signal strength depends on distance (between the device and the beacon) and broadcasting power value. +

    +
    +

    + Since: + 3.0 +

    +
    +

    Code example:

     var adapter = tizen.bluetooth.getLEAdapter();
    + adapter.startScan(
    +     function onsuccess(device) {
    +         console.log("Found device: " + device.name);
    +         console.log("RSSI: " + device.rssi);
    +     }
    + );
    + 
    +
    +
    +

    Output example:

     Found device: beacon
    + RSSI: -25
    + 
    +
    +