Friends,
Thanks for this thread. I've been active in this area lately and found that if you are in text mode and try to send more than 160 characters in a single text, you get the nasty 765 error.
I think, but don't know for sure, that there is some internal buffer limit on an outbound text, and after that is exceeded, the next thing it expects is Cntrl-Z -- so if you keep feeding it characters, it doesn't get that Cntrl-Z and claims that the input is "invalid input value."
This explanation of 765 ("invalid input value") initially sent me down the wrong path, by the way: I use all kinds of characters like !@#$% and was even using a newline in my texts -- but I tested all those including the newline: no problem.
Check for buffer overrun on your tx. Best wishes,
~~ Robert