Hello @Adrian_Psujek ,
by searching in the forum, you'll find a lot of information about the BT comm's betwen ESP32 and AI2.
For example the following:
For my curiosity: why do you send 1 as a number and 0 as a character ? I believe that in your ESP32 you shall manage the difference ...
When i connect my esp32 using serial bluetooth terminal on my device i can run stepper motor all day without any issue.
This is pretty weird. You know that on the ESP there is a very ennoying watchdog that resets the CPU if not retriggered or if the code remains stuck for some reason, or traps an exception. Have you the possibility to connect your ESP32 to the Serial Monitor of the Arduino IDE and therefore to catch what happens when the BT ceases ? (If the ESP is reset by the watchdog, a series of info is sent automatically by the CPU to the serial monitor)
And why you check twice the same condition with an "else" ?
