{"id":1562,"date":"2019-06-01T23:39:02","date_gmt":"2019-06-01T15:39:02","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=1562"},"modified":"2020-05-12T10:51:25","modified_gmt":"2020-05-12T02:51:25","slug":"how-to-connect-to-an-esp32-development-board-via-bluetooth-on-windows-10","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/how-to-connect-to-an-esp32-development-board-via-bluetooth-on-windows-10\/","title":{"rendered":"How to connect to an ESP32 development board via Bluetooth on Windows 10"},"content":{"rendered":"<p>When you have an old <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=Windows+computer&i=computers-intl-ship&ref=nb_sb_noss_2&linkCode=ll2&tag=clivsperswebs-20&linkId=f972c03ec1f3398f29b7182b7c44ae6d&language=en_US\" rel=\"noopener\" target=\"_blank\">Windows 10 machine<\/a>, you can reuse it as an <a href=\"https:\/\/www.techcoil.com\/glossary\/iot-gateway\/\" target=\"_blank\" rel=\"noopener\">IOT gateway<\/a>. <\/p>\n<p>Given that your Windows 10 machine has working Bluetooth, you can connect it to an <a href=\"https:\/\/www.amazon.com\/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated\/dp\/B0718T232Z\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=f306dd4424a4621ff39999f7e678604d&language=en_US\" rel=\"noopener\" target=\"_blank\">ESP32 development board<\/a>.<\/p>\n<p>In case you need a reference to connect to an ESP32 development board via Bluetooth on Windows 10, here are the steps to do so. <\/p>\n<h2>Setting up your ESP32 development board to accept Bluetooth connections<\/h2>\n<p>Before your Windows machine can discover ESP32 Bluetooth, you need to get ESP32 to turn on Bluetooth. In order to do so, upload the following Arduino Sketch to your ESP32 development board:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &quot;BluetoothSerial.h&quot;\r\n  \r\nBluetoothSerial SerialBT;\r\n   \r\nvoid setup()\r\n{\r\n  SerialBT.begin(&quot;ESP32test&quot;);\r\n  delay(1000);\r\n}\r\n   \r\nvoid loop()\r\n{\r\n  String inputFromOtherSide;\r\n  if (SerialBT.available()) {\r\n    inputFromOtherSide = SerialBT.readString();\r\n    SerialBT.println(&quot;You had entered: &quot;);\r\n    SerialBT.println(inputFromOtherSide);\r\n  }\r\n}\r\n<\/pre>\n<p>As I had mentioned in the guide on <a href=\"http:\/\/how to get your ESP32 development board to communicate with another device over Bluetooth Serial\" rel=\"noopener\" target=\"_blank\">how to get your ESP32 development board to communicate with another device over Bluetooth Serial<\/a>, this Arduino Sketch will echo back whatever message that it receives from the Bluetooth connection.<\/p>\n<p>After you had uploaded the Arduino Sketch onto your ESP development board, place it near to your Windows machine.<\/p>\n<h2>Connecting your Windows 10 machine to your ESP32 development board via Bluetooth<\/h2>\n<p>First, find the <strong>Bluetooth and other devices settings<\/strong> from the taskbar:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Finding-Bluetooth-and-other-devices-settings-on-Windows-10.jpg\" alt=\"Finding Bluetooth and other devices settings on Windows 10\"  \/><\/p>\n<p>When you click on <strong>Bluetooth and other devices settings<\/strong>, the Bluetooth and other devices settings window will appear:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Bluetooth-and-other-devices-settings-window-on-Windows-10.jpg\" alt=\"Bluetooth and other devices settings window on Windows 10\"  \/><\/p>\n<p>Given that, click on <strong>Add Bluetooth and other device<\/strong>. When you had done so, the <strong>Add a device<\/strong> window will appear:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Add-a-device-dialog-on-Windows-10.jpg\" alt=\"Add a device dialog on Windows 10\" \/><\/p>\n<p>Given that, click on <strong>Bluetooth<\/strong>. Once you do so, you should be able to find <strong>ESP32test<\/strong> as one of the Bluetooth device to connect to:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Add-a-device-dialog-showing-ESP32test-as-one-of-the-options-to-connect-to.jpg\" alt=\"Add a device dialog showing ESP32test as one of the options to connect to\"\/><\/p>\n<p>When you click on <strong>ESP32test<\/strong>, Windows 10 will pair itself with your ESP32 development board via Bluetooth:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Add-a-device-dialog-showing-ESP32test-being-paired-successfully-on-Windows-10.jpg\" alt=\"Add a device dialog showing ESP32test being paired successfully on Windows 10\" \/><\/p>\n<p>Once you had paired Windows 10 with your ESP32 development board, click on <strong>Done<\/strong> to go back to <strong>Bluetooth and other devices settings<\/strong>.<\/p>\n<h2>Finding the COM port to communicate with your ESP32 development board via Bluetooth Serial<\/h2>\n<p>Since the ESP32 development board is running a program with Bluetooth Serial, Windows 10 should define a COM port for applications to communicate with your board.<\/p>\n<p>In order to find the COM port to communicate with your ESP32 development board, scroll down to find the <strong>More Bluetooth options<\/strong> link under the <strong>Related settings<\/strong> section.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Bluetooth-and-other-devices-settings-window-on-Windows-10-with-More-Bluetooth-options-highlighted.jpg\" alt=\"Bluetooth and other devices settings window on Windows 10 with More Bluetooth options highlighted\" \/><\/p>\n<p>When you click on the <strong>More Bluetooth options<\/strong> link, the <strong>Bluetooth Settings<\/strong> window will appear. Given that, click on the <strong>COM port<\/strong> tab to find the COM port to communicate with your ESP32 development board:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Bluetooth-settings-window-on-Windows-10-showing-COM-ports-assigned-to-ESP32test-Bluetooth-connection.jpg\" alt=\"Bluetooth settings window on Windows 10 showing COM ports assigned to ESP32test Bluetooth connection\"  \/><\/p>\n<p>As shown above, Windows had defined two COM ports to the ESP32 development board that I had paired with. <\/p>\n<p>In order to communicate with this ESP32 development board via Bluetooth, our application running on Windows 10 will need to use the one labelled as <strong>Outgoing<\/strong> under the <strong>Direction<\/strong> column. <\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-pc\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-pc&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-pc&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1562&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>When you have an old <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=Windows+computer&#038;i=computers-intl-ship&#038;ref=nb_sb_noss_2&#038;linkCode=ll2&#038;tag=clivsperswebs-20&#038;linkId=f972c03ec1f3398f29b7182b7c44ae6d&#038;language=en_US\" rel=\"noopener\" target=\"_blank\">Windows 10 machine<\/a>, you can reuse it as an <a href=\"https:\/\/www.techcoil.com\/glossary\/iot-gateway\/\" target=\"_blank\" rel=\"noopener\">IOT gateway<\/a>. <\/p>\n<p>Given that your Windows 10 machine has working Bluetooth, you can connect it to an <a href=\"https:\/\/www.amazon.com\/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated\/dp\/B0718T232Z\/ref=as_li_ss_tl?ie=UTF8&#038;linkCode=ll1&#038;tag=clivsperswebs-20&#038;linkId=f306dd4424a4621ff39999f7e678604d&#038;language=en_US\" rel=\"noopener\" target=\"_blank\">ESP32 development board<\/a>.<\/p>\n<p>In case you need a reference to connect to an ESP32 development board via Bluetooth on Windows 10, here are the steps to do so. <\/p>\n","protected":false},"author":1,"featured_media":1595,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[648,651,630,181,347],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Add-a-device-dialog-showing-ESP32test-being-paired-successfully-on-Windows-10.jpg","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-pc","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1562"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=1562"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1562\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/1595"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=1562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=1562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=1562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}