Error when converting a mender Debian image

Hi!
I have a Raspberry PI, and a clock module attached on its pins and an Arduino connected to it via USB.

Here, I have mentioned that the mender Debian image was successfully created.

Now, instead of an Arduino, I use an ESP32 module, which is attached to the clock’s TX/RX input. In order to be able to communicate with the ESP32, I made the following changes:

in /boot/config.txt:
dtoverlay=uart0

in /etc/udev/rules.d/99-com.rules:
add ", MODE="0666" to the block "KERNEL==ttyAMA0..."

Execute the following two commands:
sudo udevadm control --reload-rules
sudo udevadm trigger

Remove the following in /boot/cmdline.txt:
"console=serial0,115200"

Configure the serial port:
stty -F /dev/serial0 9600 raw -echo

I did all the exact same steps to create a mender debian image.
However, with Arduino it works, but with ESP (and using the above configuration) it does not.
How do I fix this?

Thanks