Stuck at accessing ESP32

Hi guys,

I followed the great newbie guide until you connect your PC to the UART adapter.
“dmesg” says:

[ 1500.992458] usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0

So I guess I have to use

screen /dev/ttyUSB0 115200

But after the command the terminal screen is just empty…

If it’s important I’m running Fedora (Nobara) on my Laptop and installed “screen”, because it wasn’t delivered from scratch.

And just for the understanding of the ESP32 - the TxD of the TonieBox-Board has to be connected to RxD and vice versa, right?

Thx for your help!

Hi, yes TxD on the box board has to be connected to RxD on the serial adapter and RxD to TxD.

After using screen did you power cycle your box? Did you try to read the box via https teddycloud? What kind of serial adapter are you using? And did you bridge jumper J100?

No, I did not…
I’m using the recommended AZDelivery-adapter.
Also I noticed yesterday that the jumper on it was on 5V - hope this didn’t harm anything!
So step bye step it would be:
1.) connect the powercord to the board/ connect the adapter
2.) connect the adapter via USB cable to the PC
3.) power cycle
4.) bridge jumper
5.) read box via teddycloud
?

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