mirror of
https://github.com/jomjol/AI-on-the-edge-device-docs.git
synced 2025-12-08 12:36:54 +03:00
341 lines
18 KiB
HTML
341 lines
18 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://jomjol.github.io/AI-on-the-edge-device-docs/Frequent-Reboots/" />
|
||
<link rel="shortcut icon" href="../img/favicon.ico" />
|
||
<title>Frequent Reboots - AI on the Edge Device</title>
|
||
<link rel="stylesheet" href="../css/theme.css" />
|
||
<link rel="stylesheet" href="../css/theme_extra.css" />
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||
|
||
<script>
|
||
// Current page data
|
||
var mkdocs_page_name = "Frequent Reboots";
|
||
var mkdocs_page_input_path = "Frequent-Reboots.md";
|
||
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Frequent-Reboots/";
|
||
</script>
|
||
|
||
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
||
<!--[if lt IE 9]>
|
||
<script src="../js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||
<script>hljs.initHighlightingOnLoad();</script>
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav" role="document">
|
||
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search">
|
||
<img src=https://jomjol.github.io/AI-on-the-edge-device-docs//img/logo.png>
|
||
<a href=".." class="icon icon-home"> AI on the Edge Device
|
||
</a><div role="search">
|
||
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<p class="caption"><span class="caption-text">Getting Started</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="..">Welcome</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../initial-setup/">Initial Setup</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Hardware-Compatibility/">Hardware Compatibility</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Best-Practice/">Best Practice</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">External Links</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/releases">Releases</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="" href="https://jomjol.github.io/AI-on-the-edge-device/index.html">Web Installer/Console</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/issues">Place an Issue</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/discussions">Join a Discussion</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Configuration</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Reference-Image/">Reference Image</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Alignment/">Alignment References</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROIs (Regions of Interest)</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Graphical Configuration</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Model Selection</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../ota/">Over-The-Air (OTA) Update</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Advanced</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Parameters/">Parameters</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Integration-Home-Assistant/">Integration into Home Assistant</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../External-LED/">External LED</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../rolling-installation/">Living on the Edge</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Analog/Digital Transition on Water Meters</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../collect-new-images/">Collect images to improve the models</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn a model with your own images</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Correction%20Algorithm/">Correction Algorithm</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Neural-Network-Types/">Neural Network Types</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Additional-Information/">Additional Information</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../New-Releases-Notification/">Notification about new Releases</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Troubleshooting</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../Error-Codes/">Error Codes</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Error-Debugging/">Error Debugging</a>
|
||
</li>
|
||
<li class="toctree-l1 current"><a class="reference internal current" href="./">Frequent Reboots</a>
|
||
<ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="#random-reboots">Random reboots</a>
|
||
<ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#overload-during-html-access">Overload during HTML access</a>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#unstable-system">Unstable system</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#permanent-reboots">Permanent reboots</a>
|
||
<ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#sd-card-problems">SD card problems</a>
|
||
<ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#no-sd-card">No SD card</a>
|
||
</li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#sd-card-not-supported-at-all">SD card not supported at all</a>
|
||
</li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#sd-card-recognized-but-not-supported">SD card recognized but not supported</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#psram-too-low">PSRAM too low</a>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#configuration-missing">Configuration missing</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Demo-Mode/">Demo Mode</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">API's</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">MQTT API</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Influx-DB/">Influx DB</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Development</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">Build the Project</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Upload-files-by-script/">Scripted File Upload</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Preparing for Release</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Old Pages (no longer maintained)</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../outdated--Integrated-Functions/">Integrated Functions</a>
|
||
</li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Assorted Pages</span></p>
|
||
<ul>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="..">AI on the Edge Device</a>
|
||
|
||
</nav>
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
||
<li>Troubleshooting »</li>
|
||
<li>Frequent Reboots</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/docs/Frequent-Reboots.md" class="icon icon-github"> Edit on GitHub</a>
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div class="section" itemprop="articleBody">
|
||
|
||
<h1 id="frequent-reboots">Frequent Reboots</h1>
|
||
<p>There are several types of reboots. To get a deeper insight turn on the logging:</p>
|
||
<ol>
|
||
<li>Internal logging (<code>config.ini</code>)</li>
|
||
<li>Serial log of the UART interface (same as for flashing the firmware)</li>
|
||
</ol>
|
||
<p>There are two principle types of reboots</p>
|
||
<ol>
|
||
<li>Random reboots (always different timing and situation)</li>
|
||
<li>Permanent Reboots always at the same time</li>
|
||
</ol>
|
||
<hr />
|
||
<h3 id="random-reboots">Random reboots</h3>
|
||
<p>Random reboots have two reasons: overload during HTML access and unstable system</p>
|
||
<p>In general: there are several mechanisms in the firmware (like saving previous values), to have a "smooth" reboot without too many notable disturbance.</p>
|
||
<h5 id="overload-during-html-access">Overload during HTML access</h5>
|
||
<p>If you frequently access the web server over HTML requests, the firmware tends to reboot. This especially happens during the first run and when the ESP32 is busy with the digitization flow. </p>
|
||
<p>The reason for this are running out of memory during a flow, minor memory leakage in combination with missing error handling.</p>
|
||
<p>There is noting you can do about this kind of reboot, beside two thing:</p>
|
||
<ol>
|
||
<li>Support the firmware development with improved and tested part of code</li>
|
||
<li>Be patient :-)</li>
|
||
</ol>
|
||
<h5 id="unstable-system">Unstable system</h5>
|
||
<p>If your system is sometimes running smoothly over several runs and sometimes reboots obviously randomly, you have an partially unstable device. </p>
|
||
<p>You can check this in the standard log file on the SD card:</p>
|
||
<pre><code>2021-12-26T06:34:09: task_autodoFlow - round done
|
||
2021-12-26T06:34:09: CPU Temperature: 56.1
|
||
2021-12-26T06:38:00: task_autodoFlow - next round - Round #23
|
||
</code></pre>
|
||
<p>Here you see, that the round #23 is starting, so obviously there were no reboots in the last 22 rounds. There is hardware (ESP32CAM), where only 2-3 stable rounds are possible and others, where way more than 100 rounds without any reboots is possible.
|
||
There is noting you can do about it, beside testing different hardware.</p>
|
||
<hr />
|
||
<h3 id="permanent-reboots">Permanent reboots</h3>
|
||
<p>Permanent reboots at the same situation during the flow has a systematic problem either in the hardware or the configuration. It usually happens during the first run as there all needed parts of the firmware have been loaded for the first time.</p>
|
||
<p>To find the reason mostly the serial log of the UART interface from the startup until the reboots is very helpful. It can be stored using the USB / UART interface - the same as for flashing the firmware - and logging the serial output of the ESP32.</p>
|
||
<p>Possible problems:</p>
|
||
<ul>
|
||
<li>
|
||
<p>SD card</p>
|
||
</li>
|
||
<li>
|
||
<p>PSRAM too low</p>
|
||
</li>
|
||
<li>Configuration missing</li>
|
||
</ul>
|
||
<h5 id="sd-card-problems">SD card problems</h5>
|
||
<p>The ESP32CAM is a little bit "picky" with the supported SD cards. Due to the limited availability of GPIOs the SD card can only be accessed via 1-wire mode. Therefore not all SD cards are supported. Several error cases can happen:</p>
|
||
<h6 id="no-sd-card">No SD card</h6>
|
||
<p>Easy to detect: fast blinking red LED directly after startup, no reaction of the web server etc. at all</p>
|
||
<h6 id="sd-card-not-supported-at-all">SD card not supported at all</h6>
|
||
<p>Error message of no detectable SC card in the log file. <strong>Normal looking</strong> log for a 16GB SD card is like this:</p>
|
||
<pre><code>09:38:25.037 -> [0;32mI (4789) main: Using SDMMC peripheral[0m
|
||
09:38:25.037 -> [0;32mI (4789) main: Using SDMMC peripheral[0m
|
||
09:38:25.138 -> Name: SC16G
|
||
09:38:25.138 -> Type: SDHC/SDXC
|
||
09:38:25.138 -> Speed: 20 MHz
|
||
09:38:25.138 -> Size: 15193MB
|
||
</code></pre>
|
||
<p>Otherwise there is some error message.</p>
|
||
<h6 id="sd-card-recognized-but-not-supported">SD card recognized but not supported</h6>
|
||
<p>This is the most annoying error. The SD card is detected, but the files cannot be read. Most probably this results in a problem with the WLAN connection, as the first file needed is the <code>wlan.ini</code> in the root directory.</p>
|
||
<h5 id="psram-too-low">PSRAM too low</h5>
|
||
<p>In order to work, there are 4 MB of PSRAM necessary. Normally the ESP32CAM is equipped with 8 MB, whereof only 4 MB can be used effectively.
|
||
Sometimes, there is hardware, where only 2 MB of PSRAM is present - <strong>even if you have bought a 8 MB module</strong></p>
|
||
<p>You can identify the amount of PSRAM in the serial log file:</p>
|
||
<pre><code>09:38:21.224 -> [0;32mI (881) psram: This chip is ESP32-D0WD[0m
|
||
09:38:21.224 -> [0;32mI (885) spiram: Found 64MBit SPI RAM device[0m
|
||
09:38:21.224 -> [0;32mI (890) spiram: SPI RAM mode: flash 40m sram 40m[0m
|
||
09:38:21.224 -> [0;32mI (895) spiram: PSRAM initialized, cache is in low/high (2-core) mode.[0m
|
||
</code></pre>
|
||
<p>Here you see 64MBit (= 8MByte) - which is okay. False reading would be: 16MBit</p>
|
||
<p>The error in the SD log file is typically related with the taking of the image (tbd) as the first time, the system is running out of memory is usually, when it tries to transfer an image from the camera to the PSRAM.</p>
|
||
<p>There is nothing to do, than to buy a new ESP32CAM with <strong>really</strong> 64MBit of PSRAM.</p>
|
||
<h5 id="configuration-missing">Configuration missing</h5>
|
||
<p>There are several files needed during on run cycle. If one of this is missing, the firmware is missing information and tends to reboot due to missing error management:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>/wlan.ini</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>/config/config.ini</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>/config/XXXXX.tflite</code> (1 time for analog and 1 time for digital)</p>
|
||
</li>
|
||
</ul>
|
||
<p>where XXXXX is the file name, that is written in the <code>config.ini</code></p>
|
||
|
||
</div>
|
||
</div><footer>
|
||
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||
<a href="../Error-Debugging/" class="btn btn-neutral float-left" title="Error Debugging"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||
<a href="../Demo-Mode/" class="btn btn-neutral float-right" title="Demo Mode">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<!-- Copyright etc -->
|
||
</div>
|
||
|
||
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
</footer>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</section>
|
||
|
||
</div>
|
||
|
||
<div class="rst-versions" role="note" aria-label="Versions">
|
||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||
|
||
<span>
|
||
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
|
||
</span>
|
||
|
||
|
||
<span><a href="../Error-Debugging/" style="color: #fcfcfc">« Previous</a></span>
|
||
|
||
|
||
<span><a href="../Demo-Mode/" style="color: #fcfcfc">Next »</a></span>
|
||
|
||
</span>
|
||
</div>
|
||
<script>var base_url = '..';</script>
|
||
<script src="../js/theme_extra.js" defer></script>
|
||
<script src="../js/theme.js" defer></script>
|
||
<script src="../search/main.js" defer></script>
|
||
<script defer>
|
||
window.onload = function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
};
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|