- From: Reilly Grant via GitHub <sysbot+gh@w3.org>
- Date: Fri, 09 Jul 2021 18:24:41 +0000
- To: public-web-bluetooth-log@w3.org
Inside a `'characteristicvaluechanged'` event listener you can access the device ID through the `BluetoothRemoteGATTCharacteristic` object like this,
```js
characteristic.addEventListener('characteristicvaluechanged', (e) => {
console.log(`Device ID: ${e.target.service.device.id}`);
});
```
It doesn't make sense to filter devices based on their ID because the ID is only assigned to a device once the page has access to it. #417 tracks allowing filtering based on MAC address.
--
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/553#issuecomment-877374890 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 9 July 2021 18:25:40 UTC