Hello Jeffrey,I have a question which I wonder if you could help me with.I am currently experimenting with the Web Bluetooth API and am trying to obtain the RSSI field from a BLE device so I can estimate the distance the device is away from the user. It's part of a final year university project.The only way I have found to get the RSSI seems to be through the watchAdvertisements() method documented here:but looking at the Web Bluetooth implementation status page:and through my own testing it does not seem to be implemented, at least all I am receiving is an error that watchAdvertisements() is not a method.The reason I am emailing you is due to your comment here:you suggest sites to use this method which made me think that is in fact implemented and working.Are you able to confirm the status of this method for me or suggest another way to obtain the RSSI from a BLE device?I am testing on Ubuntu 16.04 and Android 6.02 and have tried both the stable and dev branch of Google Chrome. Below is a small snippet of the code I use.
navigator.bluetooth.requestDevice({
filters: anyNamedDevice()
}).then( device => {
device.watchAdvertisements();
device.addEventListener('advertisementreceived', parseBeacon);
}).catch( error => {
...
});
};
function parseBeacon(event) {
var rssi = event.rssi;
...
}Regards,Mike Harling
--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetoot...@chromium.org.
To post to this group, send email to web-bl...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/web-bluetooth/1f890f8e-e878-4835-b122-320e8ae41a34%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetoot...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/web-bluetooth/4b77d51c-357d-4617-b13e-228494821a05o%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bl...@chromium.org.