{"id":35,"date":"2020-11-27T13:54:23","date_gmt":"2020-11-27T13:54:23","guid":{"rendered":"https:\/\/www.bleuio.com\/blog\/?p=35"},"modified":"2022-01-24T14:52:36","modified_gmt":"2022-01-24T14:52:36","slug":"collect-and-export-data-from-bluetooth-devices","status":"publish","type":"post","link":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/","title":{"rendered":"Collect and export data from bluetooth devices"},"content":{"rendered":"\n<p>This project will show how to collect real-time BLE data and export as csv using web browser.<\/p>\n\n\n\n<p>For this project, I am using Bluetooth Low Energy USB dongle called&nbsp;<strong>BlueIO<\/strong>, which will act as a central device to retrieve data.&nbsp;<strong>Hibou<\/strong>&nbsp;Air Quality Monitor which will serve as a peripheral device to transmit the data. The script is simple to use and can be used for other purposes such as store the data into database or cloud.<\/p>\n\n\n\n<p>Things we need:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Google chrome version 78 or later (windows)<\/li><li><a href=\"https:\/\/www.bleuio.com\/\">BleuIO \u2014 Bluetooth Low Energy Adapter<\/a><\/li><li><a href=\"https:\/\/www.hiboucloud.com\/\">Hibou Air Quality Monitor sensor device<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc-before-we-start-0\">Before we start<\/h3>\n\n\n\n<p>The article assumes you have some general knowledge of how Bluetooth Low Energy (BLE) work. Since the Chrome Serial specification on Google Chrome is not finalized yet, you will have to go to enable the highlighted flag, and restart Chrome.<\/p>\n\n\n\n<p>open&nbsp;<strong>chrome:\/\/flags\/#enable-experimental-web-platform-features<\/strong>&nbsp;in chrome browser. \u200b<\/p>\n\n\n\n<p>In this example, we are going to use JavaScript + html (and some CSS for styling) to setup the&nbsp;<strong>BleuIO<\/strong>&nbsp;and quickly start scanning.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc-steps-1\">Steps:<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Clone the git repository.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/smart-sensor-devices-ab\/export_ble_data.git<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Connect the&nbsp;<strong>Bleuio&nbsp;<\/strong>dongle to your computer.<\/li><li>Open&nbsp;<strong>index.html<\/strong>&nbsp;file<\/li><li>Click&nbsp;<strong>connect&nbsp;<\/strong>and wait for the device to load on your com port.<\/li><li>Select your com port.<\/li><li>Scan for BLE devices. (this script only scan for Hibou Devices. You can change the manufacturer value at script.js file)<\/li><li>Select device and start getting data. You will get real time value on the screen.<\/li><li>Once you click on stop getting data. you will see all the data showing on a table between the time period. You can view data or export in csv.<\/li><\/ul>\n\n\n\n<p><strong>Project Video<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to export collect and export BLE data\" width=\"640\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/RW9AzK9xFDc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This project will show how to collect real-time BLE data and export as csv using web browser. For this project, I am using Bluetooth Low Energy USB dongle called&nbsp;BlueIO, which will act as a central device to retrieve data.&nbsp;Hibou&nbsp;Air Quality Monitor which will serve as a peripheral device to transmit the data. The script is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":36,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bleuio","category-bleuio-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"og:description\" content=\"This project will show how to collect real-time BLE data and export as csv using web browser. For this project, I am using Bluetooth Low Energy USB dongle called&nbsp;BlueIO, which will act as a central device to retrieve data.&nbsp;Hibou&nbsp;Air Quality Monitor which will serve as a peripheral device to transmit the data. The script is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/\" \/>\n<meta property=\"og:site_name\" content=\"BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-27T13:54:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-24T14:52:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"BleuIO\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/\"},\"author\":{\"name\":\"BleuIO\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"headline\":\"Collect and export data from bluetooth devices\",\"datePublished\":\"2020-11-27T13:54:23+00:00\",\"dateModified\":\"2022-01-24T14:52:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/\"},\"wordCount\":299,\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/export-ble-data-bluetooth.jpg\",\"articleSection\":[\"BleuIO\",\"BleuIO tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/\",\"name\":\"Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/export-ble-data-bluetooth.jpg\",\"datePublished\":\"2020-11-27T13:54:23+00:00\",\"dateModified\":\"2022-01-24T14:52:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/export-ble-data-bluetooth.jpg\",\"contentUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/export-ble-data-bluetooth.jpg\",\"width\":620,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/collect-and-export-data-from-bluetooth-devices\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Collect and export data from bluetooth devices\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\",\"name\":\"BleuIO - Create Bluetooth Low Energy application\",\"description\":\"Learn Bluetooth Low Energy programming and build Bluetooth Low Energy Application\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\",\"name\":\"BleuIO\",\"sameAs\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/author\\\/biadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/","og_locale":"en_US","og_type":"article","og_title":"Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application","og_description":"This project will show how to collect real-time BLE data and export as csv using web browser. For this project, I am using Bluetooth Low Energy USB dongle called&nbsp;BlueIO, which will act as a central device to retrieve data.&nbsp;Hibou&nbsp;Air Quality Monitor which will serve as a peripheral device to transmit the data. The script is [&hellip;]","og_url":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/","og_site_name":"BleuIO - Create Bluetooth Low Energy application","article_published_time":"2020-11-27T13:54:23+00:00","article_modified_time":"2022-01-24T14:52:36+00:00","og_image":[{"width":620,"height":350,"url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg","type":"image\/jpeg"}],"author":"BleuIO","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#article","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/"},"author":{"name":"BleuIO","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"headline":"Collect and export data from bluetooth devices","datePublished":"2020-11-27T13:54:23+00:00","dateModified":"2022-01-24T14:52:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/"},"wordCount":299,"image":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg","articleSection":["BleuIO","BleuIO tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/","url":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/","name":"Collect and export data from bluetooth devices - BleuIO - Create Bluetooth Low Energy application","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#primaryimage"},"image":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg","datePublished":"2020-11-27T13:54:23+00:00","dateModified":"2022-01-24T14:52:36+00:00","author":{"@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"breadcrumb":{"@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#primaryimage","url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg","contentUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/export-ble-data-bluetooth.jpg","width":620,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/www.bleuio.com\/blog\/collect-and-export-data-from-bluetooth-devices\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bleuio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Collect and export data from bluetooth devices"}]},{"@type":"WebSite","@id":"https:\/\/www.bleuio.com\/blog\/#website","url":"https:\/\/www.bleuio.com\/blog\/","name":"BleuIO - Create Bluetooth Low Energy application","description":"Learn Bluetooth Low Energy programming and build Bluetooth Low Energy Application","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bleuio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80","name":"BleuIO","sameAs":["https:\/\/www.bleuio.com\/blog"],"url":"https:\/\/www.bleuio.com\/blog\/author\/biadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":1,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":37,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions\/37"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media\/36"}],"wp:attachment":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}