after quite some trial and error I finally got my MQTT client for Decawave and ESP32 working. I would like to share the source here as it might help one or the other realizing similar projects.
What does it do? It connects the Decawave module via serial to the ESP32. It sets the Decawave into the shell model after start.
The ESP32 will subscribe to an MQTT server and listen to commands. By sending the command lep it will continuously send the position data to the MQTT server.
Important: The commands must close with a CRLF. I used MQTT Explorer to test and just pressed Enter after the command and it worked well.