I dont understand exactly how code forms a string str that gets returned, what happens when time expires and error1 returns...
Code was intended to read short messages like "\n\r", "OK" and telephone numbers...
And I need to find a reason why it doesn`t work with longer messages.