blob: d5518797216f4f12a70fa2301e81e9130a528501 [file] [log] [blame]
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/packages/assets/bootstrap/bootstrap.min.css">
<title>Device</title>
<link rel="stylesheet" href="/packages/assets/css/style.css">
<script src="/packages/assets/js/code.js"></script>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="https://eclipse.org/packages/images/icon/twitter_icon.png"/>
<meta name="twitter:title" content="Telemetry end-to-end | Installation"/>
<meta name="twitter:description" content="Installations instructions for the Telemetry end-to-end package."/>
<link rel="icon" type="image/svg+xml" href="/packages/images/icon/icon.svg" sizes="any">
<link rel="icon" href="/packages/images/icon/icon.png" sizes="192x192">
<link rel="apple-touch-icon-precomposed" href="/packages/images/icon/icon_apple.png" sizes="180x180">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md fixed-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="/packages/">
<img src="/packages/images/icon_brand_navbar.svg" width="30" height="30" alt="Eclipse IoT Packages™">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto"><li class="nav-item">
<a
class="nav-link"
href="/packages/">Home</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="/packages/about/">About</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="/packages/faq/">FAQ</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="/packages/contribute/">Contribute</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="/packages/prereqs/">Prerequisites</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="/packages/repository/">Repository</a>
</li>
</ul>
</div>
</div>
</nav></header>
<main id="main" role="main" >
<div><div class="container mt-5">
<div class="row">
<div class="col-12 col-sm-9 col-xl-8">
<h1>Telemetry end-to-end</h1>
<p class="lead">A package showing telemetry data acquisition end-to-end: Microcontroller firmware to cloud side data processing, using Drogue IoT and Apache Kafka in the process.</p></div>
<div class="col-12 col-sm-3 col-xl-4 d-flex flex-sm-row-reverse">
<img alt="Page logo" src="/packages/packages/telemetry-e2e/images/telemetry-e2e-logo.svg" class="img-fluid m-lg-3 d-block align-self-center " style="max-height: 10rem;"/>
</div>
</div>
</div>
</div>
<div class="container">
<nav class="nav nav-pills nav-fill mt-2 mb-5"><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/">Overview</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/10-installation-cloud/">Cloud</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/20-installation-gateway/">Gateway</a><a class="nav-item nav-link active" href="/packages/packages/telemetry-e2e/30-installation-device/">Device</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/40-using/">Using it</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/50-understand/">Understanding it</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/60-alternatives/">Alternatives</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/70-cheating/">Cheating</a><a class="nav-item nav-link " href="/packages/packages/telemetry-e2e/90-learn/">Learn more</a></nav>
<div class="row">
<div class="col-12 col-md-8 col-lg-9">
<p>For running the sensor firmware, you will need a <a href="https://microbit.org/">micro:bit</a> v2. Unfortunately, the example
does not work with earlier versions of the micro:bit. It also does not work with other boards, like e.g. the
Raspberry Pi Pico (which doesn’t have Bluetooth), or the ESP32 (which has different CPU architecture: Xtensa or RISC-V).
As also the Bluetooth driver is part of the firmware, you cannot simply flash it to a different ARM based device.</p>
<p>However, as the overall example is only relying on Bluetooth, GATT, and the <a href="https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html">micro:bit temperature profile</a>. You can of course drop in your down device, as long it is implementing the same profile.</p>
<p>One alternative to achieve the same, is to use “Make Code” with <a href="https://makecode.microbit.org/_CcAYtycF5Tvy">this example project</a>.</p>
<p>To install the firmware on the micro:bit, you can either use pre-compiled HEX file, or build the firmware using the Rust toolchain.</p>
<h2 id="option-1-installing-pre-compiled-firmware">Option 1: Installing pre-compiled firmware</h2>
<p>The easiest way to get started is to download the pre-compiled firmware <a href="https://github.com/drogue-iot/drogue-device/releases/download/0.4.0/ble-microbit.hex">here</a>. When powering on your micro:bit, it should attach itself as a USB storage device. Copy the downloaded file to the MICROBIT folder. Once the file ‘disappears’ from the folder, the firmware is installed. For more details, have a look at the <a href="instructions">https://microbit.org/get-started/first-steps/set-up/</a>.</p>
<p>Once installed, the text ‘Hello, Drogue’ should slide across the LED matrix display of the micro:bit.</p>
<h2 id="option-2-building-firmware-from-scratch">Option 2: Building firmware from scratch</h2>
<p>Before continuing, make sure your micro:bit is loaded with the default firmware (If you get the noisy greeting when starting the device, you probably have the default firmware).</p>
<h3 id="reset-microbit-to-factory-defaults">Reset micro:bit to factory defaults</h3>
<p>To reset the micro:bit to factory defaults, use <a href="https://cdn.sanity.io/files/ajwvhvgo/production/9f233ee584643d0385d497ff27af54ff9553c5a2.hex?dl=OutOfBoxExperience.hex">this link</a> for downloading the “Out of the box” firmware.</p>
<p>When powering on your micro:bit, it should attach itself as a USB storage device. Copy the downloaded file to the MICROBIT folder. Once the file ‘disappears’ from the folder, the firmware is installed, and the micro:bit should be making some noise. For more details, have a look at the <a href="instructions">https://microbit.org/get-started/first-steps/set-up/</a>.</p>
<h3 id="install-rust">Install Rust</h3>
<p>In order to install Rust, <a href="https://www.rust-lang.org/tools/install">installing <code class="language-plaintext highlighter-rouge">rustup</code></a> is sufficient on most cases:</p>
<div class="clipboard"><pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre></div>
<h3 id="clone-the-firmware-repository">Clone the firmware repository</h3>
<div class="clipboard"><pre><code>git clone https://github.com/drogue-iot/drogue-device.git
git checkout 0.4.0</code></pre></div>
<h3 id="flash-the-device">Flash the device</h3>
<p>Attach the device to your USB port and execute the following command to build and flash the firmware:</p>
<div class="clipboard"><pre><code>cd examples/nrf/microbit/ble-temperature
cargo run --release</code></pre></div>
<p>Once the device is flashed, it will start to announce its services using Bluetooth.</p>
<h2 id="what-is-next">What is next?</h2>
<div role="alert" class="alert alert-success"><h4 class="alert-heading">Congratulations! </h4>
You set up the complete package! Now it is time to look at the data, take a look at the next page!
</div>
</div>
<div class="col-12 col-md-4 col-lg-3
">
<div class="position-sticky" style="top: 4rem;">
<aside>
<div class="card">
<div class="card-body">
<h5 class="card-title">Table of contents</h5>
<div id="toc" class="toc"></div>
</div>
</div>
</aside>
<script>generateToc("#toc", "h2[id], h3[id], h4[id]");</script>
</div>
</div>
</div>
</div>
</main>
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col-6 col-md">
<h5>Eclipse IoT Packages</h5>
<ul class="list-unstyled">
<li>
<a class="text-muted" href="/packages/">Home</a>
</li>
<li>
<a class="text-muted" href="/packages/about">About</a>
</li>
<li>
<a class="text-muted" href="/packages/contribute">Contribute</a>
</li>
<li>
<a class="text-muted" href="https://eclipse.org/security">Security</a>
</li>
</ul>
</div>
<div class="col-6 col-md">
<h5>Eclipse IoT</h5>
<ul class="list-unstyled">
<li>
<a class="text-muted" href="https://iot.eclipse.org">Top Level Project</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/org/workinggroups/iotwg_charter.php">Working group</a>
</li>
</ul>
</div>
<div class="col-6 col-md">
<h5>Legal</h5>
<ul class="list-unstyled">
<li>
<a class="text-muted" href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/legal/epl-2.0/">Eclipse Public License</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/legal">Legal Resources</a>
</li>
</ul>
</div>
<div class="col-6 col-md">
<h5>Eclipse Foundation</h5>
<ul class="list-unstyled">
<li>
<a class="text-muted" href="https://eclipse.org/org">About us</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/org/foundation/contact.php">Contact us</a>
</li>
<li>
<a class="text-muted" href="https://www.eclipse.org/org/foundation/directors.php">Board of Directors</a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12 col-md text-muted">Copyright © Eclipse Foundation, Inc. All Rights Reserved.</div>
</div>
</div>
</footer>
<script src="/packages/assets/popper.min.js"></script>
<script src="/packages/assets/jquery.min.js"></script>
<script src="/packages/assets/bootstrap/bootstrap.min.js"></script>
<script src="/packages/assets/clipboard.min.js"></script>
<script src="/packages/assets/clipboard.js"></script>
</body>
</html>