{"id":56270,"date":"2022-06-29T03:01:50","date_gmt":"2022-06-28T17:01:50","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56270"},"modified":"2022-07-06T15:54:28","modified_gmt":"2022-07-06T05:54:28","slug":"web-bluetooth-api-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/web-bluetooth-api-primer-tutorial\/","title":{"rendered":"Web Bluetooth API Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WebAssembly via Emscripten and C Primer TutorialWeb Bluetooth API Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.gif\" title=\"Web Bluetooth API Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Web Bluetooth API Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve spent a day researching <a target=_blank title='Web Bluetooth API samples thanks to https:\/\/googlechrome.github.io\/samples\/web-bluetooth\/device-info.html' href='\/\/googlechrome.github.io\/samples\/web-bluetooth\/device-info.html'>Web Bluetooth API<\/a> and have had a roller coaster ride that we are going to leave for a while now.  Mid-morning getting to make the macOS Google Chrome web browser accept Web Bluetooth API <i>navigator.bluetooth<\/i> calls gave us a false sense of security for the rest.  The other extreme was the low of, after establishing a Bluetooth device name and ID from a list gleaned by the Web Bluetooth API, never getting &#8230;<\/p>\n<p><code><br \/>\n    console.log('Connecting to GATT Server...');<br \/>\n    const server = await device.gatt.connect();<br \/>\n<\/code><\/p>\n<p> &#8230; to work testing macOS Google Chrome and Opera (Firefox and Safari did not recognize <i>navigator.bluetooth<\/i>) and Windows Google Chrome, Microsoft Edge and Internet Explorer with three Bluetooth devices &#8230;<\/p>\n<ul>\n<li>The Monkey audio and radio<\/li>\n<li>Logitech Keyboard<\/li>\n<li>Elan One (DAB) radio<\/li>\n<\/ul>\n<p> &#8230; has left us not <i>connecting<\/i> to that Bluetooth device despite the fact that the Operating System desktop Bluetooth manager can!<\/p>\n<p>Of course, we&#8217;ll return if we find out what we did wrong, if it is at our end?!  In the meantime, though &#8230;<\/p>\n<ul>\n<li>try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.html-GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.html-GETME\" title=\"bluetooth_check.htm\">bluetooth_check.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.htm\">live run Web Bluetooth API<\/a> yourself &#8230; and\/or &#8230;<\/li>\n<li>view today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/bluetooth_check.gif\" title=\"Tutorial picture\">animated GIF tutorial picture<\/a> where you can see, primarily, these macOS Google Chrome settings to get the ball rolling<\/li>\n<\/ul>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56270' onclick='var dv=document.getElementById(\"d56270\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/bluetooth\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56270' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve spent a day researching Web Bluetooth API and have had a roller coaster ride that we are going to leave for a while now. Mid-morning getting to make the macOS Google Chrome web browser accept Web Bluetooth API navigator.bluetooth &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/web-bluetooth-api-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,18,25,29,37],"tags":[88,2360,2361,1766,4005,249,251,252,4006,322,439,520,555,622,652,673,2178,1805,2189,4007,835,837,849,884,4022,4021,2976,997,2357,1597,1083,1114,1127,1881,1319,4004,1404,1435],"class_list":["post-56270","post","type-post","status-publish","format-standard","hentry","category-elearning","category-hardware","category-networking","category-operating-system","category-tutorials","tag-api","tag-async","tag-await","tag-bluetooth","tag-bluetooth-device","tag-configuration","tag-connect","tag-connection","tag-const","tag-device","tag-firefox","tag-google-chrome","tag-hardware-2","tag-internet-explorer","tag-javascript","tag-keyboard","tag-macos","tag-microsoft-edge","tag-navigator","tag-navigator-bluetooth","tag-network","tag-networking-2","tag-object","tag-opera","tag-permission","tag-permissions","tag-privacy","tag-programming","tag-promise","tag-radio","tag-safari","tag-security","tag-settings","tag-speakers","tag-tutorial","tag-web-bluetooth-api","tag-web-browser","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56270"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=56270"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56270\/revisions"}],"predecessor-version":[{"id":56277,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56270\/revisions\/56277"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}