Skip to content

Commit be4bd0a

Browse files
authored
Merge pull request #44 from henryk86/master
adapted to latest changes
2 parents bcc51af + 54dd9e4 commit be4bd0a

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

content/docs/tools/teddyCloud/setup/dump-certs/esp32.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description: ""
66
# ESP32
77
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](https://github.com/espressif/esptool). (>v4.4)
88
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).
9+
910
![J103 Pinout](/img/tb-esp32-uart.jpg)
1011

1112
If connected with the Boot jumper, the box just start in "DOWNLOAD (USB/UART0)" 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 "BROWNOUT_RST" check your power supply / battery. "SPI_FAST_FLASH_BOOT" indicates a boot without the J100 jumper.
@@ -23,18 +24,28 @@ If the flash is read sucessfully, you can download the unpatched firmware.
2324

2425
![Flash successfully read](/img/esp32_gui_flashing_02_patchflash.png)
2526

26-
After that you can manually extract the certificates into the ```/certs/client/``` directory. You can either do that with the teddycloud executable on your computer or you may do it via the docker shell `docker exec -it <container-name> bash`.
27+
28+
_(Optionally as you can do it automatically at the end of the flashing process!)_
29+
30+
After that you can manually extract the certificates. You can either do that with the teddycloud executable on your computer or you may do it via the docker shell `docker exec -it <container-name> bash`.
2731
```
2832
# Please check the filename of your backup
29-
# Be sure you are in the teddycloud directory
33+
# Be sure you are in the TeddyCloud directory
3034
# cd /teddycloud/ # just for docker
31-
teddycloud --esp32-extract data/firmware/ESP32_<mac>.bin --destination certs/client
35+
mkdir certs/client/<mac>
36+
teddycloud --esp32-extract data/firmware/ESP32_<mac>.bin --destination certs/client/<mac>
3237
```
3338
Please check the filename of the extracted certs, especially the case! Change them to lowercase if they are uppercase.
3439
```
35-
mv certs/client/CLIENT.DER certs/client/client.der
36-
mv certs/client/PRIVATE.DER certs/client/private.der
37-
mv certs/client/CA.DER certs/client/ca.der
40+
mv certs/client/<mac>/CLIENT.DER certs/client/<mac>/client.der
41+
mv certs/client/<mac>/PRIVATE.DER certs/client/<mac>/private.der
42+
mv certs/client/<mac>/CA.DER certs/client/<mac>/ca.der
43+
```
44+
For your first Toniebox setup with TeddyCloud, copy the certificates into the base client certificates directory. TeddyCloud uses these certificates to authenticate with the official Tonies Cloud, allowing content to be downloaded without Toniebox interaction (e.g., when you click 'Download' on a Tonie in the GUI).
45+
```
46+
cp certs/client/<mac>/client.der certs/client/client.der
47+
cp certs/client/<mac>/private.der certs/client/private.der
48+
cp certs/client/<mac>/ca.der certs/client/ca.der
3849
```
3950

4051
Be sure, that the dump is okay and you are able to extract the certificates.
@@ -47,11 +58,18 @@ Be sure, that the dump is okay and you are able to extract the certificates.
4758
esptool.py -b 921600 read_flash 0x0 0x800000 tb.esp32.bin
4859
# extract certficates from firmware
4960
mkdir certs/client/esp32
61+
mkdir certs/client/<mac>
5062
teddycloud --esp32-extract tb.esp32.bin --destination certs/client/esp32
63+
5164
# Copy box certificates to teddyCloud
52-
cp certs/client/esp32/CLIENT.DER certs/client/client.der
53-
cp certs/client/esp32/PRIVATE.DER certs/client/private.der
54-
cp certs/client/esp32/CA.DER certs/client/ca.der
65+
cp certs/client/esp32/CLIENT.DER certs/client/<mac>/client.der
66+
cp certs/client/esp32/PRIVATE.DER certs/client/<mac>/private.der
67+
cp certs/client/esp32/CA.DER certs/client/<mac>/ca.der
68+
69+
# In case of first Toniebox setup for TeddyCloud
70+
cp certs/client/<mac>/client.der certs/client/client.der
71+
cp certs/client/<mac>/private.der certs/client/private.der
72+
cp certs/client/<mac>/ca.der certs/client/ca.der
5573
5674
# Copy certificates to temporary dir
5775
mkdir certs/client/esp32-fakeca

content/docs/tools/teddyCloud/setup/flash-ca/esp32.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ If the flashing was successful, you can download the unpatched and patched Firmw
2828

2929
![Flashing done](/img/esp32_gui_flashing_06_flashingdone.png)
3030

31+
You can now also extract and place the certificates automatically.
3132

3233
## Legacy
3334
Replace the original CA within your flash dump with esptool.
Loading

0 commit comments

Comments
 (0)