Skip to content

Commit

Permalink
deploy: 83e16ae
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Sep 20, 2024
1 parent df9b5f2 commit 160f892
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/tools/teddycloud/setup/dump-certs/esp32/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="ESP32 # You can extract the flash memory via the debug port of the box and the esptool. Keep your backup! Please use a recent version of esptool. (>v4.4) Please connect the jumper J100 (Boot) and reset the box to put it into the required UARTmode. Connect your 3.3V UART to J103 (TxD, RxD, GND). If connected with the Boot jumper, the box just start in &ldquo;DOWNLOAD (USB/UART0)&rdquo; mode (Check with a serial monitor) and the LED will be off."><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:title" content="ESP32"><meta property="og:description" content="ESP32 # You can extract the flash memory via the debug port of the box and the esptool. Keep your backup! Please use a recent version of esptool. (>v4.4) Please connect the jumper J100 (Boot) and reset the box to put it into the required UARTmode. Connect your 3.3V UART to J103 (TxD, RxD, GND). If connected with the Boot jumper, the box just start in &ldquo;DOWNLOAD (USB/UART0)&rdquo; mode (Check with a serial monitor) and the LED will be off."><meta property="og:type" content="article"><meta property="og:url" content="https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/dump-certs/esp32/"><meta property="article:section" content="docs"><meta property="article:modified_time" content="2024-09-20T11:32:03+02:00"><title>ESP32 | Toniebox Hacking</title><link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png><link rel=stylesheet href=/book.min.e2994ec3dc0cc7d1d85b138ad4e4c3f02d8abfa8b8471dfe0ab15a7a8a77d6ee.css integrity="sha256-4plOw9wMx9HYWxOK1OTD8C2Kv6i4Rx3+CrFaeop31u4=" crossorigin=anonymous><script defer src=/flexsearch.min.js></script>
<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="ESP32 # You can extract the flash memory via the debug port of the box and the esptool. Keep your backup! Please use a recent version of esptool. (>v4.4) Please connect the jumper J100 (Boot) and reset the box to put it into the required UARTmode. Connect your 3.3V UART to J103 (TxD, RxD, GND). If connected with the Boot jumper, the box just start in &ldquo;DOWNLOAD (USB/UART0)&rdquo; mode (Check with a serial monitor) and the LED will be off."><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:title" content="ESP32"><meta property="og:description" content="ESP32 # You can extract the flash memory via the debug port of the box and the esptool. Keep your backup! Please use a recent version of esptool. (>v4.4) Please connect the jumper J100 (Boot) and reset the box to put it into the required UARTmode. Connect your 3.3V UART to J103 (TxD, RxD, GND). If connected with the Boot jumper, the box just start in &ldquo;DOWNLOAD (USB/UART0)&rdquo; mode (Check with a serial monitor) and the LED will be off."><meta property="og:type" content="article"><meta property="og:url" content="https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/dump-certs/esp32/"><meta property="article:section" content="docs"><meta property="article:modified_time" content="2024-09-20T13:14:38+02:00"><title>ESP32 | Toniebox Hacking</title><link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png><link rel=stylesheet href=/book.min.e2994ec3dc0cc7d1d85b138ad4e4c3f02d8abfa8b8471dfe0ab15a7a8a77d6ee.css integrity="sha256-4plOw9wMx9HYWxOK1OTD8C2Kv6i4Rx3+CrFaeop31u4=" crossorigin=anonymous><script defer src=/flexsearch.min.js></script>
<script defer src=/en.search.min.a747da7050364368af95f451328a4a441114f55f067582cf539109128411405c.js integrity="sha256-p0facFA2Q2ivlfRRMopKRBEU9V8GdYLPU5EJEoQRQFw=" crossorigin=anonymous></script></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><span>Toniebox Hacking</span></a></h2><div class=book-search><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class="flex justify-between"><a role=button class="flex align-center"><img src=/svg/translate.svg class=book-icon alt=Languages>
Expand Down Expand Up @@ -28,7 +28,7 @@
<a class=anchor href=#esp32>#</a></h1><p>You can extract the flash memory via the debug port of the box and the esptool. Keep your backup! Please use a recent version of <a href=https://github.com/espressif/esptool>esptool</a>. (>v4.4)
Please connect the jumper J100 (Boot) and reset the box to put it into the required UARTmode. Connect your 3.3V UART to J103 (TxD, RxD, GND).
<img src=/img/tb-esp32-uart.jpg alt="J103 Pinout"></p><p>If connected with the Boot jumper, the box just start in &ldquo;DOWNLOAD (USB/UART0)&rdquo; mode (Check with a serial monitor) and the LED will be off. Beware, if the serial monitor is open it will block esptool.py from accessing the esp. If you get a &ldquo;BROWNOUT_RST&rdquo; check your power supply / battery. &ldquo;SPI_FAST_FLASH_BOOT&rdquo; indicates a boot without the J100 jumper.</p><h2 id=browser-based>Browser based
<a class=anchor href=#browser-based>#</a></h2><p>You can use the build in ESP32 box flashing tool in the webinterface of teddyCloud to backup your box with &ldquo;Read ESP32&rdquo;.</p><p><img src=/img/esp32_newgui_flashing_00_initial.png alt="Initial Screen ESP32 flash"></p><p>Click on [Read Flash]</p><p><img src=/img/esp32_newgui_flashing_01_readflash.png alt="Read flash"></p><p>If the flash is read sucessfully, you can download the unpatched firmware.</p><p><img src=/img/esp32_newgui_flashing_02_patchflash.png alt="Flash successfully read"></p><p>After that you can manually extract the certificates into the <code>/certs/client/</code> directory. You can either do that with the teddycloud executable on your computer or you may do it via the docker shell <code>docker exec -it &lt;container-name> bash</code>.</p><pre tabindex=0><code># Please check the filename of your backup
<a class=anchor href=#browser-based>#</a></h2><p>You can use the build in ESP32 box flashing tool in the webinterface of teddyCloud to backup your box with &ldquo;Read ESP32&rdquo;.</p><p><img src=/img/esp32_gui_flashing_00_initial.png alt="Initial Screen ESP32 flash"></p><p>Click on [Read Flash]</p><p><img src=/img/esp32_gui_flashing_01_readflash.png alt="Read flash"></p><p>If the flash is read sucessfully, you can download the unpatched firmware.</p><p><img src=/img/esp32_gui_flashing_02_patchflash.png alt="Flash successfully read"></p><p>After that you can manually extract the certificates into the <code>/certs/client/</code> directory. You can either do that with the teddycloud executable on your computer or you may do it via the docker shell <code>docker exec -it &lt;container-name> bash</code>.</p><pre tabindex=0><code># Please check the filename of your backup
# Be sure you are in the teddycloud directory
# cd /teddycloud/ # just for docker
teddycloud --esp32-extract data/firmware/ESP32_&lt;mac&gt;.bin --destination certs/client
Expand All @@ -51,6 +51,6 @@
cp certs/client/esp32/CLIENT.DER certs/client/esp32-fakeca/
cp certs/client/esp32/PRIVATE.DER certs/client/esp32-fakeca/
cp certs/server/ca.der certs/client/esp32-fakeca/CA.DER
</code></pre><p>Be sure, that the dump is okay and you are able to extract the certificates.</p><p><a href=../../flash-ca/esp32>Please continue with flash CA step for the ESP32</a></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/commit/3971df9e0a95acdb59cf6902126cc7afd72628bc title='Last modified by henryk86 | 2024-09-20' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt=Calendar>
</code></pre><p>Be sure, that the dump is okay and you are able to extract the certificates.</p><p><a href=../../flash-ca/esp32>Please continue with flash CA step for the ESP32</a></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/commit/03680364dcfc81680ec3377502af378b4e3db932 title='Last modified by henryk86 | 2024-09-20' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt=Calendar>
<span>2024-09-20</span></a></div><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/edit/master/content/docs/tools/teddyCloud/setup/dump-certs/esp32.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt=Edit>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#browser-based>Browser based</a></li><li><a href=#legacy>Legacy</a></li></ul></nav></div></aside></main></body></html>
6 changes: 3 additions & 3 deletions docs/tools/teddycloud/setup/flash-ca/esp32/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html><html lang=en dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="ESP32 # Browser based # With teddyCloud you can also write a new image with your custom CA and a hostname/IP so the box connects to teddyCloud. If you have a Fritzbox you can set it to tc.fritz.box (see CC3200 how to configure the hostname on your Fritzbox), if not set it to the IP of teddyCloud.
Check, that your backup of your flash is okay and you were able to extract the certificates."><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:title" content="ESP32"><meta property="og:description" content="ESP32 # Browser based # With teddyCloud you can also write a new image with your custom CA and a hostname/IP so the box connects to teddyCloud. If you have a Fritzbox you can set it to tc.fritz.box (see CC3200 how to configure the hostname on your Fritzbox), if not set it to the IP of teddyCloud.
Check, that your backup of your flash is okay and you were able to extract the certificates."><meta property="og:type" content="article"><meta property="og:url" content="https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/flash-ca/esp32/"><meta property="article:section" content="docs"><meta property="article:modified_time" content="2024-09-20T11:32:03+02:00"><title>ESP32 | Toniebox Hacking</title><link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png><link rel=stylesheet href=/book.min.e2994ec3dc0cc7d1d85b138ad4e4c3f02d8abfa8b8471dfe0ab15a7a8a77d6ee.css integrity="sha256-4plOw9wMx9HYWxOK1OTD8C2Kv6i4Rx3+CrFaeop31u4=" crossorigin=anonymous><script defer src=/flexsearch.min.js></script>
Check, that your backup of your flash is okay and you were able to extract the certificates."><meta property="og:type" content="article"><meta property="og:url" content="https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/flash-ca/esp32/"><meta property="article:section" content="docs"><meta property="article:modified_time" content="2024-09-20T13:14:38+02:00"><title>ESP32 | Toniebox Hacking</title><link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png><link rel=stylesheet href=/book.min.e2994ec3dc0cc7d1d85b138ad4e4c3f02d8abfa8b8471dfe0ab15a7a8a77d6ee.css integrity="sha256-4plOw9wMx9HYWxOK1OTD8C2Kv6i4Rx3+CrFaeop31u4=" crossorigin=anonymous><script defer src=/flexsearch.min.js></script>
<script defer src=/en.search.min.a747da7050364368af95f451328a4a441114f55f067582cf539109128411405c.js integrity="sha256-p0facFA2Q2ivlfRRMopKRBEU9V8GdYLPU5EJEoQRQFw=" crossorigin=anonymous></script></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><span>Toniebox Hacking</span></a></h2><div class=book-search><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class="flex justify-between"><a role=button class="flex align-center"><img src=/svg/translate.svg class=book-icon alt=Languages>
Expand Down Expand Up @@ -29,7 +29,7 @@
<label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#browser-based>Browser based</a></li><li><a href=#legacy>Legacy</a></li></ul></nav></aside></header><article class=markdown><h1 id=esp32>ESP32
<a class=anchor href=#esp32>#</a></h1><h2 id=browser-based>Browser based
<a class=anchor href=#browser-based>#</a></h2><p>With teddyCloud you can also write a new image with your custom CA and a hostname/IP so the box connects to teddyCloud.
If you have a Fritzbox you can set it to tc.fritz.box (see CC3200 how to configure the hostname on your Fritzbox), if not set it to the IP of teddyCloud.</p><p>Check, that your backup of your flash is okay and you were able to extract the certificates.</p><p>If you successfully read or load the flash of your Toniebox, the patching step is shown. Enter the hostname/ip of your teddyCloud instance. You can now also enter the WiFi credentials. To proceed click [Patch].</p><p><img src=/img/esp32_newgui_flashing_02_patchflash.png alt="Patching the flash/hostname/wifi"></p><p>After the flash is patched, you can proceed with the actuall flashing. Till this step nothing happens to your Toniebox.</p><p><img src=/img/esp32_newgui_flashing_03_initialflash.png alt="Flash you Toniebox"></p><p>To flash the patched firmware on your Toniebox, disconnect your Toniebox first from your powersource, click [Flash ESP32], confirm the dialog and immediatly connect to powersource again.</p><p><img src=/img/esp32_newgui_flashing_04_confirmflash.png alt="Confirm flashing"></p><p><img src=/img/esp32_newgui_flashing_05_flashing.png alt="Flashing in progress"></p><p>If the flashing was successful, you can download the unpatched and patched Firmware for your backup.</p><p><img src=/img/esp32_newgui_flashing_06_flashingdone.png alt="Flashing done"></p><h2 id=legacy>Legacy
If you have a Fritzbox you can set it to tc.fritz.box (see CC3200 how to configure the hostname on your Fritzbox), if not set it to the IP of teddyCloud.</p><p>Check, that your backup of your flash is okay and you were able to extract the certificates.</p><p>If you successfully read or load the flash of your Toniebox, the patching step is shown. Enter the hostname/ip of your teddyCloud instance. You can now also enter the WiFi credentials. To proceed click [Patch].</p><p><img src=/img/esp32_gui_flashing_02_patchflash.png alt="Patching the flash/hostname/wifi"></p><p>After the flash is patched, you can proceed with the actuall flashing. Till this step nothing happens to your Toniebox.</p><p><img src=/img/esp32_gui_flashing_03_initialflash.png alt="Flash you Toniebox"></p><p>To flash the patched firmware on your Toniebox, disconnect your Toniebox first from your powersource, click [Flash ESP32], confirm the dialog and immediatly connect to powersource again.</p><p><img src=/img/esp32_gui_flashing_04_confirmflash.png alt="Confirm flashing"></p><p><img src=/img/esp32_gui_flashing_05_flashing.png alt="Flashing in progress"></p><p>If the flashing was successful, you can download the unpatched and patched Firmware for your backup.</p><p><img src=/img/esp32_gui_flashing_06_flashingdone.png alt="Flashing done"></p><h2 id=legacy>Legacy
<a class=anchor href=#legacy>#</a></h2><p>Replace the original CA within your flash dump with esptool.</p><pre tabindex=0><code># copy firmware backup
cp tb.esp32.bin tb.esp32.fakeca.bin

Expand All @@ -40,6 +40,6 @@

# flash firmware with new CA
esptool.py -b 921600 write_flash 0x0 tb.esp32.fakeca.bin
</code></pre><p><img src=/img/esp32_write_patched_image_with_esptools.png alt="Flash ESP32 Image"></p><p>Reassamble your Toniebox again. If you already set the teddyCloud hostname, you can skip the <a href=../../dns/esp32>DNS step for the ESP32</a>, if not <a href=../../dns/esp32>continue with DNS step for the ESP32</a>.</p><p>Your Toniebox should now be able to connect to your teddyCloud. Do a freshnesscheck and check if the box appears in the Toniebox management.</p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/commit/3971df9e0a95acdb59cf6902126cc7afd72628bc title='Last modified by henryk86 | 2024-09-20' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt=Calendar>
</code></pre><p><img src=/img/esp32_write_patched_image_with_esptools.png alt="Flash ESP32 Image"></p><p>Reassamble your Toniebox again. If you already set the teddyCloud hostname, you can skip the <a href=../../dns/esp32>DNS step for the ESP32</a>, if not <a href=../../dns/esp32>continue with DNS step for the ESP32</a>.</p><p>Your Toniebox should now be able to connect to your teddyCloud. Do a freshnesscheck and check if the box appears in the Toniebox management.</p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/commit/03680364dcfc81680ec3377502af378b4e3db932 title='Last modified by henryk86 | 2024-09-20' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt=Calendar>
<span>2024-09-20</span></a></div><div><a class="flex align-center" href=https://github.com/toniebox-reverse-engineering/toniebox-reverse-engineering.github.io/edit/master/content/docs/tools/teddyCloud/setup/flash-ca/esp32.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt=Edit>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#browser-based>Browser based</a></li><li><a href=#legacy>Legacy</a></li></ul></nav></div></aside></main></body></html>
Loading

0 comments on commit 160f892

Please sign in to comment.