Solved it.
In case you get blocked into Data mode use just the escape command (+++):
- Power on device, connected to serial
- In the console command type:
+++
- Press Enter
You may have to repeat steps 2 and 3 several times.
The device should return OK
Then you can stop the app with:
at+wopen=0
After that reset and delete the application