-
@daphtdazz Hey, it looks like application cache isn't supported... Is that right?
any hint about changing this in the future? Looks like Safari is a little ways off from a replacement right now...
https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache
https://jakearchibald.github.io/isserviceworkerready/ -
-
Hey! I did some more testing and found the error using this remote console tool called JS Console... https://jsconsole.com/?%3Alisten
Here's the error every time the standard 2 byte heart rate monitor value is sent to Web BLE...
"Unexpected characteristic value notification for device 810058E3-27E6-4D1A-A9A8-FC8C4C357D84 and characteristic 2a37"
.... let me know what else I can provide...
-
-
-
@Gordon... thanks I think that works... off to the races...
-
hmmmm... I guess I need to develop my ble device attributes a little better... they come up as 'undefined' when I call them in chrome browser
navigator.bluetooth.requestDevice(options1) .then(device => { console.log('> Services: ' + device.services); console.log('> namePrefix: ' + device.namePrefix); console.log('> Name: ' + device.name); //console.log('> Id: ' + device.id); //console.log('> Connected: ' + device.gatt.connected); })
-
-
I tried filtering with a name. It works on mac Safari but not WebBle...
let filters = []; let options1 = {}; // if (1) { // options1.acceptAllDevices = true; // } if (1) { filters.push({name: 'Bluefruit HRM'}); } options1.filters = filters; console.log('Requesting Bluetooth Device...'); console.log('with ' + JSON.stringify(options1)); navigator.bluetooth.requestDevice(options1) .then(device => { console.log('> Name: ' + device.name); console.log('> Id: ' + device.id); console.log('> Connected: ' + device.gatt.connected); }) .catch(error => { console.log('Argh! ' + error);
-
thanks for all the responses.
@gordon, yes, you're right just for prototyping..
Are you saying if I filter for a certain Ble device it should work? Which type of filter should I use?
Here are some filter options from google's bluetooth examples....
let filterService = document.querySelector('#service').value; if (filterService.startsWith('0x')) { filterService = parseInt(filterService); } if (filterService) { filters.push({services: [filterService]}); } let filterName = document.querySelector('#name').value; if (filterName) { filters.push({name: filterName}); } let filterNamePrefix = document.querySelector('#namePrefix').value; if (filterNamePrefix) { filters.push({namePrefix: filterNamePrefix}); } let options = {}; if (document.querySelector('#allDevices').checked) { options.acceptAllDevices = true; } else { options.filters = filters; } log('Requesting Bluetooth Device...'); log('with ' + JSON.stringify(options)); navigator.bluetooth.requestDevice(options) .then(device => { log('> Name: ' + device.name); log('> Id: ' + device.id); log('> Connected: ' + device.gatt.connected); }) .catch(error => { log('Argh! ' + error); });
@daphtdazz Hey, there's an issue with the way webble resolves this address. Seems to work on safari, ios, and chrome. Give it a try!... smarteggdrop.omsi.edu
"Fail Provisional Navigation: An SSL error has occurred and a secure connection to the server cannot be made."