{"id":574,"date":"2024-01-16T07:18:03","date_gmt":"2024-01-16T07:18:03","guid":{"rendered":"https:\/\/www.bleuio.com\/blog\/?p=574"},"modified":"2024-01-16T10:08:49","modified_gmt":"2024-01-16T10:08:49","slug":"building-ble-web-application-with-python-flask-and-bleuio","status":"publish","type":"post","link":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/","title":{"rendered":"Building BLE web application with Python Flask and BleuIO"},"content":{"rendered":"\n<p>Bluetooth Low Energy (BLE) is a powerful technology for connecting devices wirelessly, and developing applications for BLE devices can be both exciting and challenging. In this tutorial, we&#8217;ll explore how to create a simple BLE device scanner using Python, Flask, and the BleuIO USB dongle. The BleuIO dongle provides a convenient interface through AT commands, allowing developers to easily interact with BLE devices.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before we dive into the tutorial, make sure you have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.bleuio.com\/\">BleuIO USB dongle<\/a><\/li>\n\n\n\n<li>Python installed on your machine<\/li>\n\n\n\n<li>Flask installed (<code>pip install flask<\/code>)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up the Flask App<\/h2>\n\n\n\n<p>Let&#8217;s start by examining the Python Flask code provided in <code>app.py<\/code>. This code defines a Flask web application with two routes: the home route (<code>\/<\/code>) and a route to run the BLE device scan (<code>\/run_scan<\/code>). The app uses the <code>serial<\/code> library to communicate with the BleuIO dongle over the serial port.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from flask import Flask, render_template, request\nimport serial\nimport time\n\napp = Flask(__name__)\n\ndef scan_ble_devices():\n    connecting_to_dongle = 0\n    print(\"Connecting to dongle...\")\n\n    while connecting_to_dongle == 0:\n        try:\n            console = serial.Serial(\n                port='\/dev\/cu.usbmodem4048FDE52DAF1',\n                baudrate=57600,\n                parity=\"N\",\n                stopbits=1,\n                bytesize=8,\n                timeout=0\n            )\n            if console.is_open.__bool__():\n                connecting_to_dongle = 1\n        except:\n            print(\"Dongle not connected. Please reconnect Dongle.\")\n            time.sleep(5)\n\n    console.write(str.encode(\"AT+CENTRAL\"))\n    console.write('\\r'.encode())\n    time.sleep(0.1)\n    console.write(str.encode(\"AT+GAPSCAN=2\"))\n    console.write('\\r'.encode())\n    time.sleep(3)\n    json_responses = &#91;]\n\n    while console.inWaiting() > 0:\n        line = console.readline().decode().strip()\n        print(line)\n        if line.startswith('&#91;'):\n            json_responses.append(line)\n    \n    console.close()\n    return json_responses\n\n@app.route('\/')\ndef home():\n    return render_template('index.html')\n\n@app.route('\/run_scan', methods=&#91;'POST'])\ndef run_scan():\n    if request.method == 'POST':\n        json_responses = scan_ble_devices()\n        \n        return render_template('index.html', json_responses=json_responses)\n\nif __name__ == '__main__':\n    app.run(debug=True,port=5001)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">HTML Template (index.html)<\/h2>\n\n\n\n<p>The HTML template (<code>index.html<\/code>) defines a simple web page with a button to trigger the BLE device scan. The page displays the results of the scan in an unordered list. Make sure the index.html file should stay inside template folder. so the folder structure should be like this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u251c\u2500\u2500 app.py\n\u2514\u2500\u2500 templates\n    \u2514\u2500\u2500 index.html<\/code><\/pre>\n\n\n\n<p>Code for index.html is provided below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n&lt;!DOCTYPE html>\n&lt;html lang=\"en\">\n  &lt;head>\n    &lt;meta charset=\"UTF-8\" \/>\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n    &lt;title>Flask BLE Device Scanner&lt;\/title>\n    &lt;link\n      href=\"\/\/cdn.muicss.com\/mui-0.10.3\/css\/mui.min.css\"\n      rel=\"stylesheet\"\n      type=\"text\/css\"\n    \/>\n  &lt;\/head>\n  &lt;body>\n    &lt;div class=\"mui-container\">\n      &lt;br \/>&lt;br \/>\n      &lt;div class=\"mui-panel\">\n        &lt;img\n          src=\"https:\/\/flask.palletsprojects.com\/en\/3.0.x\/_images\/flask-horizontal.png\"\n          alt=\"\"\n          height=\"100\"\n        \/>\n        &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\n        &lt;img\n          src=\"https:\/\/1000logos.net\/wp-content\/uploads\/2020\/08\/Python-Logo.png\"\n          alt=\"\"\n          height=\"100\"\n        \/>\n        &lt;h1>Hello, Python BLE programmer!&lt;\/h1>\n        &lt;p>\n          This is a simple web page created with Flask to interact with BLE\n          devices nearby.\n        &lt;\/p>\n\n        &lt;form action=\"\/run_scan\" method=\"post\">\n          &lt;button\n            type=\"submit\"\n            class=\"mui-btn mui-btn--primary mui-btn--raised\"\n          >\n            Scan for BLE Devices\n          &lt;\/button>\n        &lt;\/form>\n        &lt;br \/>\n\n        {% if json_responses %}\n        &lt;ul class=\"mui-list--unstyled\">\n          {% for json_response in json_responses %}\n          &lt;li style=\"margin-bottom: 10px\">\n            &amp;#10003; {{ json_response | safe }}\n          &lt;\/li>\n          {% endfor %}\n        &lt;\/ul>\n        {% endif %}\n      &lt;\/div>\n    &lt;\/div>\n  &lt;\/body>\n&lt;\/html>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Explaining the Code<\/h2>\n\n\n\n<p>Let&#8217;s dive into the connection part of the code and explain how the serial port is specified and why it is essential.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>console = serial.Serial(\n    port='\/dev\/cu.usbmodem4048FDE52DAF1',\n    baudrate=57600,\n    parity=\"N\",\n    stopbits=1,\n    bytesize=8,\n    timeout=0\n)<\/code><\/pre>\n\n\n\n<p>In this code snippet, the <code>serial.Serial<\/code> function is used to create a serial port object (<code>console<\/code>) for communication with the BleuIO dongle. Let&#8217;s break down the parameters used in this function:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>port<\/code><\/strong>: Specifies the name or address of the port to which the BleuIO dongle is connected. In this case, it is set to <code>'\/dev\/cu.usbmodem4048FDE52DAF1'<\/code>. <br>On <strong>macOS<\/strong>, <code>\/dev\/cu.*<\/code> represents serial ports, and by running <code>ls \/dev\/cu.*<\/code> in the terminal, you can see a list of connected devices. The specific port for the BleuIO dongle is copied from this list and pasted into the code. <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"171\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-1-1024x171.png\" alt=\"\" class=\"wp-image-576\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-1-1024x171.png 1024w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-1-300x50.png 300w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-1-768x128.png 768w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-1.png 1068w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For windows the COM port information can be found here. Here the path for the dongle is COM14<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"356\" height=\"323\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image.png\" alt=\"\" class=\"wp-image-575\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image.png 356w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/image-300x272.png 300w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>baudrate<\/code><\/strong>: Sets the baud rate for communication. The BleuIO dongle communicates at a baud rate of 57600, so it is set accordingly.<\/li>\n\n\n\n<li><strong><code>parity<\/code><\/strong>: Specifies the parity checking scheme. In this case, it is set to &#8220;N&#8221; for no parity.<\/li>\n\n\n\n<li><strong><code>stopbits<\/code><\/strong>: Defines the number of stop bits. It is set to 1, which is a common configuration.<\/li>\n\n\n\n<li><strong><code>bytesize<\/code><\/strong>: Sets the number of data bits. It is set to 8, which is standard for most serial communication.<\/li>\n\n\n\n<li><strong><code>timeout<\/code><\/strong>: Sets the timeout for read operations. It is set to 0, meaning no timeout, allowing the code to wait indefinitely for responses from the BleuIO dongle.<\/li>\n<\/ul>\n\n\n\n<p>It&#8217;s crucial to accurately specify the port to establish a successful connection between the Flask application and the BleuIO dongle. Incorrect port information will result in a failure to establish communication.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Connecting to BleuIO Dongle<\/strong>: The <code>scan_ble_devices<\/code> function attempts to establish a connection with the BleuIO dongle over the serial port. It retries until the connection is successful.<\/li>\n\n\n\n<li><strong>Sending AT Commands<\/strong>: The function sends specific AT commands to the dongle to set it in central mode (<code>AT+CENTRAL<\/code>) and initiate a BLE device scan for two seconds (<code>AT+GAPSCAN=2<\/code>).<\/li>\n\n\n\n<li><strong>Parsing JSON Responses<\/strong>: The function reads and parses the JSON responses received from the dongle. It collects the responses in a list (<code>json_responses<\/code>).<\/li>\n\n\n\n<li><strong>Flask Routes<\/strong>: The Flask app has two routes \u2013 the home route (<code>\/<\/code>) renders the <code>index.html<\/code> template, and the <code>\/run_scan<\/code> route triggers the BLE device scan and displays the results<\/li>\n<\/ol>\n\n\n\n<p>To run the script simply run the following code on the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python app.py\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Output <\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"517\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-1024x517.png\" alt=\"\" class=\"wp-image-577\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-1024x517.png 1024w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-300x151.png 300w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-768x388.png 768w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-1536x775.png 1536w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/Flask-BLE-Device-Scanner-2048x1033.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this tutorial, we&#8217;ve explored how to create a simple BLE device scanner using Python, Flask, and the BleuIO USB dongle. The combination of Flask and BleuIO&#8217;s AT commands provides a straightforward way for Python developers to interact with BLE devices, making BLE application development more accessible and efficient. You can further extend this project by adding features like connecting to specific BLE devices, reading characteristics, or even controlling devices. <br>Details of the AT commands available on the <a href=\"https:\/\/www.bleuio.com\/getting_started\/docs\/commands\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>BleuIO documentation. <\/strong><\/a><\/p>\n\n\n\n<p>To get started, make sure to have your BleuIO dongle, install Flask, and run the provided Python script. Happy BLE programming!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bluetooth Low Energy (BLE) is a powerful technology for connecting devices wirelessly, and developing applications for BLE devices can be both exciting and challenging. In this tutorial, we&#8217;ll explore how to create a simple BLE device scanner using Python, Flask, and the BleuIO USB dongle. The BleuIO dongle provides a convenient interface through AT commands, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":578,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-574","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>Building BLE web application with Python Flask and BleuIO - 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\/building-ble-web-application-with-python-flask-and-bleuio\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building BLE web application with Python Flask and BleuIO - BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"og:description\" content=\"Bluetooth Low Energy (BLE) is a powerful technology for connecting devices wirelessly, and developing applications for BLE devices can be both exciting and challenging. In this tutorial, we&#8217;ll explore how to create a simple BLE device scanner using Python, Flask, and the BleuIO USB dongle. The BleuIO dongle provides a convenient interface through AT commands, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/\" \/>\n<meta property=\"og:site_name\" content=\"BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-16T07:18:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-16T10:08:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1664\" \/>\n\t<meta property=\"og:image:height\" content=\"928\" \/>\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\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/\"},\"author\":{\"name\":\"BleuIO\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"headline\":\"Building BLE web application with Python Flask and BleuIO\",\"datePublished\":\"2024-01-16T07:18:03+00:00\",\"dateModified\":\"2024-01-16T10:08:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/\"},\"wordCount\":682,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/python-flask-ble-application.jpg\",\"articleSection\":[\"BleuIO\",\"BleuIO tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/\",\"name\":\"Building BLE web application with Python Flask and BleuIO - BleuIO - Create Bluetooth Low Energy application\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/python-flask-ble-application.jpg\",\"datePublished\":\"2024-01-16T07:18:03+00:00\",\"dateModified\":\"2024-01-16T10:08:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/python-flask-ble-application.jpg\",\"contentUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/python-flask-ble-application.jpg\",\"width\":1664,\"height\":928,\"caption\":\"python flask ble application\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/building-ble-web-application-with-python-flask-and-bleuio\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building BLE web application with Python Flask and BleuIO\"}]},{\"@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":"Building BLE web application with Python Flask and BleuIO - 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\/building-ble-web-application-with-python-flask-and-bleuio\/","og_locale":"en_US","og_type":"article","og_title":"Building BLE web application with Python Flask and BleuIO - BleuIO - Create Bluetooth Low Energy application","og_description":"Bluetooth Low Energy (BLE) is a powerful technology for connecting devices wirelessly, and developing applications for BLE devices can be both exciting and challenging. In this tutorial, we&#8217;ll explore how to create a simple BLE device scanner using Python, Flask, and the BleuIO USB dongle. The BleuIO dongle provides a convenient interface through AT commands, [&hellip;]","og_url":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/","og_site_name":"BleuIO - Create Bluetooth Low Energy application","article_published_time":"2024-01-16T07:18:03+00:00","article_modified_time":"2024-01-16T10:08:49+00:00","og_image":[{"width":1664,"height":928,"url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.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\/building-ble-web-application-with-python-flask-and-bleuio\/#article","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/"},"author":{"name":"BleuIO","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"headline":"Building BLE web application with Python Flask and BleuIO","datePublished":"2024-01-16T07:18:03+00:00","dateModified":"2024-01-16T10:08:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/"},"wordCount":682,"commentCount":0,"image":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.jpg","articleSection":["BleuIO","BleuIO tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/","url":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/","name":"Building BLE web application with Python Flask and BleuIO - BleuIO - Create Bluetooth Low Energy application","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#primaryimage"},"image":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.jpg","datePublished":"2024-01-16T07:18:03+00:00","dateModified":"2024-01-16T10:08:49+00:00","author":{"@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"breadcrumb":{"@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#primaryimage","url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.jpg","contentUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/01\/python-flask-ble-application.jpg","width":1664,"height":928,"caption":"python flask ble application"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bleuio.com\/blog\/building-ble-web-application-with-python-flask-and-bleuio\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bleuio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building BLE web application with Python Flask and BleuIO"}]},{"@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\/574","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=574"}],"version-history":[{"count":1,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":579,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/574\/revisions\/579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media\/578"}],"wp:attachment":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}