

The other devices can connect to obniz using BLE and read or write the value of characteristics. You can notice read/write by setting a function called when such an event occurs.

## Reading notification

By specifying a function in [peripheral.onreadfromremote](https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.ble.hci.blecharacteristic.html#onreadfromremote), you can know that the value of the characteristics has been read. This function is called every time the value is read.

```javascript
// Javascript Example

characteristic.onreadfromremote = function(address){}

```

## Writing notification

You can detect writing by specifying a function in [characteristic.onwritefromremote](https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.ble.hci.blecharacteristic.html#onwritefromremote). "address" stores the address of the central and "newvalue" has the value written by it.

```javascript
// Javascript Example

characteristic.onwritefromremote = function(address, newvalue){
}

```
