{"id":1197,"date":"2025-03-11T14:46:35","date_gmt":"2025-03-11T14:46:35","guid":{"rendered":"https:\/\/www.bleuio.com\/blog\/?p=1197"},"modified":"2025-03-17T14:04:23","modified_gmt":"2025-03-17T14:04:23","slug":"how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor","status":"publish","type":"post","link":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/","title":{"rendered":"How to Use BleuIO as a USB Serial Device on Android with Capacitor"},"content":{"rendered":"\n<p>This project demonstrates how to use the BleuIO USB dongle as a serial port on an Android device via OTG (On-The-Go) USB. With Capacitor 6 and the <code>@adeunis\/capacitor-serial<\/code> plugin, we establish a serial connection, send AT commands, and read responses in real time. This project works with both <a href=\"http:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd005.php\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO<\/a> and <a href=\"http:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd025.php\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO Pro<\/a>.<\/p>\n\n\n\n<p>This tutorial provides a step-by-step guide to setting up serial communication with BleuIO on Android. The project connects to BleuIO via a serial port, sends basic <strong>ATI<\/strong> commands, and displays the received response on the screen. This example serves as a starting point for creating, testing, and debugging <a href=\"https:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd025.php\" target=\"_blank\" rel=\"noreferrer noopener\">Bluetooth Low Energy (BLE) applications<\/a>. It can be expanded to support additional commands and functionalities based on specific needs. The <a href=\"https:\/\/github.com\/smart-sensor-devices-ab\/bleuio-serial-android\" target=\"_blank\" rel=\"noreferrer noopener\">full source code<\/a> is available for customization and further development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use Cases<\/h2>\n\n\n\n<p>The BleuIO USB dongle can be used in various applications that require serial communication on Android. One of the most common applications is Bluetooth Low Energy (BLE) development, where developers need to configure and test BLE modules by sending and receiving AT commands. This project allows for mobile debugging and real-time configuration of BLE devices without needing a PC.<\/p>\n\n\n\n<p>Additionally, this setup is valuable for <strong>IoT and embedded systems<\/strong>, where devices communicate over a serial connection. With an Android phone acting as a serial terminal, engineers and developers can test, monitor, and debug hardware components in the field without requiring a laptop. Another important use case is USB-to-serial debugging, where embedded system engineers need to send commands and receive logs directly from an Android device using OTG.<\/p>\n\n\n\n<p>For those working with sensor modules, microcontrollers, or custom embedded systems, this project simplifies the process of sending commands and reading responses directly from a mobile device. It also serves as an excellent starting point for developing Android applications that require serial communication through Capacitor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Do We Need This?<\/h2>\n\n\n\n<p>Android devices do not natively support USB-to-serial communication. Unlike computers, which come with built-in serial drivers and terminal software, Android does not provide a direct way to communicate with serial devices over USB. This makes it difficult for developers, engineers, and embedded system designers to interact with BLE modules, sensors, and microcontrollers.<\/p>\n\n\n\n<p>By using Capacitor 6 with the <code>@adeunis\/capacitor-serial<\/code> plugin, we can bridge this gap and allow Android devices to function as serial terminals. This is especially useful when working with devices like <strong><a href=\"https:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd005.php\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO<\/a><\/strong>, where real-time communication is essential for configuring, testing, and debugging Bluetooth applications.<\/p>\n\n\n\n<p>This project removes the need for external adapters or complex Android development, leveraging Capacitor\u2019s web-based approach. It offers a simple and scalable way to integrate serial communication into mobile applications without requiring in-depth knowledge of Android\u2019s USB APIs or native development tools.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Requirements<\/h2>\n\n\n\n<p>To use this project, you need a few essential components to establish <strong>serial communication between an Android device and BleuIO<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"http:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd005.php\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO<\/a> or <a href=\"http:\/\/bleuio.com\/bluetooth-low-energy-usb-ssd025.php\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO Pro<\/a><\/strong> \u2013 The USB dongle used for Bluetooth Low Energy (BLE) communication. This project is designed to interact with BleuIO over a USB serial connection.<\/li>\n\n\n\n<li><strong>Android Device<\/strong> \u2013 A smartphone or tablet that supports USB OTG (On-The-Go), allowing it to function as a USB host and communicate with external devices.<\/li>\n\n\n\n<li><strong>OTG Cable or Adapter<\/strong> \u2013 Required to connect BleuIO to the Android device. Since most smartphones have USB-C or Micro-USB ports, an OTG adapter is needed to interface with the USB-A connector of BleuIO.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installation &amp; Setup<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Install Node.js &amp; Capacitor 6<\/h4>\n\n\n\n<p>BleuIO communication requires the <strong>@adeunis\/capacitor-serial<\/strong> plugin, which is only compatible with <strong>Capacitor 6<\/strong>.<\/p>\n\n\n\n<p>\ud83d\udc49 First, install Node.js (if not installed):<br><a href=\"https:\/\/nodejs.org\/\">Download Node.js<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create a Capacitor 6 Project<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mkdir bleuio-serial<br>cd bleuio-serial<br>npm init -y<br>npm install @capacitor\/core@6 @capacitor\/cli@6<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install Android Platform<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>npm install @capacitor\/android@6<br>npx cap add android<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install Serial Communication Plugin<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>npm install @adeunis\/capacitor-serial<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Ensure JDK 17 is Installed<\/h4>\n\n\n\n<p>Capacitor 6 requires <strong>JDK 17<\/strong>. Install it via:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt install openjdk-17-jdk  # Linux<br>brew install openjdk@17           # macOS<br><\/code><\/pre>\n\n\n\n<p>Verify installation:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>java -version<br><\/code><\/pre>\n\n\n\n<p>It should output something like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openjdk version \"17.0.x\"<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">OTG Permissions on Android<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Why Do We Need OTG Permissions?<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Android devices do not natively support serial USB communication.<\/li>\n\n\n\n<li>OTG permissions allow USB host mode, so Android can communicate with external serial devices.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">How to Enable OTG Permissions?<\/h4>\n\n\n\n<p>Modify <code>AndroidManifest.xml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;uses-feature android:name=\"android.hardware.usb.host\"\/&gt;<br>&lt;uses-permission android:name=\"android.permission.USB_PERMISSION\"\/&gt;<br><\/code><\/pre>\n\n\n\n<p>Then, create <code>device_filter.xml<\/code> inside <code>android\/app\/src\/main\/res\/xml\/<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<br>&lt;resources&gt;<br>    &lt;usb-device vendor-id=\"0x2DCF\" product-id=\"0x6002\" \/&gt;<br>&lt;\/resources&gt;<br><\/code><\/pre>\n\n\n\n<p>These values match the <strong>BleuIO Vendor ID &amp; Product ID<\/strong>, allowing the system to recognize it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project Code Explanation<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\"><code>index.html<\/code><\/h4>\n\n\n\n<p>This file provides <strong>buttons<\/strong> to connect to BleuIO and send AT commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;!DOCTYPE html&gt;<br>&lt;html lang=\"en\"&gt;<br>&lt;head&gt;<br>    &lt;meta charset=\"UTF-8\"&gt;<br>    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;<br>    &lt;title&gt;BleuIO Serial Communication&lt;\/title&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>    &lt;h2&gt;BleuIO Serial Communication&lt;\/h2&gt;<br><br>    &lt;button onclick=\"connectToSerial()\"&gt;Connect to BleuIO&lt;\/button&gt;<br>    &lt;button onclick=\"sendATCommand()\"&gt;Send ATI Command&lt;\/button&gt;<br><br>    &lt;p&gt;&lt;strong&gt;Response:&lt;\/strong&gt;&lt;\/p&gt;<br>    &lt;pre id=\"response\"&gt;Waiting for response...&lt;\/pre&gt;<br><br>    &lt;script src=\"index.js\" defer&gt;&lt;\/script&gt;<br>&lt;\/body&gt;<br>&lt;\/html&gt;<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><code>index.js<\/code><\/h4>\n\n\n\n<p>This file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requests USB permission<\/li>\n\n\n\n<li>Opens a serial connection<\/li>\n\n\n\n<li>Sends and reads AT commands<\/li>\n\n\n\n<li>Handles continuous data streaming from BleuIO<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>const Serial = window.Capacitor.Plugins.Serial;<br><br>\/\/ Vendor ID &amp; Product ID for BleuIO<br>const VENDOR_ID = 0x2DCF;<br>const PRODUCT_ID = 0x6002;<br><br>let fullResponse = \"\"; \/\/ Stores incoming data<br><br>async function connectToSerial() {<br>    console.log(\"Requesting permission for BleuIO...\");<br><br>    try {<br>        const permissionResponse = await Serial.requestSerialPermissions({<br>            vendorId: VENDOR_ID,<br>            productId: PRODUCT_ID,<br>            driver: \"CDC_ACM_SERIAL_DRIVER\"<br>        });<br><br>        if (!permissionResponse.granted) {<br>            console.error(\"Permission denied!\");<br>            document.getElementById(\"response\").textContent = \"Permission denied!\";<br>            return;<br>        }<br><br>        console.log(\"Opening serial connection...\");<br>        await Serial.openConnection({<br>            baudRate: 115200,<br>            dataBits: 8,<br>            stopBits: 1,<br>            parity: 0,<br>            dtr: true,<br>            rts: true<br>        });<br><br>        console.log(\"Serial connection opened!\");<br>        document.getElementById(\"response\").textContent = \"Connected to BleuIO!\";<br><br>        fullResponse = \"\"; \/\/ Clear previous response<br><br>        \/\/ Register read callback to receive data continuously<br>        await Serial.registerReadCallback((message, error) =&gt; {<br>            if (message &amp;&amp; message.data) {<br>                console.log(\"Received Data:\", message.data);<br>                fullResponse += message.data + \"\\n\";<br>                document.getElementById(\"response\").textContent = fullResponse;<br>            } else if (error) {<br>                console.error(\"Read error:\", error);<br>            }<br>        });<br><br>    } catch (error) {<br>        console.error(\"Connection error:\", error);<br>        document.getElementById(\"response\").textContent = \"Connection error.\";<br>    }<br>}<br><br>async function sendATCommand() {<br>    console.log(\"Sending ATI command...\");<br><br>    try {<br>        fullResponse = \"\"; \/\/ Clear response buffer<br>        await Serial.write({ data: \"ATI\\r\\n\" });<br><br>        console.log(\"ATI command sent!\");<br>        console.log(\"Waiting for response...\");<br><br>    } catch (error) {<br>        console.error(\"Command error:\", error);<br>    }<br>}<br><br>\/\/ Expose functions globally<br>window.connectToSerial = connectToSerial;<br>window.sendATCommand = sendATCommand;<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Running the App<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Sync and Build<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>npx cap sync android<br>npx cap run android<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Open the App<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect BleuIO to Android via OTG.<\/li>\n\n\n\n<li>Click &#8220;Connect to BleuIO&#8221; \u2192 A permission prompt should appear.<\/li>\n\n\n\n<li>Click &#8220;Send ATI Command&#8221; \u2192 Response should appear.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Final Results<\/h2>\n\n\n\n<p>After running, you should see output like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Smart Sensor Devices AB<br>DA14695<br>BleuIO Pro<br>Firmware Version: 1.0.3b8<br><br>Dual role<br><br>Not Connected<br><br>Not Advertising<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"506\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1.png\" alt=\"\" class=\"wp-image-1214\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1.png 800w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1-300x190.png 300w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1-768x486.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"553\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1024x553.png\" alt=\"\" class=\"wp-image-1198\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1024x553.png 1024w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-300x162.png 300w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-768x415.png 768w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image-1536x829.png 1536w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/image.png 1945w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Source code <\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/smart-sensor-devices-ab\/bleuio-serial-android\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/smart-sensor-devices-ab\/bleuio-serial-android<\/a><\/p>\n\n\n\n<p>This project demonstrates how to use the BleuIO USB dongle as a serial communication device on an Android phone. By leveraging Capacitor 6 and the <code>@adeunis\/capacitor-serial<\/code> plugin, we successfully established a serial connection, sent AT commands, and received responses via USB OTG.<\/p>\n\n\n\n<p>This project is also available in typescript. Here is the source code with typescript<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/smart-sensor-devices-ab\/bleuio-serial-android-typescript\">https:\/\/github.com\/smart-sensor-devices-ab\/bleuio-serial-android-typescript<\/a><\/p>\n\n\n\n<p>With the growing demand for mobile-first development and hardware interaction via smartphones, this project provides a solid foundation for further expanding serial communication capabilities on Android.<br><br><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This project demonstrates how to use the BleuIO USB dongle as a serial port on an Android device via OTG (On-The-Go) USB. With Capacitor 6 and the @adeunis\/capacitor-serial plugin, we establish a serial connection, send AT commands, and read responses in real time. This project works with both BleuIO and BleuIO Pro. This tutorial provides [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1213,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-1197","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.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use BleuIO as a USB Serial Device on Android with Capacitor - 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\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use BleuIO as a USB Serial Device on Android with Capacitor - BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"og:description\" content=\"This project demonstrates how to use the BleuIO USB dongle as a serial port on an Android device via OTG (On-The-Go) USB. With Capacitor 6 and the @adeunis\/capacitor-serial plugin, we establish a serial connection, send AT commands, and read responses in real time. This project works with both BleuIO and BleuIO Pro. This tutorial provides [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/\" \/>\n<meta property=\"og:site_name\" content=\"BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-11T14:46:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-17T14:04:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"990\" \/>\n\t<meta property=\"og:image:height\" content=\"604\" \/>\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\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/\"},\"author\":{\"name\":\"BleuIO\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"headline\":\"How to Use BleuIO as a USB Serial Device on Android with Capacitor\",\"datePublished\":\"2025-03-11T14:46:35+00:00\",\"dateModified\":\"2025-03-17T14:04:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/\"},\"wordCount\":848,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/serial-communication-with-android-capacitor.jpg\",\"articleSection\":[\"BleuIO\",\"BleuIO tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/\",\"name\":\"How to Use BleuIO as a USB Serial Device on Android with Capacitor - BleuIO - Create Bluetooth Low Energy application\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/serial-communication-with-android-capacitor.jpg\",\"datePublished\":\"2025-03-11T14:46:35+00:00\",\"dateModified\":\"2025-03-17T14:04:23+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/serial-communication-with-android-capacitor.jpg\",\"contentUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/serial-communication-with-android-capacitor.jpg\",\"width\":990,\"height\":604},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use BleuIO as a USB Serial Device on Android with Capacitor\"}]},{\"@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":"How to Use BleuIO as a USB Serial Device on Android with Capacitor - 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\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/","og_locale":"en_US","og_type":"article","og_title":"How to Use BleuIO as a USB Serial Device on Android with Capacitor - BleuIO - Create Bluetooth Low Energy application","og_description":"This project demonstrates how to use the BleuIO USB dongle as a serial port on an Android device via OTG (On-The-Go) USB. With Capacitor 6 and the @adeunis\/capacitor-serial plugin, we establish a serial connection, send AT commands, and read responses in real time. This project works with both BleuIO and BleuIO Pro. This tutorial provides [&hellip;]","og_url":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/","og_site_name":"BleuIO - Create Bluetooth Low Energy application","article_published_time":"2025-03-11T14:46:35+00:00","article_modified_time":"2025-03-17T14:04:23+00:00","og_image":[{"width":990,"height":604,"url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.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\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#article","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/"},"author":{"name":"BleuIO","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"headline":"How to Use BleuIO as a USB Serial Device on Android with Capacitor","datePublished":"2025-03-11T14:46:35+00:00","dateModified":"2025-03-17T14:04:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/"},"wordCount":848,"commentCount":0,"image":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.jpg","articleSection":["BleuIO","BleuIO tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/","url":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/","name":"How to Use BleuIO as a USB Serial Device on Android with Capacitor - BleuIO - Create Bluetooth Low Energy application","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#primaryimage"},"image":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.jpg","datePublished":"2025-03-11T14:46:35+00:00","dateModified":"2025-03-17T14:04:23+00:00","author":{"@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"breadcrumb":{"@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#primaryimage","url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.jpg","contentUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2025\/03\/serial-communication-with-android-capacitor.jpg","width":990,"height":604},{"@type":"BreadcrumbList","@id":"https:\/\/www.bleuio.com\/blog\/how-to-use-bleuio-as-a-usb-serial-device-on-android-with-capacitor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bleuio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use BleuIO as a USB Serial Device on Android with Capacitor"}]},{"@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\/1197","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=1197"}],"version-history":[{"count":10,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/1197\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/1197\/revisions\/1218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media\/1213"}],"wp:attachment":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media?parent=1197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/categories?post=1197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/tags?post=1197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}