You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(PoweredUP.isWebBluetooth){poweredUP.scan();// Start scanning for hubs}else{alert("Your browser does not support the Web Bluetooth specification. Maybe you should just forgot https://");}
Then I use the callback
poweredUP.on("discover",asyncfunction(hub){// Wait to discover hubsconsole.log(" poweredUP on discover");awaithub.connect();// Connect to hub[...]}
Inside there, I use other handlers:
hub.on("attach", function(device) {
hub.on("disconnect", function() {
I tested my app successfully on Win 10 laptops with Chrome, but on smartphones connecting gives the error:
Uncaught (in promise) DOMException: GATT operation failed for unknown reason.
I had a lot of troubles installing VS to modify the library, otherwise I would have suggested a solution. Maybe, maybe, it's a matter of timing in data exchange, but it's just my hard guess.
Thanks!
The text was updated successfully, but these errors were encountered:
antlai
added a commit
to cafjs/caf_node-poweredup
that referenced
this issue
May 27, 2022
Hi.
<script src="https://cdn.jsdelivr.net/npm/node-poweredup@latest/dist/browser/poweredup.js"></script>I am using your library by adding it like so:
Then I scan for LEGO BOOST hubs like so:
Then I use the callback
Inside there, I use other handlers:
hub.on("attach", function(device) {
hub.on("disconnect", function() {
I tested my app successfully on Win 10 laptops with Chrome, but on smartphones connecting gives the error:
Uncaught (in promise) DOMException: GATT operation failed for unknown reason.
I had a lot of troubles installing VS to modify the library, otherwise I would have suggested a solution. Maybe, maybe, it's a matter of timing in data exchange, but it's just my hard guess.
Thanks!
The text was updated successfully, but these errors were encountered: