Stuck at accessing ESP32

You can try the latest teddycloud developer version and the new webui (not sure if the UART / WebSerial is working on your setup, but if this works…)… there are hints for each step what to do

The steps should be:

  • bridge jumper J100
  • connect serial clamp
  • connect usb
  • power up
  • read

@ruN With read you mean “screen” or “Read ESP32” in the Browser?
When I bridge the jumper, connect the board to the PC, type “screen /dev/ttyUSB0 115200” and then power up I get the following:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x0 (DOWNLOAD(USB/UART0))
waiting for download

But when I open the “TeddyCloud administration interface” and try to read the ESP32 I get:

Failed to open this port. Already in use?

@henryk When trying " ESP32 Box Flashing" under “Tonieboxen” in the new WebUI it says I have to deactivate the two HTTPS settings, but when switching to HTTPS, the URL isn’t reachable anymore.
Maybe because I’m trying it on the same machine?

Please update to the latest develop version (was created today morning).

Beside httpd only you should also disable HTTPS client Auth. Both settings are available on the flashing page. Open that page in http. If you disable both and save, you should be redirected to https automatically.

But i assume if you get failed to open port in the “classic ui”, the same will happen in the new one.

by read i mean read on the teddycloud https site.

when you do all steps including screen then the port is blocked. try again all steps and do the read insted of screen command and you should be able to download the ESP32 image.

this is the new flashing section with all steps and hints:

Ok, with your help I got at least further… :wink:
I managed to read the flash:


Then writing wasn’t possible, USB already connected:


After another powercycle I managed to write the patched image and the Box obviously connected to the router:

Bildschirmfoto_20240731_104527
But I don’t see the Box in the WebUI:

What did I do wrong?
Do I have to change the “TeddyCloud hostname”? I tried “localhost” and “teddycloud” according to my docker-compose.yaml-file:

services:
teddycloud:
container_name: teddycloud
hostname: teddycloud
image: Package teddycloud · GitHub
ports:
- 8080:80 #optional
- 443:443 #Port is needed for the connection for the box
volumes:
- certs:/teddycloud/certs
- config:/teddycloud/config
- content:/teddycloud/data/content
- library:/teddycloud/data/library
- firmware:/teddycloud/data/firmware
restart: unless-stopped
volumes:
certs:
config:
content:
library:
firmware:

thats progress, nice! You have to put the IP or Hostname of the teddycloud server there.

localhost does not reference to teddycloud in the view from your box. So the question is where are you running the teddycloud server? Do a “ip a” (linux) or ipconfig (win) on the machine thats hosting teddycloud. That IP goes to the patched image wich you are writing back to your box.

The idea behind this is your box connects to your teddycloud server und your teddycloud server connects to boxine cloud.

If you hide the Mac you should also hide the filename of your flash image.

You can also use the new gui for the flashing :slight_smile: give it a try when you are flashing the correct ip of your teddycloud. There are some more hints to make the process easier.

1 Like

You’re right! :man_facepalming: :sweat_smile:


Sadly when trying to switch to https, I can’t reach the GUI anymore…

You have to switch to port 443

This seems to be a problem on the auto redirect if a port is part of the url. Hm. Currently I do not have an idea how to solve that automatically.

Edit: the used ports can be stored in the settings. The default values are currently 80 and 443. you should adapt that to the used ones. I will use these values for the autoredirect in future.

That worked!
And for the “TeddyCloud Hostname” I just have to put in the IP from my Notebook (10.0.0.72 in my case) without “http://”, right?
Do I have to change something here too:

I don’t get what I’m doing wrong, it just doesn’t connect… :slightly_frowning_face:

I wanted to try two other PCs, but port 443 is taken on both…

The box appears in your WiFi?

And did you make a freshnesscheck?

Anything in rtnl log or docker log?

I entered the ip of the teddycloud (with http) as hostnamen in teddycloud settings

The box is in the WiFi, yes but I do get an error with the freshnesscheck - “codeword owl”…

that’s fixed in the current pr to develop

Hey guys, mind helping me again?
After a vacation I decided to give it another try.
I deleted the whole docker image and started from scratch.
After the first flash with the error “turtle”, I ended up with “codeword owl” again.
I don’t know what to do or solve this error.
The troubleshoot isn’t really helping me… :see_no_evil:
Could you help me please?

PS.: The toniebox is checked in in the WiFi and the client certificates are in lower cases.

I just checked the log and it says:

INFO |handler_cloud.c:0041:handleCloudTime| >> respond with current time
INFO |mqtt.c:0685:mqtt_init_box| Skipping client ‘Toniebox’ (cn: ‘default’)
INFO |cloud_request.c:0157:web_request| Connecting to HTTP server prod.de.tbs.toys:443…
INFO |cloud_request.c:0207:web_request| trying IP: 18.156.186.144
INFO |cloud_request.c:0033:httpClientTlsInitCallbackBase| Initializing TLS…
INFO |cloud_request.c:0068:httpClientTlsInitCallbackBase| Initializing TLS done
ERROR|cloud_request.c:0217:web_request| Failed to connect to HTTP server! Error=Unknown certificate authority [537]

So I guess it’s Troubleshoot 1.2.3 but I don’t know how to solve this…

You are missing the client certificates or they are broken. Are you using the original CA or you are using the teddycloud CA from a previous flash? You need the original one for the client certificates.

Did you backup your server certificates or did you flash your box again?