I asked a question here about my issue and thanks to @enhzflep I solved the huge part of my problem. My problem was if I write 46754!ABCDEFG12345#qwerwe to the serial, I want to
I can't test any code myself, but I think this should work. Change the allocation of command to 200 bytes. Your commented out code seemed mostly correct. I just made some minor changes: