Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Bluetooth API shim for noble. (noble#238)
* can connect from web, no services discovery * cleanup * cleanup * reorganize stub data * next tick and emit errors * working notifications * list service IDs * working characteristics discover * cleanup read * replace console.log with debug * add semicolon * cleanup * use dataview buffer, emit errors * emit a bindings error if web bluettooth not available * duplicate all uuids to optionalServices * return full list of seri * search by name or prefix * remove console.log * fix param juggling * can connect from web, no services discovery * cleanup * cleanup * reorganize stub data * working notifications * list service IDs * working characteristics discover * no write response * revert to not using test abstraction * Fix startScanning callback calling According to README, when startScanning is passed a callback as a third argument, that callback is a usual Node-style "error first" callback. But in fact, when scanning is started successfully, callback is called with `filterDuplicates` value as its first argument. Here is an example situation where it causes problem: ``` // don't allow duplicates (as by default) but pass a callback noble.startScanning([], false, function(error) { if(error) { console.log('Failed to start scanning:', error); } }); ``` What happens when you run this code: `Failed to start scanning: true` This PR is intended to fix this. * allow for unsubscribing * linting fixes * Update central.js Remove inaccurate comment * can connect from web, no services discovery * can connect from web, no services discovery * cleanup * cleanup * cleanup * cleanup * reorganize stub data * reorganize stub data * next tick and emit errors * working notifications * working notifications * list service IDs * list service IDs * working characteristics discover * working characteristics discover * cleanup read * replace console.log with debug * add semicolon * cleanup * use dataview buffer, emit errors * emit a bindings error if web bluettooth not available * duplicate all uuids to optionalServices * return full list of seri * search by name or prefix * remove console.log * fix param juggling * no write response * revert to not using test abstraction * allow for unsubscribing * linting fixes * fix linting
- Loading branch information