Back to the start ESP32 Box

Hy,
I have installed the teddycloud. I think something went wrong. I realized the issue after I have loaded the patched firmware file on the box (ESP32) and it was not possible to connect with the server.
So my question is to go back to the start: As I understand the downloaded file is the original firmware file. When i’m loading the unpatched (original) firmware file on the box, the tonies box is working like a original tonies box?
Is that correct?
Firmwarefiles

Ps: The question about the installation of the teddyclould on the Synologyclould will follow in the right categories. With the upper question I only want to check up my options.

Best Regards & thank you in advance
Stefan

Hi Stefan,

that’s correct. If you reflash the original firmware, your Toniebox will behave as before. So you could start from scratch.

There are different possible reasons if the box is not recognized at all by your Teddycloud instance. Most common ones are the hostname you used during patching (which might not be correct or not resolving) or a problem with your Teddycloud installation (port 443 not reachable). What happens when you perform a freshness check (by pressing one ear for >3 seconds)? Codeword Owl?

1 Like

Perfect thank you for this quick respond.
I think also that the reason is the not rechable port 443.
Freshness check → Codeword Owl!

Hy Marco,
I have right now installed the esptool.py v4.8.1.
Can you please help me to form the right command to get the ESP32_xxxx.bin file again on the box.

Thank you in advance.
Stefan

You mean the original firmware? You can flash it back within the Browser. There should be an upload button. Just click „next“ instead of „flash“.

Hy Marco,
now the TeddyCloud is running again. Link to my other issue
So I don’t need the esptool any more.
But I have a question to your last reply:

… Just click „next“ instead of „flash"

The button is there but it is disabled.
How can I patch my original file again without downloading the (wrong) firmware again?

Thank you for your time.
Stefan

Datei laden and then Next?

Sorry, there is coming following error, when I click “Datei laden” and choos the bin-file.
2024-12-30_09h46_18

I’m loading the ESP32_xxx.bin file with about 8192kb. Should be correct?

Thanks
Stefan
PS: I also reduced the secruitylevel ( to no security) and allowed all pages to open popups. started again but no change

Same in MS Edge

My goal now is to load the original bin-file on the server in order to patch it with the right Teddy Cloud- Hostname ( in my case 192.168.0.25) and also the wifi data (WIFI SSID and password).

have you connected your toniebox with the uart as describben? thats necessary even if you click load flash.

in the current develop version there is a new short cut to reset your box to the original firmware (=flashing the unmodified image)

1 Like

Hy Henryk,
I did not!
But now I tried it again with “Flash lesen”. It was sucessfull the patch and also the Certificate extraction.


But after restart of the Box (twice) i dont have a connection. (Codeword owl)

Ping is working:
2024-12-30_13h34_22

After that i tried it again with “Datei laden”. Press “Datei laden” → Choose the original bin-file → Connect the UART+J100+Battery → Open.

Same error as by the first attempft: FehlerSecurityError: Failed to execute ‘requestPort’ on ‘Serial’: Must be handling a user gesture to show a permission request.

I will go now forward with https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/test-troubleshooting/

PS: Thats the log file in portainer by the way:

2024-12-30T12:21:15.860909561Z TeddyCloud v0.6.2 (203f12d) - 2024-10-26 18:14:34 +0000 ubuntu linux-x86_64(64)
2024-12-30T12:21:15.861521008Z 
2024-12-30T12:21:15.862306604Z INFO |settings.c:0848:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
2024-12-30T12:21:15.863796462Z INFO |settings.c:0848:settings_load_ovl| Load settings from /teddycloud/config/config.ini
2024-12-30T12:21:15.965667328Z INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
2024-12-30T12:21:15.966010044Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
2024-12-30T12:21:15.966693966Z INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
2024-12-30T12:21:15.966902497Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY

2024-12-30T12:21:15.967104883Z INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE

2024-12-30T12:21:15.967282749Z INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
2024-12-30T12:21:15.967447834Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
2024-12-30T12:21:15.967618860Z INFO |settings.c:0848:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
2024-12-30T12:21:15.969465485Z INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates...
2024-12-30T12:21:15.969559269Z INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
2024-12-30T12:21:15.969674789Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
2024-12-30T12:21:15.969750324Z INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
2024-12-30T12:21:15.969861974Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
2024-12-30T12:21:15.970005379Z INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE
2024-12-30T12:21:15.970114941Z INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
2024-12-30T12:21:15.970264953Z INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
2024-12-30T12:21:15.981381751Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
2024-12-30T12:21:15.981623323Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 5081996
2024-12-30T12:21:16.409057774Z INFO |toniesJson.c:0100:tonies_update| Updating tonies.json from api.revvox.de...
2024-12-30T12:21:16.409313947Z INFO |cloud_request.c:0200:web_request| Connecting to HTTP server api.revvox.de:443...
2024-12-30T12:21:16.441579938Z INFO |cloud_request.c:0252:web_request|   trying IP: 157.90.183.226
2024-12-30T12:21:16.555228383Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:16.665713538Z INFO |handler_cloud.c:0041:handleCloudTime|  >> respond with current time
2024-12-30T12:21:16.964782813Z INFO |mqtt.c:0685:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
2024-12-30T12:21:16.964860673Z INFO |cloud_request.c:0382:web_request| Redirecting to: https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonies.json
2024-12-30T12:21:16.964907543Z INFO |cloud_request.c:0200:web_request| Connecting to HTTP server raw.githubusercontent.com:443...
2024-12-30T12:21:16.964943572Z INFO |cloud_request.c:0252:web_request|   trying IP: 185.199.111.133
2024-12-30T12:21:16.964975286Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:17.752482184Z INFO |handler_cloud.c:0041:handleCloudTime|  >> respond with current time
2024-12-30T12:21:17.752631659Z INFO |mqtt.c:0685:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
2024-12-30T12:21:17.755611746Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:17.756014761Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:17.756219119Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:17.991518101Z INFO |cloud_request.c:0178:web_request| Cloud requests generally blocked in settings
2024-12-30T12:21:17.991665611Z ERROR|handler_reverse.c:0029:handleReverse| cloud_request_get() failed
2024-12-30T12:21:18.036786894Z INFO |cloud_request.c:0178:web_request| Cloud requests generally blocked in settings
2024-12-30T12:21:18.036925372Z ERROR|handler_reverse.c:0029:handleReverse| cloud_request_get() failed
2024-12-30T12:21:18.382514894Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.431616652Z INFO |toniesJson.c:0124:tonies_update| ... success updating tonies.json from api.revvox.de, reloading
2024-12-30T12:21:18.500993248Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.505805809Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.527991125Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.533294987Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.534079289Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:18.546713135Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
2024-12-30T12:21:18.546886930Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 5081996
2024-12-30T12:21:18.577103648Z INFO |cloud_request.c:0178:web_request| Cloud requests generally blocked in settings
2024-12-30T12:21:18.577260411Z ERROR|handler_reverse.c:0029:handleReverse| cloud_request_get() failed
2024-12-30T12:21:18.654580338Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:19.022518522Z INFO |toniesJson.c:0211:tonieboxes_update| Updating tonies.json from api.revvox.de...
2024-12-30T12:21:19.022954099Z INFO |cloud_request.c:0200:web_request| Connecting to HTTP server api.revvox.de:443...
2024-12-30T12:21:19.051877041Z INFO |cloud_request.c:0252:web_request|   trying IP: 157.90.183.226
2024-12-30T12:21:19.126146096Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:21:19.299546164Z INFO |cloud_request.c:0382:web_request| Redirecting to: https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonieboxes.json
2024-12-30T12:21:19.299741807Z INFO |cloud_request.c:0200:web_request| Connecting to HTTP server raw.githubusercontent.com:443...
2024-12-30T12:21:19.317385362Z INFO |cloud_request.c:0252:web_request|   trying IP: 185.199.108.133
2024-12-30T12:21:19.592672656Z INFO |toniesJson.c:0238:tonieboxes_update| ... success updating tonieboxes.json from api.revvox.de, reloading
2024-12-30T12:21:19.622457231Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
2024-12-30T12:21:19.622632792Z INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 5081996
2024-12-30T12:21:20.281751575Z INFO |server.c:0929:server_init| 5 open HTTPS Web connections
2024-12-30T12:22:31.827978918Z INFO |server.c:0929:server_init| 3 open HTTPS Web connections
2024-12-30T12:22:36.802544544Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:22:36.831022925Z INFO |server.c:0929:server_init| 4 open HTTPS Web connections
2024-12-30T12:23:52.127208981Z INFO |server.c:0929:server_init| 3 open HTTPS Web connections
2024-12-30T12:25:59.645756582Z WARN |tls_server_fsm.c:0260:tlsPerformServerHandshake| TLS handshake failure!
2024-12-30T12:25:59.709398682Z INFO |server.c:0929:server_init| 4 open HTTPS Web connections
2024-12-30T12:27:09.253656349Z INFO |server.c:0929:server_init| 3 open HTTPS Web connections
2024-12-30T12:31:29.172212093Z INFO |server.c:0929:server_init| 1 open HTTPS Web connections
2024-12-30T12:31:31.173138171Z INFO |server.c:0929:server_init| 0 open HTTPS Web connections

That’s correct?
2024-12-30_13h55_39

Please switch to the develop branch for reflashing the original backup.

You can test if your current tc is available with port 443

Https://ip:443

There should be a error message like unauthorised or 503 or some other auth related message ( or asking for certificate)

If there is something else, then the port might be blocked by something.

Post a screenshot of the page

1 Like

Sorry for the dumb question, but how do I do it?

You have to adapt the docker-compose.json and use the image develop instead latest/release

And then pull and up

Maybe portainer also allows easily to switch container images. But I don’t know, I do not use portainer

Portainer GUI → Stacks → teddycloud → Editor (tab)

Change the image tag at the end of the line, use develop instead of latest and save/redeploy.

1 Like

I changed it from

image: ghcr.io/toniebox-reverse-engineering/teddycloud:latest

to

image: ghcr.io/toniebox-reverse-engineering/teddycloud:develop

looks good:

I entered: https://192.168.0.25:443
image

That’s okay so your box should reach it.

Hello Henryk,
I switch to the develop branch and tried to Reset the box/ Box zurücksetzen.

Same error:

Fehler SecurityError: Failed to execute ‘requestPort’ on ‘Serial’: Must be handling a user gesture to show a permission request.

Than it jumps to

PS: Procedur: Press “Box zurücksetzen”-> explorer opens-> choose bin file-> press open-> immediately the error occurs. ( No connection atempt visible)

What os are you using? Did you disconnect your uart from your pc inbetween? Try that before tryinng to reset.

Still wondering what everyone does, I never got to this message and o tried it a lot.